1 2013-08-21 Ondřej Bílka <neleai@seznam.cz>
3 * pthread_getschedparam.c: Fix typos.
4 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6 2013-07-23 David S. Miller <davem@davemloft.net>
8 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
10 2013-07-22 David S. Miller <davem@davemloft.net>
12 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
14 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
16 * pthread_mutex_lock.c: Fix whitespace.
17 * pthread_mutex_trylock.c: Likewise.
18 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
19 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
20 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
21 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
22 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
23 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
24 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
25 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
26 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
27 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
28 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
29 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
31 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
32 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
33 (elision_init): Don't set __rwlock_rtm_enabled.
34 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
35 Remove __rwlock_rtm_enabled.
37 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
39 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
40 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
42 2013-07-02 Andi Kleen <ak@linux.intel.com>
44 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
45 Check ENABLE_LOCK_ELISION.
47 2013-07-02 Andi Kleen <ak@linux.intel.com>
49 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
50 Disable elision for PTHREAD_MUTEX_DEFAULT.
52 2013-07-02 Andi Kleen <ak@linux.intel.com>
53 Hongjiu Lu <hongjiu.lu@intel.com>
55 * pthread_mutex_lock.c
56 (__pthread_mutex_lock): Add lock elision support.
57 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
58 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
59 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
60 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
61 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
62 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
63 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
64 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
65 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
66 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
67 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
68 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
70 2013-07-02 Andi Kleen <ak@linux.intel.com>
72 * tst-mutex5.c: Include config.h.
73 (do_test): Add checks for ENABLE_LOCK_ELISION.
74 * tst-mutex8.c: Include config.h
75 (tf): Add checks for ENABLE_LOCK_ELISION.
76 (check_type): Likewise.
78 2013-07-02 Andi Kleen <ak@linux.intel.com>
80 * pthreadP.h: Add elision types.
81 (PTHREAD_MUTEX_TYPE_ELISION): Add.
82 * sysdeps/pthread/pthread.h: Add elision initializers.
83 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
84 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
85 (__PTHREAD_SPINS): Add.
87 2013-07-02 Andi Kleen <ak@linux.intel.com>
88 Hongjiu Lu <hongjiu.lu@intel.com>
90 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
91 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
92 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
93 lll_trylock_elision): Add.
94 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
95 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
96 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
97 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
98 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
99 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
100 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
101 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
102 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
103 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
104 lll_trylock_elision): Add.
105 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
106 * elision-conf.h: New file.
108 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
111 * pthread_exit.c: Add reference to pthread_create.
113 2013-06-22 Joseph Myers <joseph@codesourcery.com>
115 * pthread_getattr_default_np.c: Include <string.h>.
117 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
119 * Versions (libpthread): Add GLIBC_2.18.
120 (GLIBC_2.18): Add pthread_setattr_default_np and
121 pthread_getattr_default_np.
122 * allocatestack.c (allocate_stack): Synchronize read from
123 __default_pthread_attr.
124 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
125 * nptl-init.c (__pthread_initialize_minimal_internal):
126 Synchronize write to __default_pthread_attr.
127 * pthreadP.h (__default_pthread_attr_lock): Declare.
128 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
129 Synchronize read from __default_pthread_attr.
130 * pthread_create.c (__pthread_create_2_1): Make a local copy of
131 __default_pthread_attr. Check value of flags in IATTR even if
133 * pthread_getattr_default_np.c: New file.
134 * pthread_setattr_default_np.c: New file.
135 * sysdeps/pthread/pthread.h [__USE_GNU]
136 (pthread_getattr_default_np, pthread_setattr_default_np):
138 * tst-default-attr.c: New test case.
139 * Makefile (libpthread-routines): Add
140 pthread_setattr_default_np and pthread_getattr_default_np.
141 (tests): Add tst-default-attr.
142 * vars.c (__default_pthread_attr_lock): Declare and initialize.
144 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
145 Carlos O'Donell <carlos@redhat.com>
148 * tst-pthread-attr-affinity: New test case.
149 * Makefile (tests): Add it.
150 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
151 (__pthread_attr_getaffinity_new): Copy minimum of source and
152 destination sizes to avoid a buffer overrun.
154 2013-06-10 Carlos O'Donell <carlos@redhat.com>
156 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
157 (lll_futex_wake): Return syscall error.
158 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
159 (lll_futex_wake): Return syscall error.
161 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
163 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
165 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
167 * tst-cond22.c: Fix leading whitespaces.
168 * tst-umask1.c: Likewise.
170 2013-06-06 Joseph Myers <joseph@codesourcery.com>
172 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
174 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
175 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
176 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
177 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
178 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
179 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
180 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
181 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
183 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
184 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
185 * tst-mutexpp10.c: Likewise.
186 * tst-stackguard1.c: Likewise.
188 2013-05-31 Joseph Myers <joseph@codesourcery.com>
190 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
193 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
195 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
197 * sysdeps/pthread/createthread.c: Likewise.
199 2013-05-14 Andreas Jaeger <aj@suse.de>
202 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
203 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
205 2013-05-09 Andi Kleen <ak@linux.intel.com>
207 * tst-mutex8.c (do_test): Check for ENABLE_PI.
209 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
211 * pthreadP.h (check_sched_policy_attr): New inline function.
212 (check_sched_priority_attr): Likewise.
213 (check_stacksize_attr): Likewise.
214 (__kernel_cpumask_size, __determine_cpumask_size): Declare
216 (check_cpuset_attr): New inline function.
217 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
218 Use check_sched_priority_attr.
219 * pthread_attr_setschedpolicy.c
220 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
221 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
222 check_stacksize_attr.
223 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
225 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
226 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
228 2013-04-11 Andreas Schwab <schwab@suse.de>
230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
231 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
232 directly use absolute timeout.
234 2013-04-07 Carlos O'Donell <carlos@redhat.com>
236 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
238 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
241 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
243 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
244 __pthread_unwind hidden.
246 2013-03-28 Roland McGrath <roland@hack.frob.com>
248 * pthread_create.c (start_thread) [!SHARED]:
249 Call __call_tls_dtors only if it's not NULL.
251 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
253 * allocatestack.c (allocate_stack): Use __default_pthread_attr
254 instead of __default_stacksize.
255 * nptl-init.c (__pthread_initialize_minimal_internal):
256 Likewise. Initialize guardsize.
257 * pthreadP.h (__default_pthread_attr): Declare.
258 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
259 Use __default_pthread_attr instead of __default_stacksize.
260 * pthread_create.c (default_attr): Remove.
261 (__pthread_create_2_1): Use __default_pthread_attr instead of
263 * vars.c (__default_stacksize): Remove.
264 (__default_pthread_attr): New static variable to store
265 default thread attributes.
267 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
269 * pthread_barrier_init.c (default_attr): Rename to
271 (pthread_barrier_init): Adjust for the rename.
272 * pthread_mutex_init.c (default_attr): Rename to
274 (__pthread_mutex_init): Adjust for the rename.
275 * pthread_rwlock_init.c (default_attr): Rebane to
277 (__pthread_rwlock_init): Adjust for the rename.
279 2013-03-12 Carlos O'Donell <carlos@redhat.com>
281 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
283 2013-03-04 Roland McGrath <roland@hack.frob.com>
285 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
286 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
288 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
289 (RTLD_PRIVATE_ERRNO): Likewise.
290 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
291 Move macros and associated declaration to ...
292 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
293 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
296 2013-03-01 Carlos O'Donell <carlos@redhat.com>
298 * Makefile (tests): Revert last change.
299 (tst-pthread-stack-env-ENV): Likewise.
300 * nptl-init.c (set_default_stacksize): Likewise.
301 (__pthread_initialize_minimal_internal): Likewise.
302 * tst-pthread-stack-env.c: Likewise.
304 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
306 * tst-oddstacklimit.c: Include stdlib.h.
308 * Makefile (tests): Add tst-pthread-stack-env.
309 (tst-pthread-stack-env-ENV): Set environment for test.
310 * nptl-init.c (set_default_stacksize): New function.
311 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
312 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
313 * tst-pthread-stack-env.c: New test case.
315 2013-02-21 David S. Miller <davem@davemloft.net>
317 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
318 (FUTEX_WAIT_REQUEUE_PI): Define.
319 (FUTEX_CMP_REQUEUE_PI): Likewise.
320 (lll_futex_wait_requeue_pi): Likewise.
321 (lll_futex_timed_wait_requeue_pi): Likewise.
322 (lll_futex_cmp_requeue_pi): Likewise.
324 2013-02-21 Carlos O'Donell <carlos@redhat.com>
326 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
328 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
330 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
332 * tst-barrier4.c: Likewise.
333 * tst-robust7.c: Likewise.
336 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
338 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
339 PI-aware futex operations if available and mutex is PI-aware.
340 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
341 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
343 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
344 cancellation occurred just after futex returned successfully
345 from a PI operation with the mutex held.
346 (__pthread_cond_wait): Use PI-aware futex operations if
347 available and mutex is PI-aware.
348 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
349 (FUTEX_WAIT_REQUEUE_PI): Define.
350 (FUTEX_CMP_REQUEUE_PI): Likewise.
351 (lll_futex_wait_requeue_pi): Likewise.
352 (lll_futex_timed_wait_requeue_pi): Likewise.
353 (lll_futex_cmp_requeue_pi): Likewise.
354 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
355 (FUTEX_WAIT_REQUEUE_PI): Define.
356 (FUTEX_CMP_REQUEUE_PI): Likewise.
357 (lll_futex_wait_requeue_pi): Likewise.
358 (lll_futex_timed_wait_requeue_pi): Likewise.
359 (lll_futex_cmp_requeue_pi): Likewise.
360 * sysdeps/unix/sysv/linux/kernel-features.h: Define
361 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
363 2013-02-04 Andreas Schwab <schwab@suse.de>
366 * tst-cancel14.c: Include <sys/time.h>.
367 * tst-cancel15.c: Likewise.
368 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
369 * tst-stackguard1.c: Include <tls.h>
371 2013-01-16 Andreas Schwab <schwab@suse.de>
374 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
376 2013-01-11 Carlos O'Donell <codonell@redhat.com>
378 * allocatestack.c (allocate_stack): Add comment. Remove assert
381 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
383 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
384 with $(host-test-program-cmd).
385 (tst-exec4-ARGS): Likewise.
386 (tst-stackguard1-ARGS): Likewise.
387 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
388 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
389 * tst-tls6.sh (elf_objpfx): Removed.
390 (rtld_installed_name): Renamed to ...
391 (test_via_rtld_prefix): This.
392 (tst_tls5): Prepend ${test_via_rtld_prefix}.
394 2013-01-02 Joseph Myers <joseph@codesourcery.com>
396 * All files with FSF copyright notices: Update copyright dates
397 using scripts/update-copyrights.
399 2013-01-01 Joseph Myers <joseph@codesourcery.com>
401 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
404 2012-12-28 Andi Kleen <ak@linux.intel.com>
406 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
408 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
411 2012-12-27 David S. Miller <davem@davemloft.net>
413 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
414 (lll_futex_timed_wait_bitset): New macro.
416 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
418 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
420 (lll_futex_timed_wait): Replace assembly code with
422 (lll_futex_timed_wait_bitset): Likewise.
423 (lll_futex_wake): Likewise.
424 (lll_futex_requeue): Likewise.
425 (lll_futex_wake_unlock): Likewise.
427 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
429 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
430 Declare LOCAL_VAR as char.
432 2012-12-04 Joseph Myers <joseph@codesourcery.com>
434 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
435 Cast result of atomic_increment_val to (void) instead of storing
436 in otherwise-unused variable.
438 2012-12-03 Allan McRae <allan@archlinux.org>
440 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
442 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
444 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
446 * sysdeps/i386/tls.h: Include <libc-internal.h>.
447 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
448 (THREAD_SETMEM_NC): Likewise.
449 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
450 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
451 (THREAD_SETMEM_NC): Likewise.
453 2012-11-21 Joseph Myers <joseph@codesourcery.com>
455 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
456 of atomic_increment_val to (void) instead of storing in
457 otherwise-unused variable.
459 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
460 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
461 instead of storing in otherwise-unused variable.
463 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
465 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
466 (CFLAGS-recv.c, CFLAGS-send.c): Define.
468 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
470 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
471 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
473 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
475 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
476 if absolute timeout is negative.
477 [__ASSUME_FUTEX_CLOCK_REALTIME &&
478 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
479 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
481 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
483 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
484 (__lll_robust_timedlock_wait): Likewise.
485 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
486 (lll_futex_timed_wait_bitset): New macro.
487 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
488 (lll_futex_timed_wait_bitset): Likewise.
490 2012-11-03 David S. Miller <davem@davemloft.net>
492 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
494 (__cpu_relax): Likewise.
496 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
498 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
499 (__128bits): New struct typedef.
500 (tcbhead_t): Replace __m128 with __128bits.
502 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
503 Joseph Myers <joseph@codesourcery.com>
505 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
507 2012-10-28 David S. Miller <davem@davemloft.net>
509 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
510 Define when we have v9 instructions available.
511 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
512 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
514 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
516 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
517 to libpthread-routines.
519 2012-10-25 Roland McGrath <roland@hack.frob.com>
521 * tst-cond-except.c (TEST_FUNCTION): New macro.
523 2012-10-25 Joseph Myers <joseph@codesourcery.com>
525 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
527 * tst-tls6.sh: Use /bin/bash not /bin/sh.
529 2012-10-25 Roland McGrath <roland@hack.frob.com>
531 * tst-basic2.c (do_test): Return RESULT, not always zero.
533 * tst-cond25.c: Include <stdint.h>
534 (waiter): Add casts to uintptr_t between casting integer<->pointer.
535 (timed_waiter): Likewise.
536 (do_test_wait): Likewise.
537 * tst-cond-except.c (thr): Likewise.
538 (do_test): Use prototype definition.
540 2012-10-24 Joseph Myers <joseph@codesourcery.com>
541 Jim Blandy <jimb@codesourcery.com>
543 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
545 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
546 programs with LD_PRELOAD set.
548 2012-10-24 Roland McGrath <roland@hack.frob.com>
550 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
551 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
552 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
553 ($(objpfx)tst-rwlock14): Likewise.
555 2012-10-24 Joseph Myers <joseph@codesourcery.com>
557 * Makefile (tests): Remove tst-oddstacklimit.
558 (test-srcs): New variable.
559 (tst-oddstacklimit-ENV): Remove.
560 [$(run-built-tests) = yes] (tests): Depend on
561 $(objpfx)tst-oddstacklimit.out.
562 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
564 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
565 setrlimit before executing tst-basic1 test passed to --command.
567 2012-10-23 Joseph Myers <joseph@codesourcery.com>
569 * Makefile [$(cross-compiling) = no]: Change condition to
570 [$(run-built-tests) = yes].
572 2012-10-23 Jim Blandy <jimb@codesourcery.com>
573 Joseph Myers <joseph@codesourcery.com>
575 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
576 (tst-exec4-ARGS): Likewise.
577 (tst-stackguard1-ARGS): Likewise.
579 2012-10-21 Jim Blandy <jimb@codesourcery.com>
580 Joseph Myers <joseph@codesourcery.com>
582 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
583 tst-cancel-wrappers.sh.
584 * tst-cancel-wrappers.sh: Use nm program given as first argument,
587 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
589 * tst-cond25.c (do_test_wait): Don't check for return value from
592 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
596 (__condvar_tw_cleanup): Adjust the mutex data structure if it
597 was locked by FUTEX_WAIT_REQUEUE_PI.
598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
599 (__condvar_w_cleanup): Likewise.
600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
601 (__condvar_cleanup2): Likewise.
602 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
603 (__condvar_cleanup1): Likewise.
605 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
607 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
608 defined __EXCEPTIONS) && defined __USE_GNU]
609 (pthread_cleanup_push_defer_np): Fix formatting.
611 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
614 * Makefile (tests): New test case tst-cond25.
615 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
617 (__condvar_tw_cleanup): Lock mutex only if we don't already
619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
620 (__condvar_w_cleanup): Likewise.
621 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
623 (__condvar_cleanup2): Lock mutex only if we don't already
625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
626 (__condvar_cleanup1): Likewise.
627 * tst-cond25.c: New test case.
629 2012-10-09 Roland McGrath <roland@hack.frob.com>
631 * sysdeps/pthread/configure: Regenerated.
632 * sysdeps/x86_64/configure: Regenerated.
634 2012-10-05 David S. Miller <davem@davemloft.net>
637 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
638 (DB_THREAD_SELF): Use constants for the register offsets. Correct
639 the case of a 64-bit debugger with a 32-bit inferior.
641 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
644 * Makefile (tests-static): Add tst-cancel24-static,
645 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
646 tst-sem11-static and tst-sem12-static.
648 (LDLIBS-tst-cancel24-static): New macro.
649 * tst-cancel24-static.cc: New file.
650 * tst-cond8-static.c: Likewise.
651 * tst-mutex8-static.c: Likewise.
652 * tst-mutexpi8-static.c: Likewise.
653 * tst-sem11-static.c: Likewise.
654 * tst-sem12-static.c: Likewise.
656 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
659 * Makefile (tests): New test case tst-cond24.
660 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
661 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
662 (__pthread_cond_timedwait): Unlock mutex before going back to
664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
665 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
666 return from futex_wait.
667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
668 (__pthread_cond_timedwait): Unlock mutex before going back to
669 wait in PI case. Set requeue_pi flag only if wait returned 0.
670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
671 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
672 return from futex_wait.
673 * tst-cond24.c: New test case.
675 2012-10-04 Roland McGrath <roland@hack.frob.com>
677 * pthread_create.c (start_thread): Use __madvise, not madvise.
679 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
681 * sysdeps/i386/tls.h: Update copyright years.
683 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
685 * pthread_create.c (start_thread): Fix clone flag name in
686 comment to CLONE_CHILD_CLEARTID.
687 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
688 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
689 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
690 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
691 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
692 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
694 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
697 * Makefile (tests): Add tst-cond-except.
698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
699 (__pthread_cond_timedwait): Mark instructions where %ebx is
700 incremented in PI case.
701 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
702 for the marked PI case instructions.
703 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
704 (__pthread_cond_wait): Mark instructions where %ebx is
705 incremented in PI case.
706 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
707 for the marked PI case instructions.
708 * tst-cond-except.c: New test case.
710 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
712 * tst-tls6.sh: Add "set -e".
713 * Makefile: Do not specify -e option when running testsuite
716 * tst-tls6.sh: Add copyright header.
718 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
720 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
721 to uint64_t for 64-bit store.
722 (THREAD_SETMEM_NC): Likewise.
724 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
726 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
728 (THREAD_SETMEM_NC): Likewise.
730 2012-09-14 Jeff Law <law@redhat.com>
733 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
735 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
738 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
741 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
743 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
744 (LDLIBS-tst-cancel24): This.
746 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
749 * Makefile (tests-static): Add tst-cancel21-static.
751 * tst-cancel21-static.c: New file.
753 2012-09-01 Joseph Myers <joseph@codesourcery.com>
755 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
756 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
757 [__NR_clock_getres]: Make code unconditional.
758 (pthread_getcpuclockid): Remove code left unreachable by removal
761 2012-08-31 Joseph Myers <joseph@codesourcery.com>
764 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
765 atomic_compare_and_exchange_bool_rel.
766 * tst-sem14.c: New file.
767 * Makefile (tests): Add tst-sem14.
769 2012-08-15 Roland McGrath <roland@hack.frob.com>
771 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
773 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
774 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
776 2012-08-16 Joseph Myers <joseph@codesourcery.com>
778 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
779 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
780 * pthread_condattr_setclock.c (pthread_condattr_setclock)
781 [!__ASSUME_POSIX_TIMERS]: Likewise.
782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
783 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
784 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
785 [!__ASSUME_POSIX_TIMERS]: Likewise.
786 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
787 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
788 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
790 [!__NR-timer_create]: Remove conditional code.
791 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
792 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
794 [!__NR_timer_delete]: Remove conditional code.
795 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
796 * sysdeps/unix/sysv/linux/timer_getoverr.c
797 [__NR_timer_getoverrun]: Make code unconditional.
798 [!__NR_timer_getoverrun]: Remove conditional code.
799 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
800 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
801 Make code unconditional.
802 [!__NR_timer_gettime]: Remove conditional code.
803 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
804 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
805 Make code unconditional.
806 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
807 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
808 Make code unconditional.
809 [!__NR_timer_settime]: Remove conditional code.
810 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
812 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
815 2012-08-15 Tom de Vries <vries@codesourcery.com>
816 Maxim Kuvyrkov <maxim@codesourcery.com>
818 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
819 (__libc_lock_trylock): Allow pre-existing definitions.
821 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
823 * pthread_spin_lock.c: New file.
824 * pthread_spin_trylock.c: New file.
826 2012-08-08 Joseph Myers <joseph@codesourcery.com>
828 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
830 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
831 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
833 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
834 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
835 Make code unconditional.
836 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
837 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
838 __NR_tgkill]: Make code unconditional.
839 (raise) [__ASSUME_TGKILL]: Likewise.
840 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
841 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
842 [__ASSUME_TGKILL]: Make code unconditional.
843 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
844 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
845 __NR_tgkill]: Make code unconditional.
846 (raise) [__ASSUME_TGKILL]: Likewise.
847 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
849 2012-08-07 Joseph Myers <joseph@codesourcery.com>
851 * sysdeps/pthread/createthread.c (create_thread)
852 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
854 2012-08-03 Joseph Myers <joseph@codesourcery.com>
856 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
858 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
860 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
862 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
863 (pagesize): New static variable.
864 (allocate_and_test): Return MEM. Rename parameter to TARGET.
865 (check_stack_top): New local variables MEM and PAGEMASK. Cap
866 stack size to MAX_STACK_SIZE. Call allocate_and_test for
867 halfway up the stack top page. Verify that the top page was
869 (do_test): Get pagesize using sysconf.
871 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
873 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
875 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
876 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
879 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
881 * tst-pthread-getattr.c: Revert last change.
883 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
885 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
888 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
890 (check_stack_top): Read valued written into STACKADDR in
891 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
893 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
895 * nptl-init.c (sighandler_setxid): Fix the comment that
898 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
900 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
901 (__lll_robust_timedlock_wait): Simplify CFI directives.
903 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
906 * Makefile (tests): Add test case.
907 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
908 the __libc_stack_end page from stacksize. Truncate stacksize to
909 make it page aligned when it is computed from RLIMIT_STACK.
910 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
913 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
916 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
919 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
920 Jakub Jelinek <jakub@redhat.com>
923 * sysdeps/pthread/pthread.h
924 [!(defined __GNUC__ && defined __EXCEPTIONS)]
925 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
926 __libc_unlikely instead of __builtin_expect.
928 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
931 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
932 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
933 * sysdeps/unix/sysv/linux/i386/Implies: New file.
934 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
935 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
937 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
938 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
940 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
942 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
945 * nptl-init.c (pthread_functions): Remove use of INTUSE and
947 (__pthread_initialize_minimal_internal): Likewise.
948 * sem_open.c: Likewise.
949 * sem_unlink.c: Likewise.
950 * pthreadP.h: Replace _internal aliases by hidden_proto
952 * pthread_getspecific.c: Replace _internal alias by hidden_def.
953 * pthread_key_create.c: Likewise.
954 * pthread_mutex_destroy.c: Likewise.
955 * pthread_mutex_init.c: Likewise.
956 * pthread_mutex_lock.c: Likewise.
957 * pthread_mutex_unlock.c: Likewise.
958 * pthread_once.c: Likewise.
959 * pthread_rwlock_rdlock.c: Likewise.
960 * pthread_rwlock_unlock.c: Likewise.
961 * pthread_rwlock_wrlock.c: Likewise.
962 * pthread_setspecific.c: Likewise.
963 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
965 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
967 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
969 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
970 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
971 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
972 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
974 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
976 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
977 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
978 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
982 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
985 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
987 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
988 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
990 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
991 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
993 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
994 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
995 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
996 (pthread_barrier_wait): Likewise.
997 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
998 (__pthread_cond_broadcast): Likewise.
999 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1000 (__pthread_cond_signal): Likewise.
1001 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1002 (__pthread_cond_timedwait): Likewise.
1003 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1005 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1006 (__pthread_rwlock_rdlock): Likewise.
1007 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1008 (pthread_rwlock_timedrdlock): Likewise.
1009 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1010 (pthread_rwlock_timedwrlock): Likewise.
1011 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1012 (__pthread_rwlock_unlock): Likewise.
1013 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1014 (__pthread_rwlock_wrlock): Likewise.
1015 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1016 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1017 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1019 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1021 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1024 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1025 __libc_stack_end rounded to the end of containing page as the
1028 2012-05-25 Rayson Ho <rho@redhat.com>
1030 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1032 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1033 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1038 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1041 2012-05-25 Rayson Ho <rho@redhat.com>
1042 Roland McGrath <roland@hack.frob.com>
1044 * DESIGN-systemtap-probes.txt: New file.
1045 * pthread_cond_broadcast.c: SystemTap probes.
1046 * pthread_cond_init.c: Likewise.
1047 * pthread_cond_signal.c: Likewise.
1048 * pthread_cond_wait.c: Likewise.
1049 * pthread_cond_destroy.c: Likewise.
1050 * pthread_create.c: Likewise.
1051 * pthread_join.c: Likewise.
1052 * pthread_mutex_destroy.c: Likewise.
1053 * pthread_mutex_init.c: Likewise.
1054 * pthread_mutex_lock.c: Likewise.
1055 * pthread_mutex_timedlock.c: Likewise.
1056 * pthread_mutex_unlock.c: Likewise.
1057 * pthread_rwlock_destroy.c: Likewise.
1058 * pthread_rwlock_rdlock.c: Likewise.
1059 * pthread_rwlock_unlock.c: Likewise.
1060 * pthread_rwlock_wrlock.c: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1062 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1063 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1064 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1065 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1066 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1067 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1070 2012-05-24 Roland McGrath <roland@hack.frob.com>
1072 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1074 2012-05-17 Andreas Jaeger <aj@suse.de>
1076 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1077 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1078 only for older kernels.
1080 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1082 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1085 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1088 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1089 (lll_robust_lock): Likewise.
1090 (lll_cond_lock): Likewise.
1091 (lll_robust_cond_lock): Likewise.
1092 (lll_timedlock): Likewise.
1093 (lll_robust_timedlock): Likewise.
1094 (lll_unlock): Likewise.
1095 (lll_robust_unlock): Likewise.
1097 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1100 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1102 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1104 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1106 (__gcc_personality_v0): Replace 8-byte data alignment with
1107 LP_SIZE alignment and .quad with ASM_ADDR.
1109 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1111 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1113 (__gcc_personality_v0): Replace 8-byte data alignment with
1114 LP_SIZE alignment and .quad with ASM_ADDR.
1116 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1118 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1119 NWAITERS, which is unsigned long int.
1121 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1123 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1124 (__gcc_personality_v0): Replace 8-byte data alignment with
1125 LP_SIZE alignment and .quad with ASM_ADDR.
1127 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1130 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1131 __vdso_clock_gettime pointer into RAX_LP.
1132 (__gcc_personality_v0): Replace 8-byte data alignment with
1133 LP_SIZE alignment and .quad with ASM_ADDR.
1135 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1138 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1139 __vdso_clock_gettime pointer into RAX_LP.
1140 (__gcc_personality_v0): Replace 8-byte data alignment with
1141 LP_SIZE alignment and .quad with ASM_ADDR.
1143 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1145 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1146 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1148 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1150 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1151 to update pointer in memory. Load pointer into RDI_LP.
1153 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1155 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1156 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1158 (LLL_STUB_UNWIND_INFO_END): Likewise.
1159 (lll_timedlock): Load timeout pointer into RDX_LP.
1160 (lll_robust_timedlock): Likewise.
1162 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1163 Jakub Jelinek <jakub@redhat.com>
1166 * Makefile (tests): Add test cases.
1167 * descr.h (struct pthread): Add a comment describing multiple_threads.
1168 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1169 single-process case.
1170 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1171 before setting cancelstate of the thread.
1172 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1173 (__libc_multiple_threads): Add explanatory comment.
1174 * tst-cancel-self-cancelstate.c: New test case.
1175 * tst-cancel-self-canceltype.c: Likewise.
1176 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1177 * tst-cancel-self-testcancel.c: New test case.
1178 * tst-cancel-self.c: Likewise.
1179 * vars.c: Expand comment to include single-process case.
1181 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1183 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1184 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1187 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1189 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1191 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1192 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1194 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1196 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1197 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1198 * sysdeps/x86_64/x32/shlib-versions: New file.
1200 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1202 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1203 __SIZEOF_PTHREAD_XXX_T.
1204 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1205 (pthread_mutex_t): Likewise.
1206 (pthread_rwlock_t): Likewise.
1207 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1210 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1212 * sysdeps/x86_64/x32/tls.h: New file.
1214 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1216 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1218 (THREAD_SETMEM_NC): Likewise.
1220 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1222 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1225 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1227 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1228 (__cleanup_fct_attribute): Check __x86_64__ instead of
1231 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1233 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1234 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1235 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1236 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1237 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1239 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1241 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1242 instead of __WORDSIZE.
1244 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1247 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1249 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1251 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1252 (__pthread_cond_timedwait): Use CFI directives.
1253 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1254 (__pthread_cond_wait): Likewise.
1255 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1256 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1258 2012-05-03 David S. Miller <davem@davemloft.net>
1260 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1261 always have to return 0, especially for the pthread_spin_init
1263 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1265 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1266 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1268 2012-05-02 David S. Miller <davem@davemloft.net>
1270 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1271 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1272 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1273 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1274 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1275 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1276 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1277 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1278 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1279 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1280 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1281 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1282 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1283 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1284 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1285 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1286 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1287 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1289 2012-05-02 Allan McRae <allan@archlinux.org>
1291 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1292 (LDFLAGS-tst-cancel24): Likewise.
1294 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1296 * sysdeps/i386/pthread_spin_lock.S: New.
1297 * sysdeps/i386/pthread_spin_lock.c: Delete.
1298 * sysdeps/x86_64/pthread_spin_lock.S: New.
1299 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1301 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1303 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1304 run when cross-compiling.
1306 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1308 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1309 instead of libgcc_s.h.
1311 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1313 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1315 2012-03-27 David S. Miller <davem@davemloft.net>
1317 * tst-cond16.c (do_test): Use a thread stack size which is either
1318 PTHREAD_STACK_MIN or the page size, whichever is larger.
1319 * tst-cond18.c (do_test): Likewise.
1321 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1323 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1324 register char * __asm__("rsp") to get stack frame.
1326 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1328 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1329 __NR_futex directly.
1331 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1333 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1336 2012-03-16 David S. Miller <davem@davemloft.net>
1339 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1341 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1344 2012-03-15 David S. Miller <davem@davemloft.net>
1347 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1349 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1352 * pt-crti.S: Replace FSF snail mail address with URL.
1354 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1356 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1357 Do not define before including <time.h>.
1359 2012-03-08 David S. Miller <davem@davemloft.net>
1361 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1363 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1365 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1366 Check for timestamp before the Epoch.
1368 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1371 * tst-sem13.c (do_test): Add another test case.
1372 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1373 Fix updating nwaiters.
1375 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1378 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1379 link test to a compile test.
1380 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1382 * sysdeps/pthread/configure: Regenerated.
1384 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1386 * Makefile (distribute): Remove variable.
1388 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1390 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1391 superfluous assignment.
1392 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1394 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1395 (sem_timedwait): Likewise.
1397 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1399 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1400 installed headers to...
1401 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1403 2012-03-06 David S. Miller <davem@davemloft.net>
1405 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1406 atomic_increment and remove unused local variable.
1407 (__old_sem_post): Likewise.
1409 2012-02-27 David S. Miller <davem@davemloft.net>
1411 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1412 non-existing __pthread_attr.
1413 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1414 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1415 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1416 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1419 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1421 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1423 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1425 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1427 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1428 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1429 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1430 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1431 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1433 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1436 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1438 [crti.S not in sysdirs] (omit-deps): Do not append.
1439 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1440 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1441 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1442 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1443 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1444 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1445 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1446 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1447 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1449 * sysdeps/pthread/pt-initfini.c: Remove file.
1451 2012-02-16 Richard Henderson <rth@twiddle.net>
1453 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1454 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1456 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1458 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1460 2012-02-16 David S. Miller <davem@davemloft.net>
1462 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1464 2012-02-15 Marek Polacek <polacek@redhat.com>
1466 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1468 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1470 Replace FSF snail mail address with URLs, as per GNU coding standards.
1472 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1474 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1476 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1478 Support crti.S and crtn.S provided directly by architectures.
1479 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1480 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1481 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1482 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1483 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1484 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1485 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1486 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1487 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1488 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1489 * pt-crti.S: New file.
1490 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1492 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1495 macros for PIC register setup.
1496 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1497 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1498 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1499 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1500 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1502 2012-01-11 Marek Polacek <polacek@redhat.com>
1504 * forward.c (FORWARD_NORETURN): Define macro.
1505 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1506 (__pthread_exit): Likewise.
1508 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1510 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1512 * pthreadP.h: Add noreturn to __pthread_exit.
1513 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1515 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1517 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1518 Call pthread_attr_setstacksize() with result of
1519 __pthread_get_minstack() to account for application TLS usage.
1521 2012-01-08 Marek Polacek <polacek@redhat.com>
1523 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1525 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1528 * pthreadP.h: Use const instead of __const.
1529 * semaphore.h: Likewise.
1530 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1531 * sysdeps/pthread/bits/sigthread.h: Likewise.
1532 * sysdeps/pthread/pthread.h: Likewise.
1534 * Makefile: Remove elf=yes test, only ELF is supported.
1536 * shlib-versions: Remove entries for ports architectures.
1538 In case anyone cares, the IA-64 architecture could move to ports.
1539 * sysdeps/ia64/*: Removed.
1540 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1542 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1544 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1545 __pthread_get_minstack.
1546 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1549 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1550 through __pthread_get_minstack.
1551 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1552 directly from _rtld_global_ro.
1553 (__pthread_get_minstack): New function.
1554 * pthreadP.h: Declare __pthread_get_minstack.
1555 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1557 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1560 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1561 Correct reading name from file.
1563 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1565 * allocatestack.c (allocate_stack): Return errno on failure.
1567 2011-12-14 Jeff Law <law@redhat.com>
1570 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1572 2011-11-28 Andreas Schwab <schwab@redhat.com>
1574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1575 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1578 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1580 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1583 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1587 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1588 path for kernels with FUTEX_CLOCK_REALTIME.
1589 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1591 2011-10-27 Andreas Schwab <schwab@redhat.com>
1594 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1595 for memory synchronization functions.
1596 * semaphore.h: Likewise.
1598 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1600 * tst-cancel7.c: Avoid warning.
1601 * tst-mutex6.c: Likewise.
1602 * tst-mutex9.c: Likewise.
1603 * tst-mutexpi6.c: Likewise.
1605 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1607 * sysdeps/i386/tls.h: Remove #include <list.h>.
1609 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1611 * pthread_create.c (start_thread): Call __ctype_init.
1613 2011-09-15 Andreas Schwab <schwab@redhat.com>
1615 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1617 (list_add): Add atomic_write_barrier.
1618 * descr.h: Define __need_list_t before including <list.h>.
1619 * nptl-init.c: Include <list.h>
1620 * allocatestack.c: Likewise.
1622 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1624 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1625 * sysdeps/ia64/tls.h: Likewise.
1626 * sysdeps/powerpc/tls.h: Likewise.
1627 * sysdeps/s390/tls.h: Likewise.
1628 * sysdeps/sh/tls.h: Likewise.
1629 * sysdeps/sparc/tls.h: Likewise.
1630 * sysdeps/x86_64/tls.h: Likewise.
1632 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1634 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1636 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1638 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1639 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1640 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1641 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1642 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1643 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1644 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1645 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1646 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1647 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1648 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1649 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1651 * tst-tls1.c: Support for __thread is now mandatory.
1652 * tst-tls2.c: Likewise.
1653 * tst-tls3.c: Likewise.
1654 * tst-tls3mod.c: Likewise.
1655 * tst-tls4.c: Likewise.
1656 * tst-tls4moda.c: Likewise.
1657 * tst-tls4modb.c: Likewise.
1658 * tst-tls5.h: Likewise.
1660 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1663 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1664 (pthread_rwlock_timedwrlock): Use correct macro in test.
1665 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1667 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1669 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1670 use gettimeofday vsyscall, just call gettimeofday.
1671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1672 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1673 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1675 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1678 Simplify __vdso_clock_gettime use.
1680 2011-09-05 David S. Miller <davem@davemloft.net>
1682 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1684 (sem_timedwait): Call it to force an exception region around
1685 the async cancel enable and the futex operation.
1686 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1687 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1688 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1689 (__new_sem_wait): Call it to force an exception region around
1690 the async cancel enable and the futex operation.
1691 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1692 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1694 2011-08-31 Andreas Schwab <schwab@redhat.com>
1696 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1699 2011-08-20 David S. Miller <davem@davemloft.net>
1701 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1703 2011-08-14 Roland McGrath <roland@hack.frob.com>
1705 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1706 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1708 2011-08-08 Andreas Schwab <schwab@redhat.com>
1710 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1715 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1717 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1719 (__gcc_personality_v0): Likewise.
1720 (_Unwind_ForcedUnwind): Likewise.
1721 (_Unwind_GetCFA): Likewise.
1723 2011-07-14 Roland McGrath <roland@hack.frob.com>
1725 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1728 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1730 * nptl-init.c (__nptl_set_robust): New function.
1731 (pthread_functions): Add reference.
1732 * npthreadP.h: Declare __nptl_set_robust.
1733 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1734 ptr_set_robust member.
1735 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1736 child if threads are used.
1738 2011-06-14 Andreas Jaeger <aj@suse.de>
1740 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1742 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1745 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1747 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1750 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1752 Patch partly by Robert Rex <robert.rex@exasol.com>.
1754 2011-01-19 Roland McGrath <roland@redhat.com>
1756 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1757 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1758 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1759 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1760 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1761 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1763 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1765 * Makefile (test-extras): Add tst-cleanup4aux.
1767 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1770 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1771 (__SETXID_2): Likewise.
1772 (__SETXID_3): Likewise.
1774 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1777 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1778 * alloca_cutoff.c: Add libc_hidden_def.
1780 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1783 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1784 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1785 of "struct pthread".
1787 2010-09-21 Andreas Schwab <schwab@redhat.com>
1789 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1790 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1791 (pthread_cleanup_push_defer_np): Likewise.
1793 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1795 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1798 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1799 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1801 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1802 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1804 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1806 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1808 2010-05-01 Alan Modra <amodra@gmail.com>
1810 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1811 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1812 to save temps. Correct cfi for possible later frame manipulation.
1813 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1814 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1815 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1816 (DOCARGS_6, UNDOCARGS_6): Likewise.
1817 (CENABLE, CDISABLE): Add nops for non-shared calls.
1819 2010-07-06 Andreas Schwab <schwab@redhat.com>
1821 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1824 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1826 * tst-abstime.c (do_test): Some more cleanups
1828 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1830 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1832 2010-07-01 Andreas Schwab <schwab@redhat.com>
1833 Ulrich Drepper <drepper@redhat.com>
1835 * Makefile (tests): Add tst-abstime.
1836 * tst-abstime.c: New file.
1837 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1838 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1839 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1840 (__lll_timedlock_wait): Likewise.
1841 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1842 (__lll_robust_timedlock_wait): Likewise.
1843 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1844 (__pthread_cond_timedwait): Likewise.
1845 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1846 (pthread_rwlock_timedrdlock): Likewise.
1847 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1848 (pthread_rwlock_timedwrlock): Likewise.
1849 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1852 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1854 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1856 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1858 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1859 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1861 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1864 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1865 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1866 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1868 * Makefile (libpthread-routines): Add pthread_getname and
1870 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1872 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1874 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1875 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1876 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1877 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1879 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1881 * pthread_cond_timedwait.c: Add check for
1882 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1883 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1886 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1888 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1889 and the call fails wake eventually waiting setxid threads. Don't free
1890 stack here if we try starting a thread.
1891 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1892 if the clone call failed.
1894 2010-03-08 Andreas Schwab <schwab@redhat.com>
1896 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1897 * allocatestack.c (get_cached_stack): Set setxid_futex.
1898 (allocate_stack): Likewise.
1900 2010-03-05 Andreas Schwab <schwab@redhat.com>
1901 Ulrich Drepper <drepper@redhat.com>
1903 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1904 it is creating a thread or it is just being created.
1905 * pthread_create.c (start_thread): Wake setxid thread if it is
1907 (__pthread_create_2_1): Initialize setxid_futex.
1908 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1911 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1917 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1920 Fix pthread_cond_timedwait with requeue-PI.
1921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1922 Fix pthread_cond_wait with requeue-PI.
1924 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1926 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1927 and pthread_mutexattr_setrobust for GLIBC_2.12.
1928 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1929 * pthread_mutexattr_getrobust.c: Define alias
1930 pthread_mutexattr_getrobust.
1931 * pthread_mutexattr_setrobust.c: Define alias
1932 pthread_mutexattr_setrobust.
1934 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1936 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1938 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1940 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1942 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1944 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1945 call __gmon_start__.
1946 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1948 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1950 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1953 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1955 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1956 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1958 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1961 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1964 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1966 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1967 Don't update nwaiters after invalid timeout is recognized.
1969 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1971 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1974 2009-11-27 Andreas Schwab <schwab@redhat.com>
1976 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1977 THREAD_SELF->cancelhandling after returning from futex call.
1979 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1981 * tst-sem13.c: New file.
1982 * Makefile (tests): Add tst-sem13.
1984 2009-11-22 Roland McGrath <roland@redhat.com>
1986 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1987 instead of recapitulating its contents.
1989 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1992 optimizations and cleanups.
1994 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1997 Remove redundant code. Fix cfi offsets.
1998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2001 2009-11-17 Ulrich Drepper <drepper@redhat.com>
2003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2004 reduce size of unwind info.
2006 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2009 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2011 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2014 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2016 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2018 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2020 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2023 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2024 steps to avoid races with creation and terminations.
2025 * nptl-init.c (sighandler_setxid): Adjust.
2026 Patch by Daniel Jacobowitz.
2028 2009-09-07 Andreas Schwab <schwab@redhat.com>
2030 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2032 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2033 Joseph Myers <joseph@codesourcery.com>
2036 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2037 Initialize the sigev_notify field for newly created timer to make sure
2038 the timer gets deleted from the active timer's list upon timer_delete.
2040 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2042 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2043 Correct a logic error.
2045 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2047 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2048 of the field in local variables.
2049 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2050 variable and don't unconditionally clear it.
2052 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2054 * pthread_create.c (start_thread): Hint to the kernel that memory for
2055 the stack can be reused. We do not mark all the memory. The part
2056 still in use and some reserve are kept.
2058 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2060 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2062 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2064 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2067 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2069 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2071 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2073 2009-08-10 Andreas Schwab <schwab@redhat.com>
2075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2076 (__pthread_cond_signal): Don't clobber register used for syscall
2079 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2081 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2082 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2085 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2088 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2090 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2091 enabled by the special *_asynccancel functions.
2092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2093 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2095 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2097 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2099 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2100 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2101 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2102 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2103 since we can assume the special __*_{en,dis}able_asynccancel
2105 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2106 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2107 and PTHREAD_CANCELED.
2109 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2111 * descr.h: Better definition of *_BITMASK macros for cancellation.
2113 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2115 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2117 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2118 dynamic linker might have to save.
2119 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2120 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2123 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2125 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2127 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2129 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2130 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2132 requeue_pi for robust mutexes.
2133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2134 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2135 Don't only skip __pthread_mutex_cond_lock. Call instead
2136 __pthread_mutex_cond_lock_adjust.
2137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2139 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2140 optimization of PI mutex handling.
2142 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2145 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2146 instead of of _acq variants of cmpxchg.
2148 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2150 * sysdeps/x86_64/configure.in: New file.
2152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2153 path when not using absolute timeout futex.
2155 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2158 optimizations of last changes.
2159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2161 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2164 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2166 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2169 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2173 (__pthread_cond_timedwait): Make more robust.
2175 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2177 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2178 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2179 directly use absolute timeout.
2181 * tst-sem5.c (do_test): Add test for premature timeout.
2182 * Makefile: Linu tst-sem5 with librt.
2184 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2185 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2186 directly use absolute timeout.
2187 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2188 (pthread_rwlock_timedrdlock): Likewise.
2190 * tst-cond11.c (run_test): Add test to check that the timeout is
2193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2194 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2195 directly use absolute timeout.
2197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2198 (__pthread_cond_wait): Convert to using exception handler instead of
2199 registered unwind buffer.
2200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2201 (__pthread_cond_timedwait): Likewise.
2203 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2205 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2206 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2207 use absolute timeout.
2209 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2210 handling of uncontested semaphore.
2212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2213 (__condvar_cleanup): Rewrite to use cfi directives instead of
2214 hand-coded unwind tables.
2215 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2217 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2218 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2221 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2223 * Makefile (libpthread-routines): Add pthread_sigqueue.
2224 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2225 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2226 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2228 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2231 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2232 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2234 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2236 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2238 * libc-cancellation.c: Move __libc_cleanup_routine to...
2239 * libc-cleanup.c: ...here. New file.
2240 * Makefile (routines): Add libc-cleanup.
2242 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2244 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2245 * sysdeps/pthread/librt-cancellation.c: Likewise.
2248 * nptl-init.c: Renamed from init.c.
2249 * Makefile: Change all occurences of init.c to nptl-init.c.
2251 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2253 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2254 to test when deciding on the delay.
2255 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2256 * pthread_cancel.c: Close race between deciding on sending a signal
2257 and setting the CANCELING_BIT bit.
2259 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2261 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2263 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2265 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2267 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2268 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2269 * sysdeps/i386/tls.h: Likewise.
2270 (tcbhead_t): Add __private_tm member.
2272 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2274 * sem_open.c (sem_open): Rewrite initialization of initsem to
2277 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2278 Avoid warning by using may_alias attribute on ptrhack.
2280 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2283 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2284 Check policy and priority for validity.
2285 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2287 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2290 (__pthread_cond_timedwait): Change to use cfi directives instead of
2291 hand-coded unwind sections.
2293 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2295 * init.c (nptl_freeres): Compile only for SHARED.
2297 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2299 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2300 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2301 FUTEX_BITSET_MATCH_ANY.
2303 2009-02-27 Roland McGrath <roland@redhat.com>
2305 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2306 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2308 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2310 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2311 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2312 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2315 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2317 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2320 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2322 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2323 Unify name of include protector macro.
2325 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2327 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2328 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2330 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2332 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2335 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2336 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2337 * init.c (nptl_freeres): New function.
2338 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2339 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2340 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2342 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2343 load DSO. Assign last.
2344 (__unwind_freeres): New function.
2346 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2347 for better debugging. No need to use stack_list_add here.
2349 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2351 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2352 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2353 instead of computing relative timeout.
2354 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2355 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2357 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2359 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2361 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2363 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2364 (list_add_tail): Removed.
2366 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2368 * (in_flight_stack): New variable.
2369 (stack_list_del): New function. Use instead of list_del.
2370 (stack_list_add): New function. Use instead of list_add when adding to
2371 stack_cache and stack_used lists.
2372 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2373 when the fork call interrupted another thread.
2375 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2377 * init.c (__pthread_initialize_minimal_internal): Optimize test
2378 FUTEX_CLOCK_REALTIME a bit.
2380 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2382 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2383 only passing five parameters to FUTEX_WAIT_BITSET call.
2385 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2386 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2387 instead of computing relative timeout.
2389 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2391 * init.c (__pthread_initialize_minimal_internal): Check for
2392 FUTEX_CLOCK_REALTIME flag.
2393 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2394 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2398 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2399 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2400 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2401 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2402 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2404 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2406 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2407 loop body instead of ; to avoid gcc warnings.
2408 (pthread_cleanup_pop_restore_np): Likewise.
2409 Patch by Caolán McNamara <caolanm@redhat.com>.
2411 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2413 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2414 fast path here, for robust/PI/PP mutexes call
2415 __pthread_mutex_lock_full. Don't use switch, instead use a series
2416 of ifs according to their probability.
2417 (__pthread_mutex_lock_full): New function.
2418 * pthread_mutex_unlock.c: Include assert.h.
2419 (__pthread_mutex_unlock_usercnt): Handle only the
2420 fast path here, for robust/PI/PP mutexes call
2421 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2422 of ifs according to their probability.
2423 (__pthread_mutex_unlock_full): New function.
2424 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2425 (__pthread_mutex_lock_full): Define.
2427 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2429 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2430 implementation. Add necessary padding and.
2431 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2434 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2436 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2437 and FUTEX_WAKE_BITSET.
2439 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2441 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2442 and FUTEX_WAKE_BITSET.
2443 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2444 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2445 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2446 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2448 2008-11-25 Roland McGrath <roland@redhat.com>
2450 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2451 Subdirectories moved to ports repository as
2452 sysdeps/.../nptl subdirectories.
2454 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2457 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2459 * pthread_cond_init.c (__pthread_cond_init): Fix
2460 cond->__data.__nwaiters initialization.
2461 * Makefile (tests): Add tst-cond23.
2462 * tst-cond23.c: New test.
2464 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2466 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2468 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2471 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2474 * pthread_mutex_lock.c: Add support for private PI mutexes.
2475 * pthread_mutex_timedlock.c: Likewise.
2476 * pthread_mutex_trylock.c: Likewise.
2477 * pthread_mutex_unlock.c: Likewise.
2478 Patch mostly by Ben Jackson <ben@ben.com>.
2480 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2483 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2484 Increase stack size for helper thread.
2486 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2488 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2489 assembly with a clobber list for access registers a0 and a1.
2491 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2493 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2494 to force runp->refcntr to be read from memory.
2496 2008-09-08 Richard Guenther <rguenther@suse.de>
2498 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2499 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2500 lll_timedlock, lll_robust_timedlock, lll_unlock,
2501 lll_robust_unlock): Promote private to int.
2503 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2505 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2506 ARCH_RETRY_MMAP definitions.
2507 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2508 Define MAP_STACK when not defined.
2509 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2510 handling of ARCH_RETRY_MMAP.
2512 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2514 * tst-align2.c (f): Print message that f is reached.
2516 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2519 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2520 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2522 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2524 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2525 SOCK_CLOEXEC if possible.
2527 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2529 * Makefile (tests): Add tst-rwlock2a.
2530 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2531 * tst-rwlock2a.c: New file.
2533 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2535 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2537 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2539 * sysdeps/pthread/pthread.h: Fix typo in comment.
2541 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2543 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2544 of CPU set to the kernel.
2546 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2548 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2555 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2557 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2559 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2561 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2563 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2565 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2568 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2570 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2572 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2574 David S. Miller <davem@davemloft.net>
2576 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2578 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2581 __pshared correctly.
2582 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2584 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2590 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2592 2008-04-14 David S. Miller <davem@davemloft.net>
2594 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2595 (__old_sem_wait): Fix argument to lll_futex_wait().
2597 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2599 * pthread_create.c: Require pthread_mutex_trylock and
2600 pthread_key_delete for libgcc.
2602 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2605 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2606 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2607 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2609 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2611 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2612 <linux/limits.h> has defined it.
2613 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2614 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2615 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2616 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2618 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2620 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2622 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2623 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2625 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2627 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2628 HAVE_DL_DISCOVER_OSVERSION.
2629 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2630 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2632 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2635 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2636 _POSIX_CHOWN_RESTRICTED value to zero.
2638 2008-01-31 Roland McGrath <roland@redhat.com>
2640 * Makefile (omit-deps): Variable removed.
2642 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2644 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2645 unnecessary addr32 prefix.
2647 2008-01-29 Roland McGrath <roland@redhat.com>
2649 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2651 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2653 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2655 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2657 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2659 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2660 (__lll_lock_wait_private): Fix typo.
2661 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2662 (pthread_barrier_wait): Likewise. Adjust XADD use.
2663 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2665 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2666 (pthread_rwlock_timedrdlock): Return correct return value.
2667 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2668 (pthread_rwlock_timedwrlock): Likewise.
2670 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2672 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2673 thread returns the program exits with an error code.
2675 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2677 * pthread-errnos.sym: Add EOVERFLOW.
2678 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2679 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2680 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2681 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2683 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2685 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2686 parameter. Passed it as permission to mmap.
2687 * allocatestack.c (allocate_stack): Pass prot as second parameter
2690 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2692 * tst-basic7.c: Allocate memory for the stack.
2695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2696 (__pthread_cond_timedwait): Don't use VDSO.
2697 Patch by Michal Januszewski.
2699 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2702 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2703 Allow label before pthread_cleanup_pop.
2704 (pthread_cleanup_pop_restore_np): Likewise.
2706 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2708 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2709 Store 2 before returning ETIMEDOUT.
2711 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2713 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2714 Store 2 before returning ETIMEDOUT.
2715 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2716 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2717 (__lll_lock_wait_private): Optimize.
2718 (__lll_lock_wait): Likewise.
2720 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2722 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2723 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2724 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2726 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2729 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2730 If we time out, try one last time to lock the futex to avoid
2731 losing a wakeup signal.
2732 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2733 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2736 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2739 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2742 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2743 mmap failed to EAGAIN.
2744 * Makefile (tests): Add tst-basic7.
2745 * tst-basic7.c: New file.
2747 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2749 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2750 Use __linkin_atfork.
2752 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2754 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2755 missing line continuations.
2756 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2757 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2759 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2762 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2763 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2764 (struct timer): Add next element.
2765 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2766 enqueue timer structure into __active_timer_sigev_thread list.
2767 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2768 remove timer struct from __active_timer_sigev_thread.
2769 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2770 Before using timer structure make sure it is still on the
2771 __active_timer_sigev_thread list. Keep lock until done.
2772 Define __active_timer_sigev_thread and
2773 __active_timer_sigev_thread_lock.
2775 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2777 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2778 Redefine thread_atfork for use of ATFORK_MEM.
2779 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2780 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2782 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2783 Use atomic operation when removing first element of list.
2785 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2787 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2788 routine instead of an alias to __new_sem_post.
2790 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2792 * init.c (__pthread_initialize_minimal): Initialize word to appease
2795 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2797 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2798 libc.so just clear NAME.
2799 (__libc_rwlock_fini): Nop inside of libc.so.
2800 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2803 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2805 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2806 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2808 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2810 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2813 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2814 reclaimed stack if necessary.
2815 * Makefile (tests): Add tst-tsd6.
2816 * tst-tsd6.c: New file.
2818 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2820 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2821 Add private argument.
2823 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2825 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2826 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2828 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2830 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2831 (__lll_robust_timedlock): Pass private as last argument to
2832 __lll_robust_timedlock_wait.
2833 (__lll_unlock): Fix a pasto.
2835 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2837 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2838 sparc_old_sem): New structs.
2839 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2840 (__sem_wait_cleanup): New function.
2841 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2842 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2843 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2845 (__old_sem_wait): New function.
2846 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2847 nptl/sysdeps/unix/sysv/linux/sparc version.
2848 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2850 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2851 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2852 (__new_sem_trywait): Use sparc_old_sem structure.
2853 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2854 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2855 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2856 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2857 lll_futex_timed_wait.
2858 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2859 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2860 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2862 (__old_sem_post): New function.
2863 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2864 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2865 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2866 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2867 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2868 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2870 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2872 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2873 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2874 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2875 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2876 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2877 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2878 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2880 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2881 kernel-features.h and tcb-offsets.h.
2882 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2883 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2885 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2887 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2888 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2890 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2891 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2892 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2894 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2895 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2896 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2898 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2900 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2901 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2902 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2903 lll_futex_timed_wait.
2905 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2906 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2907 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2908 __lll_robust_unlock, __lll_wait_tid): Likewise.
2910 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2912 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2915 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2916 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2917 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2919 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2920 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2923 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2924 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2925 process private. Switch DW_CFA_advance_loc1 and some
2926 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2928 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2929 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2930 process private. Switch DW_CFA_advance_loc{1,2} and some
2931 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2932 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2933 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2934 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2937 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2938 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2940 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2941 (__pthread_cond_broadcast): Compare %r8 instead of
2942 dep_mutex-cond_*(%rdi) with $-1.
2943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2944 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2947 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2949 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2951 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2953 * allocatestack.c: Include kernel-features.h.
2954 * pthread_create.c: Likewise.
2955 * pthread_mutex_init.c: Likewise.
2957 * pthread_cond_timedwait.c: Likewise.
2958 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2959 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2960 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2961 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2964 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2966 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2968 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2969 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2970 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2971 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2973 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2975 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2976 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2977 byte elements. One of them is the new __shared element.
2978 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2979 adjust names of other padding elements.
2980 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2981 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2982 byte elements. One of them is the new __shared element.
2983 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2984 adjust names of other padding elements.
2985 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2986 Renamed __pad1 element to __shared, adjust names of other padding
2988 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2989 (pthread_rwlock_t): Likewise.
2990 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2993 2007-08-09 Anton Blanchard <anton@samba.org>
2995 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2997 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2999 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3000 <kernel-features.h>.
3001 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3003 2007-08-11 Ulrich Drepper <drepper@redhat.com>
3005 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3006 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3007 dealing with robust mutexes.
3008 * pthread_mutex_timedlock.c: Likewise.
3009 * pthread_mutex_trylock.c: Likewise.
3010 * pthread_mutex_unlock.c: Likewise.
3011 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3013 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3015 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3016 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3017 (PTHREAD_MUTEX_PSHARED): Define.
3018 * pthread_mutex_init.c (__pthread_mutex_init): Set
3019 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3021 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3022 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3023 as second argument to lll_lock.
3024 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3025 instead of its __data.__lock field.
3026 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3027 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3029 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3030 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3031 instead of mutex->__data.__kind directly, pass
3032 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3033 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3034 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3035 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3036 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3037 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3038 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3039 of mutex->__data.__kind directly.
3040 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3041 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3042 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3043 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3044 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3045 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3047 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3048 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3049 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3051 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3052 Take mutex as argument instead of its __data.__lock field, pass
3053 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3054 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3055 __data.__lock field.
3056 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3057 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3058 to lll_robust_cond_lock.
3059 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3060 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3061 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3062 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3063 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3064 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3066 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3067 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3069 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3070 pshared variable, pass it to lll_lock, lll_unlock,
3071 lll_futex_timedwait and lll_futex_wake.
3072 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3073 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3075 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3076 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3078 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3079 lll_futex_wake_unlock): Likewise.
3080 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3082 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3083 lll_futex_wake_unlock): Likewise.
3084 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3086 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3087 lll_futex_wake_unlock): Likewise.
3088 (lll_futex_wake): Fix a typo.
3089 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3091 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3092 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3093 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3095 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3096 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3098 (__pthread_cond_timedwait): Likewise.
3099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3100 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3102 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3104 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3105 Don't use CGOTSETUP and CGOTRESTORE macros.
3106 (CGOTSETUP, CGOTRESTORE): Remove.
3107 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3110 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3112 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3113 definitions for private futexes.
3114 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3115 kernel-features.h and lowlevellock.h. Use private futexes if
3117 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3118 (__lll_mutex_lock_wait): Rename to
3119 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3120 (__lll_mutex_timedlock_wait): Rename to ...
3121 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3122 Don't compile in for libc.so.
3123 (__lll_mutex_unlock_wake): Rename to ...
3124 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3125 (__lll_timedwait_tid): Use __NR_gettimeofday.
3126 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3127 the header from assembler. Renamed all lll_mutex_* resp.
3128 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3129 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3130 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3132 (__lll_lock_wait_private): Add prototype.
3133 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3134 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3135 __lll_unlock_wake): Likewise.
3136 (lll_lock): Add private argument. Call __lll_lock_wait_private
3137 if private is constant LLL_PRIVATE.
3138 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3139 lll_timedlock, lll_robust_timedlock): Add private argument.
3140 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3141 if private is constant LLL_PRIVATE.
3142 (lll_robust_unlock, lll_robust_dead): Add private argument.
3143 (lll_lock_t): Remove.
3144 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3145 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3146 lll_cond_wake, lll_cond_broadcast): Remove.
3147 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3148 kernel-features.h and lowlevellock.h.
3149 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3150 (LOAD_FUTEX_WAIT): Define.
3151 (__lll_robust_mutex_lock_wait): Rename to ...
3152 (__lll_robust_lock_wait): ... this. Add private argument.
3153 Use LOAD_FUTEX_WAIT macro.
3154 (__lll_robust_mutex_timedlock_wait): Rename to ...
3155 (__lll_robust_timedlock_wait): ... this. Add private argument.
3156 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3157 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3159 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3160 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3161 __lll_mutex_{lock,unlock}_*.
3162 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3163 lowlevellock.h and pthread-errnos.h.
3164 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3165 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3166 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3167 __lll_mutex_{lock,unlock}_*.
3168 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3169 lowlevellock.h and pthread-errnos.h.
3170 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3171 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3172 __lll_mutex_{lock,unlock}_*.
3173 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3175 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3176 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3177 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3178 (__condvar_tw_cleanup): Likewise.
3179 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3181 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3182 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3183 __lll_mutex_{lock,unlock}_*.
3184 ( __condvar_w_cleanup): Likewise.
3185 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3186 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3189 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3190 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3191 __lll_mutex_{lock,unlock}_*.
3192 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3194 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3195 FUTEX_PRIVATE_FLAG): Remove.
3196 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3197 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3200 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3201 FUTEX_PRIVATE_FLAG): Remove.
3202 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3203 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3206 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3207 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3208 __lll_mutex_{lock,unlock}_*.
3209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3211 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3212 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3213 __lll_mutex_{lock,unlock}_*.
3214 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3215 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3216 (__new_sem_post): Use standard initial exec code sequences.
3217 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3219 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3220 FUTEX_PRIVATE_FLAG): Remove.
3221 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3222 exec code sequences.
3223 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3224 (__new_sem_trywait): Use standard initial exec code sequences.
3225 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3226 (__new_sem_wait): Use standard initial exec code sequences.
3228 2007-07-31 Anton Blanchard <anton@samba.org>
3230 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3231 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3232 atomic_full_barrier.
3234 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3236 * allocatestack.c (stack_cache_lock): Change type to int.
3237 (get_cached_stack, allocate_stack, __deallocate_stack,
3238 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3239 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3240 as second argument to lll_lock and lll_unlock macros on
3242 * pthread_create.c (__find_in_stack_list): Likewise.
3243 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3244 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3246 * descr.h (struct pthread): Change lock and setxid_futex field
3248 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3249 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3250 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3251 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3253 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3254 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3255 * pthreadP.h (__attr_list_lock): Change type to int.
3256 * pthread_attr_init.c (__attr_list_lock): Likewise.
3257 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3258 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3260 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3261 also for lll_futex_{wake,wait}.
3262 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3264 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3265 LLL_SHARED as second argument to lll_{,un}lock.
3266 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3267 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3268 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3269 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3271 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3272 as second argument to lll_{,un}lock macros on pd->lock.
3273 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3274 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3275 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3276 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3278 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3280 * pthread_once.c (once_lock): Change type to int.
3281 (__pthread_once): Pass LLL_PRIVATE as second argument to
3282 lll_{,un}lock macros on once_lock.
3283 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3284 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3285 rwlock->__data.__shared as second argument to them and similarly
3287 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3289 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3291 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3292 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3293 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3294 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3295 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3296 to lll_{,un}lock macros on __sem_mappings_lock.
3297 * sem_open.c (check_add_mapping): Likewise.
3298 (__sem_mappings_lock): Change type to int.
3299 * semaphoreP.h (__sem_mappings_lock): Likewise.
3300 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3301 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3302 instead of lll_*mutex_*, pass LLL_SHARED as last
3304 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3305 pass LLL_SHARED as last argument.
3306 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3307 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3308 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3309 pass LLL_SHARED as last argument.
3310 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3311 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3312 LLL_SHARED as last argument.
3313 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3314 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3316 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3317 __libc_lock_lock_recursive, __libc_lock_unlock,
3318 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3319 argument to lll_{,un}lock.
3320 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3321 _IO_lock_unlock): Likewise.
3322 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3324 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3325 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3327 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3328 free_mem): Likewise.
3329 (__fork_lock): Change type to int.
3330 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3331 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3332 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3334 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3335 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3336 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3338 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3339 pass it through to lll_futex_*wait, only compile in when
3341 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3342 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3343 argument and pass it through to lll_futex_*wait.
3344 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3345 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3346 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3347 inline functions to __lll_* resp. __lll_robust_*.
3348 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3349 (lll_mutex_dead): Add private argument.
3350 (__lll_lock_wait_private): New prototype.
3351 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3352 __lll_robust_lock_timedwait): Add private argument to prototypes.
3353 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3354 call __lll_lock_wait_private, otherwise pass private to
3356 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3357 __lll_robust_timedlock): Add private argument, pass it to
3358 __lll_*wait functions.
3359 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3360 call __lll_unlock_wake_private, otherwise pass private to
3362 (__lll_robust_unlock): Add private argument, pass it to
3363 __lll_robust_unlock_wake.
3364 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3365 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3366 argument, pass it through to __lll_* inline function.
3367 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3368 (lll_lock_t): Remove.
3369 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3370 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3371 lll_cond_wake, lll_cond_broadcast): Remove.
3372 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3373 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3374 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3375 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3377 the header from assembler. Renamed all lll_mutex_* resp.
3378 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3379 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3380 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3381 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3382 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3383 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3384 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3386 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3387 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3388 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3389 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3390 MULTIPLE_THREADS_OFFSET as another asm operand.
3391 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3392 MULTIPLE_THREADS_OFFSET as last asm operand, call
3393 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3394 otherwise pass private as another argument to __lll_lock_wait.
3395 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3396 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3397 private as another argument to __lll_*lock_wait call.
3398 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3399 MULTIPLE_THREADS_OFFSET as another asm operand, call
3400 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3401 otherwise pass private as another argument to __lll_unlock_wake.
3402 (lll_robust_unlock): Add private argument, pass private as another
3403 argument to __lll_unlock_wake.
3404 (lll_robust_dead): Add private argument, use __lll_private_flag
3406 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3407 LLL_MUTEX_LOCK_INITIALIZER.
3408 (lll_lock_t): Remove.
3409 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3410 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3411 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3412 lll_cond_wake, lll_cond_broadcast): Remove.
3413 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3414 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3415 2007-05-2{3,9} changes.
3416 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3417 kernel-features.h and lowlevellock.h.
3418 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3419 (LOAD_FUTEX_WAIT): Rewritten.
3420 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3422 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3423 (__lll_mutex_lock_wait): Rename to ...
3424 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3425 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3426 (__lll_mutex_timedlock_wait): Rename to ...
3427 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3428 contains private argument. Don't compile in for libc.so.
3429 (__lll_mutex_unlock_wake): Rename to ...
3430 (__lll_unlock_wake): ... this. %ecx contains private argument.
3431 Don't compile in for libc.so.
3432 (__lll_timedwait_tid): Use __NR_gettimeofday.
3433 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3434 kernel-features.h and lowlevellock.h.
3435 (LOAD_FUTEX_WAIT): Define.
3436 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3438 (__lll_robust_mutex_lock_wait): Rename to ...
3439 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3440 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3442 (__lll_robust_mutex_timedlock_wait): Rename to ...
3443 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3444 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3445 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3447 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3448 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3449 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3450 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3451 to __lll_lock_wait in %edx.
3452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3453 Include lowlevellock.h and pthread-errnos.h.
3454 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3455 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3456 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3457 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3458 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3461 Include lowlevellock.h and pthread-errnos.h.
3462 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3463 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3464 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3465 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3466 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3469 Include lowlevellock.h.
3470 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3472 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3473 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3474 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3475 __lll_unlock_wake. Use __NR_gettimeofday.
3476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3477 Include lowlevellock.h.
3478 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3479 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3480 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3481 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3482 and __lll_unlock_wake.
3483 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3484 Include lowlevellock.h.
3485 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3486 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3487 MUTEX(%ebx) address in %edx rather than %ecx to
3488 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3489 and __lll_unlock_wake. Move return value from %ecx to %edx
3491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3492 Include lowlevellock.h.
3493 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3495 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3496 MUTEX(%ebp) address in %edx rather than %ecx to
3497 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3498 and __lll_unlock_wake. Move return value from %ecx to %edx
3499 register. Use __NR_gettimeofday.
3500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3501 Include lowlevellock.h.
3502 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3504 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3505 MUTEX(%ebp) address in %edx rather than %ecx to
3506 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3507 and __lll_unlock_wake. Move return value from %ecx to %edx
3508 register. Use __NR_gettimeofday.
3509 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3510 Include lowlevellock.h.
3511 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3512 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3513 MUTEX(%edi) address in %edx rather than %ecx to
3514 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3515 and __lll_unlock_wake.
3516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3517 Include lowlevellock.h.
3518 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3519 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3520 MUTEX(%ebx) address in %edx rather than %ecx to
3521 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3522 and __lll_unlock_wake. Move return value from %ecx to %edx
3524 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3526 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3528 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3529 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3530 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3532 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3533 (sem_timedwait): Use __NR_gettimeofday.
3534 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3536 (LOCK): Don't define.
3537 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3539 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3540 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3542 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3543 2007-05-2{3,9} changes.
3544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3545 kernel-features.h and lowlevellock.h.
3546 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3547 (LOAD_FUTEX_WAIT): Rewritten.
3548 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3549 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3550 (__lll_mutex_lock_wait): Rename to ...
3551 (__lll_lock_wait): ... this. %esi is now private argument.
3552 Don't compile in for libc.so.
3553 (__lll_mutex_timedlock_wait): Rename to ...
3554 (__lll_timedlock_wait): ... this. %esi contains private argument.
3555 Don't compile in for libc.so.
3556 (__lll_mutex_unlock_wake): Rename to ...
3557 (__lll_unlock_wake): ... this. %esi contains private argument.
3558 Don't compile in for libc.so.
3559 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3560 kernel-features.h and lowlevellock.h.
3561 (LOAD_FUTEX_WAIT): Define.
3562 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3563 (__lll_robust_mutex_lock_wait): Rename to ...
3564 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3565 Use LOAD_FUTEX_WAIT macro.
3566 (__lll_robust_mutex_timedlock_wait): Rename to ...
3567 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3568 private, use LOAD_FUTEX_WAIT macro.
3569 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3571 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3572 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3573 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3574 __lll_lock_wait and __lll_unlock_wake.
3575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3576 Include lowlevellock.h and pthread-errnos.h.
3577 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3578 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3579 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3580 pass LLL_SHARED in %esi to both __lll_lock_wait and
3582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3583 Include lowlevellock.h and pthread-errnos.h.
3584 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3585 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3586 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3587 pass LLL_SHARED in %esi to both __lll_lock_wait and
3589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3590 Include lowlevellock.h.
3591 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3592 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3593 pass LLL_SHARED in %esi to both __lll_lock_wait and
3595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3596 Include lowlevellock.h.
3597 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3598 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3599 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3600 and __lll_unlock_wake.
3601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3602 Include lowlevellock.h.
3603 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3605 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3606 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3607 and __lll_unlock_wake.
3608 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3609 Include lowlevellock.h.
3610 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3612 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3613 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3614 and __lll_unlock_wake.
3615 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3616 Include lowlevellock.h.
3617 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3619 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3620 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3621 and __lll_unlock_wake.
3622 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3623 Include lowlevellock.h.
3624 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3626 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3627 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3628 and __lll_unlock_wake.
3629 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3630 Include lowlevellock.h.
3631 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3633 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3634 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3635 and __lll_unlock_wake.
3636 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3638 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3640 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3641 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3642 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3644 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3645 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3647 (LOCK): Don't define.
3648 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3650 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3651 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3652 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3653 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3654 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3655 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3656 (__lll_lock_wait_private): New function.
3657 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3658 it to lll_futex_*wait. Don't compile in for libc.so.
3659 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3661 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3662 (struct sparc_pthread_barrier): Remove.
3663 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3664 struct sparc_pthread_barrier. Pass
3665 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3666 and lll_futex_wait macros.
3667 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3669 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3670 Include sparc pthread_barrier_wait.c instead of generic one.
3672 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3674 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3676 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3677 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3680 (pthread_rwlock_timedwrlock): Likewise.
3681 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3682 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3684 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3686 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3688 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3690 * tst-locale2.c (useless): Add return statement.
3692 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3694 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3695 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3696 * pthread_create.c (start_thread): Likewise.
3697 * init.c (sighandler_setxid): Likewise.
3698 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3699 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3700 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3701 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3702 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3703 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3704 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3705 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3706 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3708 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3710 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3712 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3713 __rtld_notify): Likewise.
3714 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3715 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3716 __pthread_once): Likewise.
3717 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3718 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3719 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3720 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3721 (lll_futex_wait): Add private argument, define as wrapper around
3722 lll_futex_timed_wait.
3723 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3724 use __lll_private_flag macro.
3725 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3726 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3727 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3728 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3729 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3730 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3731 (lll_futex_wait): Add private argument, define as wrapper around
3732 lll_futex_timed_wait.
3733 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3734 use __lll_private_flag macro.
3735 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3736 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3737 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3739 (lll_futex_timed_wait, lll_futex_wake): Use it.
3740 (lll_private_futex_wait, lll_private_futex_timed_wait,
3741 lll_private_futex_wake): Removed.
3742 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3743 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3744 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3745 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3746 (lll_futex_wait): Add private argument, define as wrapper around
3747 lll_futex_timed_wait.
3748 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3749 use __lll_private_flag macro.
3750 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3751 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3753 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3754 (lll_private_futex_wait, lll_private_futex_timed_wait,
3755 lll_private_futex_wake): Removed.
3756 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3757 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3758 (lll_private_futex_wait, lll_private_futex_timed_wait,
3759 lll_private_futex_wake): Removed.
3760 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3761 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3762 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3763 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3764 (lll_futex_wait): Add private argument, define as wrapper around
3765 lll_futex_timed_wait.
3766 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3767 use __lll_private_flag macro.
3768 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3769 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3771 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3773 (lll_futex_timed_wait, lll_futex_wake): Use it.
3774 (lll_private_futex_wait, lll_private_futex_timed_wait,
3775 lll_private_futex_wake): Removed.
3777 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3779 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3780 of the structure for sparc32.
3782 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3784 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3786 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3789 code used when private futexes are assumed.
3790 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3793 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3795 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3796 (__lll_private_flag): Define.
3797 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3798 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3800 (lll_private_futex_wait, lll_private_futex_timedwait,
3801 lll_private_futex_wake): Define as wrapper around non-_private
3803 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3804 (__lll_private_flag): Define.
3805 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3806 (lll_private_futex_wait, lll_private_futex_timedwait,
3807 lll_private_futex_wake): Define as wrapper around non-_private
3810 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3812 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3813 parameter to lll_futex_wait call.
3814 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3816 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3817 Replace lll_futex_wait with lll_private_futex_wait.
3818 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3819 Add LLL_SHARED parameter to lll_futex_wake().
3821 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3822 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3823 lll_private_futex_wake.
3824 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3825 bit from private parm before syscall.
3826 (lll_futex_timed_wait): Likewise.
3827 (lll_futex_wake): Likewise.
3828 (lll_futex_wake_unlock): Likewise.
3829 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3830 (lll_robust_mutex_unlock): Likewise.
3831 (lll_mutex_unlock_force): Likewise.
3832 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3834 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3836 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3837 compilation when unconditionally using private futexes.
3838 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3839 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3841 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3842 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3844 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3846 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3849 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3851 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3854 2007-05-16 Roland McGrath <roland@redhat.com>
3856 * init.c (__nptl_initial_report_events): New variable.
3857 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3860 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3862 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3863 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3865 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3867 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3870 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3872 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3873 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3874 * pthread_mutex_timedlock.c: Likewise.
3875 * pthread_mutex_trylock.c: Likewise.
3876 * pthread_mutex_unlock.c: Likewise.
3878 2007-06-17 Andreas Schwab <schwab@suse.de>
3880 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3883 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3885 * allocatestack.c (allocate_stack): Make code compile if
3886 __ASSUME_PRIVATE_FUTEX is set.
3888 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3891 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3892 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3893 (__pthread_rwlock_wrlock): Likewise.
3894 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3895 (pthread_rwlock_timedrdlock): Likewise.
3896 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3897 (pthread_rwlock_timedwrlock): Likewise.
3898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3899 (__pthread_rwlock_unlock): Likewise.
3901 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3903 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3904 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3905 Split __flags into __flags, __shared, __pad1 and __pad2.
3906 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3907 futexes if they are available.
3908 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3909 in libc-lowlevellock.S allow using private futexes.
3910 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3911 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3912 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3913 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3914 lll_private_futex_timed_wait and lll_private_futex_wake.
3915 (lll_robust_mutex_unlock): Fix typo.
3916 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3917 field in futex command setup.
3918 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3919 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3920 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3921 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3922 if they are available. Remove clear_once_control.
3923 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3924 futexes if they are available.
3925 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3926 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3927 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3928 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3929 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3930 Wake only when there are waiters.
3931 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3932 support. Indicate that there are waiters. Remove unnecessary
3933 extra cancellation test.
3934 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3935 left-over duplication of __sem_wait_cleanup.
3937 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3939 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3940 parameter to lll_futex_wait, lll_futex_timed_wait, and
3941 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3942 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3943 lll_private_futex_wake.
3944 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3945 * allocatestack.c: Adjust use of lll_futex_* macros.
3947 * lowlevellock.h: Likewise.
3948 * pthread_barrier_wait.c: Likewise.
3949 * pthread_cond_broadcast.c: Likewise.
3950 * pthread_cond_destroy.c: Likewise.
3951 * pthread_cond_signal.c: Likewise.
3952 * pthread_cond_timedwait.c: Likewise.
3953 * pthread_cond_wait.c: Likewise.
3954 * pthread_create.c: Likewise.
3955 * pthread_mutex_lock.c: Likewise.
3956 * pthread_mutex_setprioceiling.c: Likewise.
3957 * pthread_mutex_timedlock.c: Likewise.
3958 * pthread_mutex_unlock.c: Likewise.
3959 * pthread_rwlock_timedrdlock.c: Likewise.
3960 * pthread_rwlock_timedwrlock.c: Likewise.
3961 * pthread_rwlock_unlock.c: Likewise.
3962 * sysdeps/alpha/tls.h: Likewise.
3963 * sysdeps/i386/tls.h: Likewise.
3964 * sysdeps/ia64/tls.h: Likewise.
3965 * sysdeps/powerpc/tls.h: Likewise.
3966 * sysdeps/pthread/aio_misc.h: Likewise.
3967 * sysdeps/pthread/gai_misc.h: Likewise.
3968 * sysdeps/s390/tls.h: Likewise.
3969 * sysdeps/sh/tls.h: Likewise.
3970 * sysdeps/sparc/tls.h: Likewise.
3971 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3972 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3973 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3974 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3975 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3976 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3977 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3978 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3979 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3980 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3982 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3983 * sysdeps/x86_64/tls.h: Likewise.
3985 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3987 * pthread_getattr_np.c: No need to install a cancellation handler,
3988 this is no cancellation point.
3989 * pthread_getschedparam.c: Likewise.
3990 * pthread_setschedparam.c: Likewise.
3991 * pthread_setschedprio.c: Likewise.
3992 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3994 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3995 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3996 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3997 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3998 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3999 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4000 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4001 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4002 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4003 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4004 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4005 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4007 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4008 whether there are more than one thread makes no sense here since
4009 we only call the slow path if the locks are taken.
4010 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4012 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4013 COND_NWAITERS_SHIFT.
4014 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4016 * pthread_cond_init.c: Likewise.
4017 * pthread_cond_timedwait.c: Likewise.
4018 * pthread_cond_wait.c: Likewise.
4019 * pthread_condattr_getclock.c: Likewise.
4020 * pthread_condattr_setclock.c: Likewise.
4021 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4027 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4029 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4032 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4034 (THREAD_GSCOPE_GET_FLAG): Remove.
4035 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4036 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4038 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4039 (THREAD_GSCOPE_GET_FLAG): Remove.
4040 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4041 instead of THREAD_GSCOPE_GET_FLAG.
4042 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4044 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4045 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4046 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4047 THREAD_GSCOPE_WAIT): Define.
4048 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4049 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4050 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4051 THREAD_GSCOPE_WAIT): Define.
4052 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4053 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4054 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4055 THREAD_GSCOPE_WAIT): Define.
4056 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4057 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4058 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4059 THREAD_GSCOPE_WAIT): Define.
4061 2007-05-24 Richard Henderson <rth@redhat.com>
4063 * descr.h (struct pthread): Add header.gscope_flag.
4064 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4065 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4066 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4067 THREAD_GSCOPE_WAIT): Define.
4069 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4071 * init.c: Make it compile with older kernel headers.
4073 * tst-initializers1.c: Show through exit code which test failed.
4075 * pthread_rwlock_init.c: Also initialize __shared field.
4076 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4077 element in rwlock structure into four byte elements. One of them is
4078 the new __shared element.
4079 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4081 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4082 __shared, adjust names of other padding elements.
4083 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4084 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4085 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4086 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4089 futex to use private operations if possible.
4090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4092 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4095 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4097 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4099 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4101 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4102 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4104 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4106 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4107 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4108 * pthread_rwlock_timedrdlock.c: Likewise.
4109 * pthread_rwlock_tryrdlock.c: Likewise.
4111 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4114 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4115 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4116 duplication of __sem_wait_cleanup.
4118 * allocatestack.c: Revert last change.
4120 * sysdeps/i386/tls.h: Likewise.
4121 * sysdeps/x86_64/tls.h: Likewise.
4122 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4124 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4126 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4128 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4129 * pthread_barrier_init.c: Set private flag if pshared and private
4130 futexes are supported.
4131 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4132 private field in futex command setup.
4133 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4135 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4137 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4139 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4140 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4141 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4142 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4143 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4145 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4146 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4147 fields in the structure.
4148 (__old_sem_init): New function.
4149 * sem_open.c: Initialize all fields of the structure.
4150 * sem_getvalue.c: Adjust for renamed element.
4151 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4152 (gen-as-const-headers): Add structsem.sym.
4153 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4154 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4155 struct new_sem. Add struct old_sem.
4156 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4157 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4158 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4159 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4160 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4161 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4162 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4163 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4164 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4165 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4166 * tst-sem10.c: New file.
4167 * tst-sem11.c: New file.
4168 * tst-sem12.c: New file.
4169 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4172 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4173 Jakub Jelinek <jakub@redhat.com>
4175 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4176 Move __pthread_enable_asynccancel right before futex syscall.
4177 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4180 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4182 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4183 THREAD_COPY_PRIVATE_FUTEX): Define.
4184 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4185 THREAD_COPY_PRIVATE_FUTEX): Define.
4186 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4187 * init.c (__pthread_initialize_minimal_internal): Use
4188 THREAD_SET_PRIVATE_FUTEX.
4190 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4191 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4192 THREAD_GSCOPE_FLAG_WAIT): Define.
4193 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4194 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4195 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4197 (THREAD_GSCOPE_GET_FLAG): Define.
4198 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4199 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4200 instead of ->header.gscope_flag directly.
4202 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4204 * init.c (__pthread_initialize_minimal_internal): Check whether
4205 private futexes are available.
4206 * allocatestack.c (allocate_stack): Copy private_futex field from
4207 current thread into the new stack.
4208 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4209 futexes if they are available.
4210 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4212 in libc-lowlevellock.S allow using private futexes.
4213 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4216 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4217 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4218 if they are available.
4219 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4220 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4221 * sysdeps/i386/tcb-offsets.sym: Likewise.
4222 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4223 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4225 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4227 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4228 Remove ptr_wait_lookup_done again.
4229 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4230 (__pthread_initialize_minimal_internal): Initialize
4231 _dl_wait_lookup_done pointer in _rtld_global directly.
4232 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4233 Remove code to code _dl_wait_lookup_done.
4234 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4237 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4239 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4240 pthread_mutex_init failed with ENOTSUP.
4242 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4244 * allocatestack.c (__wait_lookup_done): New function.
4245 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4246 Add ptr_wait_lookup_done.
4247 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4248 * pthreadP.h: Declare __wait_lookup_done.
4249 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4250 Define macros to implement reference handling of global scope.
4251 * sysdeps/x86_64/tls.h: Likewise.
4252 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4253 Initialize GL(dl_wait_lookup_done).
4255 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4258 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4260 * pthread_mutex_timedlock.c: Likewise.
4261 * pthread_mutex_trylock.c: Likewise.
4262 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4264 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4265 * tst-robust9.c: New file.
4266 * tst-robustpi9.c: New file.
4268 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4269 unnecessary extra cancellation test.
4271 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4273 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4274 extra cancellation test.
4275 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4277 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4279 * descr.h (struct pthread): Rearrange members to fill hole in
4282 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4283 (__pthread_setaffinity_new): If syscall was successful and
4284 RESET_VGETCPU_CACHE is defined, use it before returning.
4285 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4287 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4290 * tst-align2.c: Include stackinfo.h.
4291 * tst-getpid1.c: Likewise.
4293 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4296 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4297 * tst-getpid1.c (do_test): Likewise.
4300 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4301 (allocate_stack): Likewise.
4303 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4305 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4306 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4307 (__lll_robust_timedlock_wait): Likewise.
4308 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4310 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4313 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4314 * tst-cancel4.c (tf_fdatasync): New test.
4316 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4319 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4320 check mutexes like normal mutexes.
4323 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4324 Initialize the whole sigevent structure to appease valgrind.
4326 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4328 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4329 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4331 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4333 * tst-locale1.c: Avoid warnings.
4334 * tst-locale2.c: Likewise.
4336 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4338 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4339 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4341 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4343 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4344 __extern_always_inline where appropriate.
4345 * sysdeps/pthread/pthread.h: Likewise.
4347 2007-03-13 Richard Henderson <rth@redhat.com>
4349 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4350 separate cfi regions for the two subsections.
4352 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4354 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4355 new thread, don't just decrement it.
4356 Patch by Suzuki K P <suzuki@in.ibm.com>.
4358 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4360 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4361 PTHFCT_CALL definition.
4363 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4365 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4366 available, don't use it.
4368 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4371 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4372 call into the kernel to delay.
4374 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4376 * tst-initializers1.c: We want to test the initializers as seen
4377 outside of libc, so undefined _LIBC.
4379 * pthread_join.c (cleanup): Avoid warning.
4381 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4383 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4384 (__lll_timedwait_tid): Add unwind info.
4386 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4387 function table, mangle the pointers.
4388 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4389 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4390 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4391 demangle pointers before use.
4392 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4394 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4395 * sysdeps/pthread/setxid.h: Likewise.
4397 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4399 * tst-rwlock7.c: Show some more information in case of correct
4402 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4404 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4405 (lll_futex_timed_wait): Undo part of last change, don't negate
4408 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4411 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4413 2006-12-28 David S. Miller <davem@davemloft.net>
4415 * shlib-versions: Fix sparc64 linux target specification.
4417 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4419 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4420 Adjust include path for pthread_barrier_wait.c move.
4422 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4424 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4425 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4427 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4429 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4430 6 argument cancellable syscalls.
4431 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4432 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4433 6 argument cancellable syscalls.
4434 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4436 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4438 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4439 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4441 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4443 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4444 __sync_lock_release instead of __sync_lock_release_si.
4446 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4448 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4450 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4451 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4452 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4453 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4454 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4455 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4456 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4457 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4458 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4459 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4460 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4462 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4464 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4465 * pthread_barrier_wait.c: ...here.
4466 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4467 * pthread_cond_broadcast.c: ...here.
4468 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4469 * pthread_cond_signal.c: ...here.
4470 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4471 * pthread_cond_timedwait.c: ...here.
4472 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4473 * pthread_cond_wait.c: ...here.
4474 * sysdeps/pthread/pthread_once.c: Move to...
4475 * pthread_once.c: ...here.
4476 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4477 * pthread_rwlock_rdlock.c: ...here.
4478 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4479 * pthread_rwlock_timedrdlock.c: ...here.
4480 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4481 * pthread_rwlock_timedwrlock.c: ...here.
4482 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4483 * pthread_rwlock_unlock.c: ...here.
4484 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4485 * pthread_rwlock_wrlock.c: ...here.
4486 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4487 * pthread_spin_destroy.c: ...here.
4488 * sysdeps/pthread/pthread_spin_init.c: Move to...
4489 * pthread_spin_init.c: ...here.
4490 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4491 * pthread_spin_unlock.c: ...here.
4492 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4493 * pthread_getcpuclockid.c: ...here.
4495 * init.c: USE_TLS support is now always enabled.
4496 * tst-tls5.h: Likewise.
4497 * sysdeps/alpha/tls.h: Likewise.
4498 * sysdeps/i386/tls.h: Likewise.
4499 * sysdeps/ia64/tls.h: Likewise.
4500 * sysdeps/powerpc/tls.h: Likewise.
4501 * sysdeps/s390/tls.h: Likewise.
4502 * sysdeps/sh/tls.h: Likewise.
4503 * sysdeps/sparc/tls.h: Likewise.
4504 * sysdeps/x86_64/tls.h: Likewise.
4506 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4508 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4509 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4512 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4513 Define to THREAD_SELF->header.multiple_threads.
4514 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4516 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4518 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4519 (SINGLE_THREAD_P): Likewise.
4520 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4521 (SINGLE_THREAD_P): Likewise.
4522 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4523 (SINGLE_THREAD_P): Likewise.
4524 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4525 (SINGLE_THREAD_P): Likewise.
4526 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4528 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4529 (SINGLE_THREAD_P): Likewise.
4530 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4531 (SINGLE_THREAD_P): Likewise.
4532 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4535 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4537 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4538 by default rather than 2_3_3.
4540 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4542 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4543 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4544 atomic_* instead of catomic_* macros.
4546 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4549 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4550 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4551 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4552 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4553 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4554 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4555 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4556 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4557 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4558 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4559 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4560 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4561 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4563 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4565 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4566 cancelable syscalls with six parameters.
4568 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4569 operations instead of atomic_*.
4571 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4573 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4575 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4577 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4578 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4579 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4581 * pthread_attr_setstack.c: Allow overwriting the version number of the
4583 * pthread_attr_setstacksize.c: Likewise.
4584 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4586 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4587 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4589 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4592 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4593 Patch by Petr Baudis.
4595 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4597 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4599 * tst-cancel2.c (tf): Loop as long as something was written.
4601 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4603 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4604 mutexes wake all mutexes.
4605 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4606 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4607 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4609 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4611 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4612 to guarantee the thread is always canceled.
4614 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4616 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4618 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4619 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4620 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4624 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4627 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4628 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4629 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4630 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4632 * Makefile (tests): Add tst-cond22.
4633 * tst-cond22.c: New file.
4635 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4638 * descr.h (struct pthread): Add parent_cancelhandling.
4639 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4640 cancelhandling value to child.
4641 * pthread_create.c (start_thread): If parent thread was canceled
4642 reset the SIGCANCEL mask.
4643 * Makefile (tests): Add tst-cancel25.
4644 * tst-cancel25.c: New file.
4646 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4647 Ulrich Drepper <drepper@redhat.com>
4649 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4650 counterp if it is already zero.
4651 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4653 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4654 Roland McGrath <roland@redhat.com>
4656 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4657 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4658 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4659 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4660 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4661 lll_robust_mutex_timedlock, lll_mutex_unlock,
4662 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4663 Add _L_*_ symbols around the subsection.
4664 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4665 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4667 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4668 Roland McGrath <roland@redhat.com>
4670 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4671 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4672 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4673 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4674 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4675 lll_robust_mutex_timedlock, lll_mutex_unlock,
4676 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4677 Add _L_*_ symbols around the subsection.
4678 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4679 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4681 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4683 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4684 change because it can disturb too much existing code. If real hard
4685 reader preference is needed we'll introduce another type.
4686 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4687 (pthread_rwlock_timedwrlock): Likewise.
4688 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4691 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4693 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4695 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4696 (pthread_rwlock_timedwrlock): Likewise.
4697 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4700 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4702 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4703 Only define ifdef SHARED.
4705 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4707 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4708 (free_stacks): ...here.
4709 (__free_stack_cache): New function.
4710 * pthreadP.h: Declare __free_stack_cache.
4711 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4713 * init.c (pthread_functions): Initialize ptr_freeres.
4714 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4715 New freeres function.
4717 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4720 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4722 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4724 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4725 _XOPEN_REALTIME_THREADS.
4727 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4729 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4730 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4731 HAVE_CLOCK_GETTIME_VSYSCALL.
4732 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4734 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4736 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4737 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4738 * descr.h (struct priority_protection_data): New type.
4739 (struct pthread): Add tpp field.
4740 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4741 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4742 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4743 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4745 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4746 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4747 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4748 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4750 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4752 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4753 * pthread_mutexattr_getprioceiling.c
4754 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4755 in the SCHED_FIFO priority range.
4756 * pthread_mutexattr_setprioceiling.c
4757 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4758 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4759 if mutex is not TPP. Ceiling is now in __data.__lock.
4760 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4761 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4762 is now in __data.__lock. Add locking.
4763 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4764 * Makefile (libpthread-routines): Add tpp.
4765 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4766 * tst-tpp.h: New file.
4767 * tst-mutexpp1.c: New file.
4768 * tst-mutexpp6.c: New file.
4769 * tst-mutexpp10.c: New file.
4770 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4771 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4773 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4776 * pthread_join.c (pthread_join): Account for self being canceled
4777 when checking for deadlocks.
4778 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4779 (tf1): Don't print anything after pthread_join returns, this would be
4780 another cancellation point.
4782 * tst-join6.c: New file.
4783 * Makefile (tests): Add tst-join6.
4785 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4788 * pthread_setspecific.c (__pthread_setspecific): Check
4789 out-of-range index before checking for unused key.
4791 * sysdeps/pthread/gai_misc.h: New file.
4793 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4795 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4796 file. Don't use sysctl.
4797 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4798 overwrite the file if this is likely not true.
4800 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4802 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4803 * Makefile (tests): Add tst-getpid3.
4804 * tst-getpid3.c: New file.
4806 2006-07-30 Roland McGrath <roland@redhat.com>
4808 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4810 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4811 (pause_not_cancel): New macro.
4812 (nanosleep_not_cancel): New macro.
4813 (sigsuspend_not_cancel): New macro.
4814 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4815 nanosleep_not_cancel macro from <not-cancel.h>.
4816 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4817 macro from <not-cancel.h>.
4819 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4820 Jakub Jelinek <jakub@redhat.com>
4822 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4823 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4824 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4825 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4826 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4827 * pthread_mutex_lock.c: Likewise.
4828 * pthread_mutex_timedlock.c: Likewise.
4829 * pthread_mutex_trylock.c: Likewise.
4830 * pthread_mutex_unlock.c: Likewise.
4831 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4835 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4836 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4837 pthread-pi-defines.sym.
4838 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4839 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4840 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4841 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4842 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4843 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4844 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4845 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4846 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4847 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4848 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4849 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4850 * tst-mutex2.c: Likewise.
4851 * tst-mutex3.c: Likewise.
4852 * tst-mutex4.c: Likewise.
4853 * tst-mutex5.c: Likewise.
4854 * tst-mutex6.c: Likewise.
4855 * tst-mutex7.c: Likewise.
4856 * tst-mutex7a.c: Likewise.
4857 * tst-mutex8.c: Likewise.
4858 * tst-mutex9.c: Likewise.
4859 * tst-robust1.c: Likewise.
4860 * tst-robust7.c: Likewise.
4861 * tst-robust8.c: Likewise.
4862 * tst-mutexpi1.c: New file.
4863 * tst-mutexpi2.c: New file.
4864 * tst-mutexpi3.c: New file.
4865 * tst-mutexpi4.c: New file.
4866 * tst-mutexpi5.c: New file.
4867 * tst-mutexpi6.c: New file.
4868 * tst-mutexpi7.c: New file.
4869 * tst-mutexpi7a.c: New file.
4870 * tst-mutexpi8.c: New file.
4871 * tst-mutexpi9.c: New file.
4872 * tst-robust1.c: New file.
4873 * tst-robust2.c: New file.
4874 * tst-robust3.c: New file.
4875 * tst-robust4.c: New file.
4876 * tst-robust5.c: New file.
4877 * tst-robust6.c: New file.
4878 * tst-robust7.c: New file.
4879 * tst-robust8.c: New file.
4880 * Makefile (tests): Add the new tests.
4882 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4883 * pthread_mutex_destroy.c: Remove unneeded label.
4885 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4887 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4888 computations to compile time.
4890 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4892 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4894 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4896 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4898 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4900 * pthread_key_create.c (__pthread_key_create): Do away with
4901 __pthread_keys_lock.
4903 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4904 (__kernel_cpumask_size): Mark as hidden.
4905 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4907 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4908 * semaphoreP.h (__sem_mappings_lock): Likewise.
4910 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4912 * pthread_atfork.c: Mark __dso_handle as hidden.
4914 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4917 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4918 the reload problem. Change the one path in pthread_cancel_init
4919 which causes the problem. Force gcc to reload. Simplify callers.
4920 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4921 (_Unwind_GetBSP): Undo last patch.
4923 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4925 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4926 function pointer is reloaded after pthread_cancel_init calls.
4929 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4930 pointers are reloaded after pthread_cancel_init calls.
4932 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4934 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4937 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4939 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4940 Allocate new object which is passed to timer_sigev_thread so that
4941 the timer can be deleted before the new thread is scheduled.
4943 2006-04-26 Roland McGrath <roland@redhat.com>
4945 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4947 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4949 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4950 suffix for conditional jumps.
4951 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4952 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4953 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4954 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4955 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4956 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4958 * init.c (sigcancel_handler): Compare with correct PID even if the
4959 thread is in the middle of a fork call.
4960 (sighandler_setxid): Likewise.
4961 Reported by Suzuki K P <suzuki@in.ibm.com> .
4963 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4965 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4967 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4969 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4970 fails [Coverity CID 105].
4972 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4974 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4976 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4979 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4980 Define __lll_rel_instr using lwsync.
4982 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4984 * allocatestack.c (allocate_stack): Always initialize robust_head.
4985 * descr.h: Define struct robust_list_head.
4986 (struct pthread): Use robust_list_head in robust mutex list definition.
4987 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4988 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4989 (__pthread_initialize_minimal_internal): Register robust_list with
4991 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4992 Declare __set_robust_list_avail.
4993 * pthread_create.c (start_thread): Register robust_list of new thread.
4994 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4996 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4997 number of users, it's unreliable.
4998 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4999 set_robust_list syscall is available.
5000 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5001 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5002 Set robust_head.list_op_pending before trying to lock a robust mutex.
5003 * pthread_mutex_timedlock.c: Likewise.
5004 * pthread_mutex_trylock.c: Likewise.
5005 * pthread_mutex_unlock.c: Likewise for unlocking.
5006 * Makefile (tests): Add tst-robust8.
5007 * tst-robust8.c: New file.
5009 2006-03-08 Andreas Schwab <schwab@suse.de>
5011 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5012 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5014 2006-03-05 Roland McGrath <roland@redhat.com>
5016 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5017 and $config_os doesn't match *linux*.
5019 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5021 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5022 Use __syscall_error.
5023 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5024 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5025 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5026 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5027 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5028 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5030 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5032 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5034 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5036 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5037 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5039 (__lll_robust_timedlock_wait): Likewise.
5040 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5041 (__lll_robust_lock_wait): Likewise.
5042 (__lll_robust_timedlock_wait): Likewise.
5043 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5044 (__lll_robust_lock_wait): Likewise.
5045 (__lll_robust_timedlock_wait): Likewise.
5047 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5049 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5050 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5051 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5052 lll_robust_mutex_unlock): Define.
5053 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5055 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5057 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5058 instead of <clone.S>.
5060 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5062 * Makefile (libpthread-routines): Add
5063 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5064 and pthread_mutex_[sg]etprioceiling.
5065 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5066 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5067 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5068 pthread_mutex_setprioceiling.
5069 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5070 PTHREAD_PRIO_PROTECT): New enum values.
5071 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5072 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5073 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5075 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5076 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5077 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5079 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5080 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5081 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5082 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5083 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5084 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5085 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5087 * pthread_mutex_getprioceiling.c: New file.
5088 * pthread_mutex_setprioceiling.c: New file.
5089 * pthread_mutexattr_getprioceiling.c: New file.
5090 * pthread_mutexattr_setprioceiling.c: New file.
5091 * pthread_mutexattr_getprotocol.c: New file.
5092 * pthread_mutexattr_setprotocol.c: New file.
5094 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5096 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5098 2006-02-27 Roland McGrath <roland@redhat.com>
5100 * sysdeps/pthread/Subdirs: List nptl here too.
5101 * configure (libc_add_on_canonical): New variable.
5103 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5105 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5106 self to get main source tree's file.
5107 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5108 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5109 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5110 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5111 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5112 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5113 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5114 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5115 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5116 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5117 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5118 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5119 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5121 * Makefile: Use $(sysdirs) in vpath directive.
5123 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5124 (CPPFLAGS-timer_routines.c): Likewise.
5126 * Makeconfig (includes): Variable removed.
5128 2006-02-26 Roland McGrath <roland@redhat.com>
5130 * sysdeps/generic/pt-raise.c: Moved to ...
5131 * pt-raise.c: ... here.
5132 * sysdeps/generic/lowlevellock.h: Moved to ...
5133 * lowlevellock.h: ... here.
5135 2006-02-23 Roland McGrath <roland@redhat.com>
5137 * descr.h (struct pthread): Add final member `end_padding'.
5138 (PTHREAD_STRUCT_END_PADDING): Use it.
5140 2006-02-20 Roland McGrath <roland@redhat.com>
5142 * sysdeps/mips: Directory removed, saved in ports repository.
5143 * sysdeps/unix/sysv/linux/mips: Likewise.
5145 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5147 * tst-robust1.c: Add second mutex to check that the mutex list is
5150 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5152 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5153 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5154 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5155 lll_robust_mutex_unlock): New macros.
5156 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5157 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5158 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5159 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5160 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5162 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5164 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5166 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5168 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5170 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5171 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5172 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5173 (lll_robust_mutex_unlock): Likewise.
5175 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5177 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5178 Set robust_list.__next rather than robust_list.
5179 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5180 (__pthread_list_t): New typedef.
5181 (pthread_mutex_t): Replace __next and __prev fields with __list.
5182 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5183 (__pthread_list_t): New typedef.
5184 (pthread_mutex_t): Replace __next and __prev fields with __list.
5185 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5186 (__pthread_list_t, __pthread_slist_t): New typedefs.
5187 (pthread_mutex_t): Replace __next and __prev fields with __list.
5188 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5189 (__pthread_list_t, __pthread_slist_t): New typedefs.
5190 (pthread_mutex_t): Replace __next and __prev fields with __list.
5191 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5192 (__pthread_list_t, __pthread_slist_t): New typedefs.
5193 (pthread_mutex_t): Replace __next and __prev fields with __list.
5194 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5195 (__pthread_slist_t): New typedef.
5196 (pthread_mutex_t): Replace __next field with __list.
5198 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5200 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5201 PTHREAD_MUTEX_OWNERDEAD.
5202 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5203 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5204 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5205 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5206 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5207 to PTHREAD_MUTEX_INCONSISTENT.
5208 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5209 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5210 * pthread_mutex_trylock.c: Likewise.
5211 * pthread_mutex_timedlock.c: Likewise.
5212 * pthread_mutex_unlock.c: Likewise.
5213 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5214 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5215 lowlevelrobustlock.sym.
5216 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5217 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5219 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5220 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5221 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5222 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5223 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5225 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5227 * allocatestack.c (allocate_stack): Initialize robust_list.
5228 * init.c (__pthread_initialize_minimal_internal): Likewise.
5229 * descr.h (struct xid_command): Pretty printing.
5230 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5231 robust_list. Adjust macros.
5232 * pthread_create.c (start_thread): Adjust robust_list handling.
5233 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5234 but the owner for all robust mutex types.
5235 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5236 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5237 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5238 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5240 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5241 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5243 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5245 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5246 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5248 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5250 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5252 (lll_futex_timed_wait): Define.
5254 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5256 * tst-cancel4.c: Test ppoll.
5258 2006-01-18 Andreas Jaeger <aj@suse.de>
5261 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5262 (pthread_mutex_t): Follow changes for other archs. Based on patch
5263 by Jim Gifford <patches@jg555.com>.
5265 2006-01-13 Richard Henderson <rth@redhat.com>
5267 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5269 2006-01-10 Roland McGrath <roland@redhat.com>
5271 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5272 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5273 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5274 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5275 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5276 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5277 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5278 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5279 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5280 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5282 2006-01-09 Roland McGrath <roland@redhat.com>
5284 * tst-initializers1-c89.c: New file.
5285 * tst-initializers1-c99.c: New file.
5286 * tst-initializers1-gnu89.c: New file.
5287 * tst-initializers1-gnu99.c: New file.
5288 * Makefile (tests): Add them.
5289 (CFLAGS-tst-initializers1-c89.c): New variable.
5290 (CFLAGS-tst-initializers1-c99.c): New variable.
5291 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5292 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5294 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5295 Use __extension__ on anonymous union definition.
5296 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5297 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5298 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5299 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5300 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5302 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5304 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5305 Don't give the union a name because it changes the mangled name.
5306 Instead name the struct for __data.
5307 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5309 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5312 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5314 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5315 stack bias to mc_ftp field.
5317 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5319 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5320 being too clever and reloading the futex value where it shouldn't.
5322 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5324 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5327 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5329 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5332 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5334 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5335 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5336 rename in tcbhead_t.
5338 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5339 Don't give the union a name because it changes the mangled name.
5340 Instead name the struct for __data.
5341 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5342 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5343 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5344 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5345 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5346 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5348 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5350 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5352 (lll_futex_timed_wait): Define.
5353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5354 * sysdeps/pthread/aio_misc.h: New file.
5356 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5358 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5360 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5362 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5363 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5364 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5366 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5368 * tst-cancel24.cc: Use C headers instead of C++ headers.
5370 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5372 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5373 sparc-linux configured glibc.
5374 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5375 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5376 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5377 atomic_compare_and_exchange_val_24_acq instead of
5378 atomic_compare_and_exchange_val_acq.
5379 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5380 instead of atomic_exchange_rel.
5381 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5382 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5384 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5386 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5387 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5388 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5389 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5390 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5391 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5393 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5395 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5396 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5397 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5399 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5401 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5403 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5405 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5408 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5410 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5411 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5412 THREAD_COPY_POINTER_GUARD): Define.
5413 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5414 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5416 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5418 * version.c: Update copyright year.
5420 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5422 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5423 .eh_frame section, use cfi_* directives.
5424 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5426 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5428 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5431 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5433 * sysdeps/pthread/sigaction.c: Removed.
5434 * sigaction.c: New file.
5435 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5437 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5439 * Makefile (tests): Add tst-signal7.
5440 * tst-signal7.c: New file.
5442 2005-12-27 Roland McGrath <roland@redhat.com>
5444 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5445 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5446 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5447 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5448 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5449 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5450 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5451 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5452 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5453 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5454 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5456 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5458 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5459 and __prev field to pthread_mutex_t.
5460 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5461 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5462 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5463 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5464 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5467 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5469 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5470 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5471 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5472 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5473 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5474 and PTHREAD_MUTEXATTR_FLAG_BITS.
5475 * descr.h (struct pthread): Add robust_list field and define
5476 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5477 * pthread_mutexattr_getrobust.c: New file.
5478 * pthread_mutexattr_setrobust.c: New file.
5479 * pthread_mutex_consistent.c: New file.
5480 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5481 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5482 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5483 Adjust pthread_mutex_t initializers.
5484 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5485 field to pthread_mutex_t.
5486 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5487 and __prev field to pthread_mutex_t.
5488 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5489 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5490 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5491 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5492 * pthread_mutexattr_gettype.c: Likewise.
5493 * pthread_mutexattr_setpshared.c: Likewise.
5494 * pthread_mutexattr_settype.c: Likewise.
5495 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5496 Initialize mutex kind according to robust flag.
5497 * pthread_mutex_lock.c: Implement local robust mutex.
5498 * pthread_mutex_timedlock.c: Likewise.
5499 * pthread_mutex_trylock.c: Likewise.
5500 * pthread_mutex_unlock.c: Likewise.
5501 * pthread_create.c (start_thread): Mark robust mutexes which remained
5503 * tst-robust1.c: New file.
5504 * tst-robust2.c: New file.
5505 * tst-robust3.c: New file.
5506 * tst-robust4.c: New file.
5507 * tst-robust5.c: New file.
5508 * tst-robust6.c: New file.
5509 * tst-robust7.c: New file.
5510 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5511 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5512 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5513 tst-robust5, tst-robust6, and tst-robust7.
5515 * tst-typesizes.c: New file.
5516 * Makefile (tests): Add tst-typesizes.
5518 * tst-once3.c: More debug output.
5520 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5522 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5523 missing after last change.
5525 * version.c: Update copyright year.
5527 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5529 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5530 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5531 * pthread_mutex_trylock.c: Likewise.
5532 * pthread_mutex_timedlock.c: Likewise.
5533 * pthread_mutex_unlock.c: Likewise.
5535 2005-12-22 Roland McGrath <roland@redhat.com>
5537 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5538 so that #include_next's search location is not reset to the -I..
5539 directory where <nptl/...> can be found.
5541 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5544 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5545 Fix unwind info. Remove useless branch prediction prefix.
5546 * tst-cancel24.cc: New file.
5547 * Makefile: Add rules to build and run tst-cancel24.
5549 2005-12-21 Roland McGrath <roland@redhat.com>
5551 * libc-cancellation.c: Use <> rather than "" #includes.
5552 * pt-cleanup.c: Likewise.
5553 * pthread_create.c: Likewise.
5554 * pthread_join.c: Likewise.
5555 * pthread_timedjoin.c: Likewise.
5556 * pthread_tryjoin.c: Likewise.
5557 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5558 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5559 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5560 * unwind.c: Likewise.
5562 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5564 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5565 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5566 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5567 THREAD_COPY_POINTER_GUARD): Define.
5569 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5571 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5573 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5574 THREAD_COPY_POINTER_GUARD): Define.
5575 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5576 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5577 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5578 THREAD_COPY_POINTER_GUARD): Define.
5579 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5580 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5581 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5582 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5583 Use PTR_DEMANGLE for B0 if defined.
5585 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5587 * pthread_create.c (__pthread_create_2_1): Use
5588 THREAD_COPY_POINTER_GUARD if available.
5589 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5590 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5591 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5592 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5593 * sysdeps/x86_64/tls.h: Likewise.
5595 2005-12-15 Roland McGrath <roland@redhat.com>
5597 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5599 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5601 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5603 * errno-loc.c: New file.
5605 2005-12-12 Roland McGrath <roland@redhat.com>
5607 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5608 adjustments before choosing stack size. Update minimum stack size
5609 calculation to match allocate_stack change.
5611 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5613 * allocatestack.c (allocate_stack): Don't demand that there is an
5614 additional full page available on the stack beside guard, TLS, the
5617 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5619 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5620 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5622 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5623 compiling 32-bit code we must define __cleanup_fct_attribute.
5625 005-11-24 Jakub Jelinek <jakub@redhat.com>
5628 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5629 __attribute__ instead of __attribute.
5630 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5631 (__cleanup_fct_attribute): Likewise.
5633 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5635 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5636 a write barrier before writing libgcc_s_getcfa.
5638 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5640 * sysdeps/unix/sysv/linux/configure: Removed.
5642 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5644 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5645 optional init_array/fini_array support.
5647 2005-10-24 Roland McGrath <roland@redhat.com>
5649 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5650 versioned_symbol use.
5652 2005-10-16 Roland McGrath <roland@redhat.com>
5654 * init.c (__pthread_initialize_minimal_internal): Even when using a
5655 compile-time default stack size, apply the minimum that allocate_stack
5656 will require, and round up to page size.
5658 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5660 * Makefile ($(test-modules)): Remove static pattern rule.
5662 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5663 Ulrich Drepper <drepper@redhat.com>
5665 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5666 alignment in callback function.
5667 * Makefile: Add rules to build and run tst-align3.
5668 * tst-align3.c: New file.
5670 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5672 * allocatestack.c (setxid_signal_thread): Add
5673 INTERNAL_SYSCALL_DECL (err).
5675 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5677 * allocatestack.c (setxid_signal_thread): Need to use
5678 atomic_compare_and_exchange_bool_acq.
5680 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5681 Jakub Jelinek <jakub@redhat.com>
5683 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5685 (struct pthread): Move specific_used field to avoid padding.
5686 Add setxid_futex field.
5687 * init.c (sighandler_setxid): Reset setxid flag and release the
5689 * allocatestack.c (setxid_signal_thread): New function. Broken
5690 out of the bodies of the two loops in __nptl_setxid. For undetached
5691 threads check whether they are exiting and if yes, don't send a signal.
5692 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5693 * pthread_create.c (start_thread): For undetached threads, check
5694 whether setxid bit is set. If yes, wait until signal has been
5697 * allocatestack.c (STACK_VARIABLES): Initialize them.
5698 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5700 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5702 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5703 waiters, awake all waiters on the associated mutex.
5705 2005-09-22 Roland McGrath <roland@redhat.com>
5707 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5708 ../sysdeps/x86_64/hp-timing.h).
5710 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5712 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5713 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5714 (lll_futex_wake_unlock): Define.
5715 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5716 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5717 (lll_futex_wake_unlock): Define.
5718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5719 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5720 (lll_futex_wake_unlock): Define.
5721 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5722 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5723 (lll_futex_wake_unlock): Define.
5724 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5725 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5726 (lll_futex_wake_unlock): Define.
5727 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5728 lll_futex_wake_unlock.
5729 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5730 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5731 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5732 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5733 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5734 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5736 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5738 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5739 Fix typo in register name.
5741 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5743 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5744 Use __sigfillset. Document that sigfillset does the right thing wrt
5747 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5750 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5751 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5752 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5753 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5754 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5755 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5757 * Makefile (tests): Add tst-initializers1.
5758 (CFLAGS-tst-initializers1.c): Set.
5759 * tst-initializers1.c: New test.
5761 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5763 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5764 Make sure __flags are located at offset 48 from the start of the
5767 2005-07-02 Roland McGrath <roland@redhat.com>
5769 * Makeconfig: Comment fix.
5771 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5773 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5774 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5775 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5776 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5777 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5778 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5779 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5780 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5781 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5782 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5784 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5786 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5787 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5788 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5790 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5791 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5792 field. Put in sysinfo field unconditionally.
5793 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5794 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5795 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5796 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5798 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5799 * pthread_create.c (__pthread_create_2_1): Use
5800 THREAD_COPY_STACK_GUARD macro.
5801 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5803 * tst-stackguard1.c: New file.
5804 * tst-stackguard1-static.c: New file.
5806 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5808 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5809 Invoke CGOTSETUP and CGOTRESTORE.
5810 (CGOTSETUP, CGOTRESTORE): Define.
5812 2005-05-29 Richard Henderson <rth@redhat.com>
5814 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5815 (tf_write, tf_writev): Use it.
5816 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5819 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5821 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5822 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5823 __librt_*_asynccancel@local.
5825 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5827 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5828 all occurrences of JUMPTARGET. Instead append @local to labels.
5830 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5832 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5833 size/alignment of struct pthread rather than tcbhead_t.
5834 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5836 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5838 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5841 2005-05-19 Richard Henderson <rth@redhat.com>
5843 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5844 __sync_val_compare_and_swap, not explicit _si variant.
5845 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5847 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5850 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5852 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5854 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5855 .eh_frame section, use cfi_* directives.
5857 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5859 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5862 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5865 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5868 2005-04-27 Roland McGrath <roland@redhat.com>
5870 * Makefile (tests): Remove tst-clock2.
5872 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5873 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5874 translating to the kernel clockid_t for our own process/thread clock.
5876 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5878 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5880 * old_pthread_cond_init.c: Include <errno.h>.
5881 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5882 process shared or uses clock other than CLOCK_REALTIME.
5883 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5885 2005-04-13 David S. Miller <davem@davemloft.net>
5887 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5888 * sysdeps/sparc/sparc64/clone.S: New file.
5890 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5893 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5894 __inline instead of inline.
5895 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5897 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5899 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5900 functionally equivalent, but shorter instructions.
5901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5902 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5903 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5905 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5906 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5907 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5908 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5909 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5911 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5913 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5916 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5917 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5919 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5921 * sysdeps/mips/Makefile: New file.
5922 * sysdeps/mips/nptl-sysdep.S: New file.
5923 * sysdeps/mips/tcb-offsets.sym: New file.
5924 * sysdeps/mips/pthread_spin_lock.S: New file.
5925 * sysdeps/mips/pthread_spin_trylock.S: New file.
5926 * sysdeps/mips/pthreaddef.h: New file.
5927 * sysdeps/mips/tls.h: New file.
5928 * sysdeps/mips/jmpbuf-unwind.h: New file.
5929 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5930 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5931 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5932 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5933 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5934 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5935 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5936 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5937 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5938 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5940 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5943 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5946 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5948 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5950 2005-02-25 Roland McGrath <roland@redhat.com>
5952 * alloca_cutoff.c: Correct license text.
5953 * tst-unload.c: Likewise.
5954 * sysdeps/pthread/allocalim.h: Likewise.
5955 * sysdeps/pthread/pt-initfini.c: Likewise.
5956 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5957 * sysdeps/pthread/bits/sigthread.h: Likewise.
5958 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5959 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5961 2005-02-16 Roland McGrath <roland@redhat.com>
5963 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5964 Use unsigned int * for ptr_nthreads.
5966 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5969 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5972 2005-02-07 Richard Henderson <rth@redhat.com>
5975 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5978 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5980 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5981 order of arguments in invocation of atomic_add_zero.
5983 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5986 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5987 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5988 at least gotntpoff relocation and addition.
5989 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5991 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5993 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5996 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5998 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5999 entry for static tls deallocation fix.
6000 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6001 also contains information whether the memory pointed to is static
6003 * sysdeps/i386/tls.h: Likewise.
6004 * sysdeps/ia64/tls.h: Likewise.
6005 * sysdeps/powerpc/tls.h: Likewise.
6006 * sysdeps/s390/tls.h: Likewise.
6007 * sysdeps/sh/tls.h: Likewise.
6008 * sysdeps/sparc/tls.h: Likewise.
6009 * sysdeps/x86_64/tls.h: Likewise.
6011 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6013 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6015 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6017 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6019 * Makefile (tests): Add tst-align2.
6020 * tst-align2.c: New test.
6021 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6022 -mpreferred-stack-boundary=4.
6024 2004-12-18 Roland McGrath <roland@redhat.com>
6026 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6027 New file removed withdrawn for the moment.
6029 2004-12-17 Richard Henderson <rth@redhat.com>
6031 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6032 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6034 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6037 Increased PTHREAD_STACK_MIN.
6039 * tst-context1.c (stacks): Use bigger stack size.
6041 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6043 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6044 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6046 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6048 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6049 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6050 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6052 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6054 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6056 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6058 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6059 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6061 * tst-getpid1.c: If child crashes, report this first. Print which
6064 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6066 * init.c (__pthread_initialize_minimal_internal): Also unblock
6069 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6071 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6072 _POSIX_THREAD_CPUTIME): Define to 0.
6073 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6074 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6075 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6076 __timer_signal_thread_tclk): Remove.
6077 (init_module): Remove their initialization.
6078 (thread_cleanup): Remove their cleanup assertions.
6079 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6080 __timer_signal_thread_tclk): Remove.
6081 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6082 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6083 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6085 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6087 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6088 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6090 * Makefile (tests): Add tst-getpid2.
6091 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6092 (do_test): Use it. Use __clone2 instead of clone on ia64.
6093 * tst-getpid2.c: New test.
6095 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6097 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6099 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6101 * Makefile (tests): Add tst-getpid1.
6102 * tst-getpid1.c: New file.
6103 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6104 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6106 2004-12-02 Roland McGrath <roland@redhat.com>
6108 * Makefile (libpthread-nonshared): Variable removed.
6109 ($(objpfx)libpthread_nonshared.a): Target removed.
6110 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6111 These are now handled by generic magic from
6112 libpthread-static-only-routines being set.
6114 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6116 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6117 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6118 _POSIX_THREAD_PRIO_PROTECT): Define.
6119 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6120 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6121 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6123 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6125 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6126 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6127 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6128 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6129 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6130 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6131 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6133 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6135 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6137 * Makefile (libpthread-routines): Add pthread_setschedprio.
6138 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6139 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6140 * pthread_setschedprio.c: New file.
6142 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6144 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6145 * pthread_cancel.c (pthread_create): Likewise.
6147 * Makefile (libpthread-routines): Add vars.
6148 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6149 * init.c (__default_stacksize, __is_smp): Remove.
6151 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6152 and define a wrapper macro.
6153 (PTHREAD_STATIC_FN_REQUIRE): Define.
6154 * allocatestack.c (__find_thread_by_id): Undefine.
6155 * pthread_create (__pthread_keys): Remove.
6156 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6157 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6158 PTHREAD_STATIC_FN_REQUIRE.
6160 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6162 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6163 parameter to REGISTER macro.
6165 2004-11-17 Roland McGrath <roland@redhat.com>
6167 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6168 Make sure SIGCANCEL is blocked as well.
6170 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6172 * sysdeps/pthread/setxid.h: New file.
6173 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6174 (struct xid_command): Add forward decl.
6175 (struct pthread_functions): Change return type of __nptl_setxid hook
6177 * pthreadP.h (__nptl_setxid): Change return type to int.
6178 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6179 calling thread, return its return value and set errno on failure.
6180 * descr.h (struct xid_command): Change id type to long array.
6182 * Makefile: Add rules to build and test tst-setuid1 and
6184 * tst-setuid1.c: New test.
6185 * tst-setuid1-static.c: New test.
6187 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6189 * Makefile (tests): Add tst-exit3.
6190 * tst-exit3.c: New test.
6192 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6194 * Makefile (tests): Add tst-exit2.
6195 * tst-exit2.c: New file.
6197 2004-11-09 Roland McGrath <roland@redhat.com>
6200 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6201 here, before calling clone.
6202 * pthread_create.c (start_thread): Don't do it here.
6204 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6206 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6208 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6210 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6211 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6214 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6216 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6217 if sched_priority is not between minprio and maxprio.
6219 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6221 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6222 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6224 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6225 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6227 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6229 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6230 not-cancelable I/O functions.
6232 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6234 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6235 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6236 make sure 2 is stored in the futex and we looked at the old value.
6237 Fix a few other problems to return the correct value.
6239 2004-10-14 Richard Henderson <rth@redhat.com>
6241 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6244 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6246 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6247 of pthread-functions.h and pthreaddef.h.
6248 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6250 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6251 Change __data.__nwaiters from int to unsigned int.
6253 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6254 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6256 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6259 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6260 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6262 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6264 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6265 test fails, remove message queue.
6266 (tf_msgsnd): Likewise.
6268 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6270 * tst-clock1.c: Change #ifdef to #if defined.
6271 * tst-clock2.c: Likewise.
6272 * tst-cond11.c: Likewise.
6274 * sysdeps/pthread/timer_create.c (timer_create): Use
6275 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6276 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6279 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6281 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6282 _POSIX_THREAD_CPUTIME): Define to 0.
6284 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6286 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6287 and _POSIX_THREAD_CPUTIME to zero.
6288 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6289 * tst-barrier2.c: Fix testing for POSIX feature.
6290 * tst-clock1.c: Likewise.
6291 * tst-clock2.c: Likewise.
6292 * tst-cond11.c: Likewise.
6293 * tst-cond4.c: Likewise.
6294 * tst-cond6.c: Likewise.
6295 * tst-flock2.c: Likewise.
6296 * tst-mutex4.c: Likewise.
6297 * tst-mutex9.c: Likewise.
6298 * tst-rwlock12.c: Likewise.
6299 * tst-rwlock4.c: Likewise.
6300 * tst-signal1.c: Likewise.
6301 * tst-spin2.c: Likewise.
6302 * sysdeps/pthread/posix-timer.h: Likewise.
6303 * sysdeps/pthread/timer_create.c: Likewise.
6304 * sysdeps/pthread/timer_routines.c: Likewise.
6306 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6309 (__lll_mutex_timedlock_wait): Address futex correctly.
6311 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6312 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6313 make sure 2 is stored in the futex and we looked at the old value.
6314 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6315 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6316 which might very well made the code not working at all before.
6319 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6321 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6322 allow SIGSETXID to be sent.
6323 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6324 for SIGSETXID to be defined.
6325 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6326 SIGSETXID cannot be blocked.
6328 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6329 Add __extension__ to long long types.
6330 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6331 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6332 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6333 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6334 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6335 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6336 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6338 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6340 * descr.h (struct pthread): Add stopped_start field.
6341 * sysdeps/pthread/createthread.c (create_thread): Set
6342 start_stopped flag in descriptor for new thread appropriately.
6343 * pthread_create.c (start_thread): Only take lock to be stopped on
6344 startup if stopped_start flag says so.
6346 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6348 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6349 is created detached and if yes, do not try to free the stack in case
6350 the thread creation failed.
6351 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6352 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6353 case there has been no error. [BZ #405]
6355 * pthread_create.c (start_thread): Don't wait for scheduler data
6356 etc to be set at the beginning of the function. The cancellation
6357 infrastructure must have been set up. And enable async
6358 cancellation before potentially going to sleep. [BZ #401]
6360 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6362 * Versions: Remove exports for pthread_set*id_np functions.
6363 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6365 * Makefile: Don't build pthread_set*id code for now.
6367 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6369 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6371 * allocatestack.c (__nptl_setxid): New function.
6372 * descr.h (struct xid_command): Define type.
6373 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6374 (sighandler_setxid): New function.
6375 (__pthread_initialize_minimal): Register sighandler_setxid for
6377 * pt-allocrtsig.c: Update comment.
6378 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6379 Declare __nptl_setxid.
6380 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6381 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6382 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6383 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6384 and pthread_setresuid_np.
6385 * pthread_setgid_np.c: New file.
6386 * pthread_setuid_np.c: New file.
6387 * pthread_setegid_np.c: New file.
6388 * pthread_seteuid_np.c: New file.
6389 * pthread_setregid_np.c: New file.
6390 * pthread_setreuid_np.c: New file.
6391 * pthread_setresgid_np.c: New file.
6392 * pthread_setresuid_np.c: New file.
6393 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6394 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6395 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6396 and pthread_setresuid_np.
6397 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6398 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6399 pthread_setregid, and pthread_setresgid.
6401 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6403 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6404 ENOMEM when out of memory.
6406 2004-09-10 Roland McGrath <roland@redhat.com>
6409 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6410 code, since we don't try to use the broken CLONE_STOPPED any more.
6411 * pthread_create.c (start_thread): Likewise.
6413 2004-09-15 Richard Henderson <rth@redhat.com>
6415 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6417 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6419 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6420 (__libc_unwind_longjmp): Delete macro and declare as function.
6421 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6422 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6424 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6425 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6426 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6428 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6430 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6432 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6433 types also for __USE_XOPEN2K.
6434 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6435 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6436 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6437 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6438 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6439 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6440 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6443 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6445 * sysdeps/pthread/pthread.h
6446 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6447 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6448 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6449 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6452 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6454 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6455 PSEUDO to be used with . prefix.
6457 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6458 Use atomic_increment instead of atomic_exchange_and_add.
6459 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6461 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6463 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6466 * allocatestack.c (allocate_stack): Use atomic_increment_val
6467 instead of atomic_exchange_and_add.
6468 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6469 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6471 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6474 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6475 the initialization function might throw.
6477 2005-09-05 Richard Henderson <rth@redhat.com>
6479 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6480 Move definition inside libpthread, libc, librt check. Provide
6481 definition for rtld.
6483 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6485 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6486 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6487 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6488 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6489 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6490 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6491 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6492 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6495 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6496 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6497 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6500 Decrement __nwaiters. If pthread_cond_destroy has been called and
6501 this is the last waiter, signal pthread_cond_destroy caller and
6502 avoid using the pthread_cond_t structure after unlock.
6503 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6504 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6505 Read clock type from the least significant bits of __nwaiters instead
6507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6508 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6510 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6513 * Makefile (tests): Add tst-cond20 and tst-cond21.
6514 * tst-cond20.c: New test.
6515 * tst-cond21.c: New test.
6516 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6517 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6519 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6522 (pthread_cond_t): Likewise.
6523 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6525 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6527 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6529 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6530 (cond_nwaiters): New.
6532 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6533 if there are waiters not signalled yet.
6534 Wait until all already signalled waiters wake up.
6535 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6536 __nwaiters. If pthread_cond_destroy has been called and this is the
6537 last waiter, signal pthread_cond_destroy caller and avoid using
6538 the pthread_cond_t structure after unlock.
6539 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6540 decrement it when leaving. If pthread_cond_destroy has been called
6541 and this is the last waiter, signal pthread_cond_destroy caller.
6542 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6543 Likewise. Read clock type from the least significant bits of
6544 __nwaiters instead of __clock.
6545 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6546 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6547 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6548 clock type just from the last COND_CLOCK_BITS bits of value.
6549 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6550 instead of __clock, just from second bit of condattr's value.
6552 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6554 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6555 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6557 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6559 2004-08-15 Roland McGrath <roland@frob.com>
6561 * pthread_atfork.c: Update copyright terms including special exception
6562 for these trivial files, which are statically linked into executables
6563 that use dynamic linking for the significant library code.
6565 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6567 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6568 pthread_rwlock_rdlock.
6569 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6570 Decrease __nr_readers_queued after reacquiring lock.
6571 * sysdeps/pthread/pthread_rwlock_timedrdlock
6572 (pthread_rwlock_timedrdlock): Likewise.
6573 Reported by Bob Cook <bobcook47@hotmail.com>.
6575 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6577 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6578 before pthread_barrier_wait.
6580 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6583 Remove unnecessary exception handling data.
6585 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6588 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6589 instead of clockid_t.
6591 2004-07-21 Roland McGrath <roland@redhat.com>
6593 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6595 2004-07-19 Roland McGrath <roland@redhat.com>
6597 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6599 2004-07-02 Roland McGrath <roland@redhat.com>
6601 * configure: Don't exit.
6603 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6605 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6606 (__pthread_cond_timedwait): Check for invalid nanosecond in
6609 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6611 * Makefile: Add rules to build and run tst-fini1.
6612 * tst-fini1.c: New file.
6613 * tst-fini1mod.c: New file.
6615 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6617 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6618 if no cancellation support is needed.
6619 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6620 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6621 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6622 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6623 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6624 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6625 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6626 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6627 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6629 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6630 only if not already defined.
6632 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6635 constraint "m" instead of "0" for futex.
6637 * shlib-versions: Add powerpc64-.*-linux.*.
6639 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6641 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6642 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6644 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6645 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6648 2004-06-29 Roland McGrath <roland@redhat.com>
6650 * Banner: NPTL no longer has its own version number.
6651 * Makefile (nptl-version): Variable removed.
6652 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6653 using $(version), the glibc version number.
6655 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6657 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6658 Fix branch offset for a PLT entry.
6659 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6661 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6663 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6665 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6668 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6670 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6673 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6675 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6676 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6678 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6679 (pthread_rwlock_timedrdlock): Likewise.
6681 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6683 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6684 Set __r7 to val, not mutex.
6686 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6688 * Makefile: Add rules to build tst-rwlock14.
6689 * tst-rwlock14.c: New file.
6691 2004-06-24 Boris Hu <boris.hu@intel.com>
6693 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6695 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6697 2004-06-19 Andreas Jaeger <aj@suse.de>
6699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6700 assembler in last patch.
6702 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6704 * sysdeps/pthread/pthread_cond_timedwait.c
6705 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6707 (__pthread_cond_timedwait): Check for invalid nanosecond in
6709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6710 * tst-cond19.c: New file.
6711 * Makefile: Add rules to build and run tst-cond19.
6713 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6715 * tst-context1.c (GUARD_PATTERN): Defined.
6716 (tst_context_t): Define struct containing ucontext_t & guard words.
6717 (ctx): Declare as an array of tst_context_t.
6718 (fct): Verify uc_link & guard words are still valid.
6719 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6721 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6723 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6724 Add __data.__futex field, reshuffle __data.__clock.
6725 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6726 (__pthread_cond_signal): Increment __futex at the same time as
6727 __wakeup_seq or __total_seq. Pass address of __futex instead of
6728 address of low 32-bits of __wakeup_seq to futex syscall.
6729 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6730 (__pthread_cond_wait): Likewise. Pass __futex value from before
6731 releasing internal lock to FUTEX_WAIT.
6732 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6733 (__pthread_cond_timedwait): Likewise.
6734 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6735 (FUTEX_CMP_REQUEUE): Define.
6736 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6737 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6738 Pass __futex value from before the unlock and __futex address instead
6739 of address of low 32-bits of __wakeup_seq to futex syscall.
6740 Fallback to FUTEX_WAKE all on any errors.
6742 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6744 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6746 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6747 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6748 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6749 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6750 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6752 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6754 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6755 Add memory clobber to inline assembly.
6756 (__lll_mutex_trylock): Likewise.
6757 (__lll_mutex_cond_trylock): Likewise.
6759 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6761 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6762 Pass val argument as 6th system call argument in %r7.
6764 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6766 * Makefile (tests): Add tst-cond16.
6767 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6768 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6769 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6770 Add __data.__futex field, reshuffle __data.__clock.
6771 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6772 (__pthread_cond_signal): Increment __futex at the same time as
6773 __wakeup_seq or __total_seq. Pass address of __futex instead of
6774 address of low 32-bits of __wakeup_seq to futex syscall.
6775 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6776 (__pthread_cond_wait): Likewise. Pass __futex value from before
6777 releasing internal lock to FUTEX_WAIT.
6778 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6779 (__pthread_cond_timedwait): Likewise.
6780 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6781 (FUTEX_CMP_REQUEUE): Define.
6782 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6783 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6784 Pass __futex value from before the unlock and __futex address instead
6785 of address of low 32-bits of __wakeup_seq to futex syscall.
6786 Fallback to FUTEX_WAKE all on any errors.
6787 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6789 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6790 internally. Return non-zero if error, zero if success.
6791 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6792 Add __data.__futex field, reshuffle __data.__clock.
6793 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6795 (lll_futex_requeue): Add val argument, return 1 unconditionally
6797 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6798 Add __data.__futex field, reshuffle __data.__clock.
6799 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6801 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6802 internally. Return non-zero if error, zero if success.
6803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6804 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6805 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6807 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6808 internally. Return non-zero if error, zero if success.
6809 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6810 Add __data.__futex field, reshuffle __data.__clock.
6811 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6813 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6814 internally. Return non-zero if error, zero if success.
6815 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6816 Add __data.__futex field, reshuffle __data.__clock.
6817 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6818 Add __data.__futex field, reshuffle __data.__clock.
6819 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6820 Increment __futex at the same time as __wakeup_seq or __total_seq.
6821 Pass address of __futex instead of address of low 32-bits of
6822 __wakeup_seq to futex syscall.
6823 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6824 Pass __futex value from before releasing internal lock
6826 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6827 Likewise. Avoid unnecessary shadowing of variables.
6828 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6829 Set __futex to 2 * __total_seq. Pass __futex value from before the
6830 unlock and __futex address instead of address of low 32-bits of
6831 __wakeup_seq to futex_requeue macro, adjust for new return value
6833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6834 (__pthread_cond_signal): Increment __futex at the same time as
6835 __wakeup_seq or __total_seq. Pass address of __futex instead of
6836 address of low 32-bits of __wakeup_seq to futex syscall.
6837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6838 (__pthread_cond_wait): Likewise. Pass __futex value from before
6839 releasing internal lock to FUTEX_WAIT.
6840 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6841 (__pthread_cond_timedwait): Likewise.
6842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6843 (FUTEX_CMP_REQUEUE): Define.
6844 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6845 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6846 Pass __futex value from before the unlock and __futex address instead
6847 of address of low 32-bits of __wakeup_seq to futex syscall.
6848 Fallback to FUTEX_WAKE all on any errors.
6850 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6852 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6853 Add nop to align the end of critical section.
6854 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6856 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6858 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6859 Add __broadcast_seq field.
6860 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6861 all waiters as woken with woken_seq and bump broadcast counter.
6862 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6863 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6864 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6865 Comment typo fixes. Avoid returning -ETIMEDOUT.
6867 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6870 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6871 Reported by Kaz Kojima.
6873 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6875 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6877 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6879 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6880 __broadcast_seq with bc_seq after acquiring internal lock instead of
6883 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6885 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6888 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6889 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6890 (pthread_cond_t): Add __data.__broadcast_seq field.
6891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6892 (FRAME_SIZE): Define.
6893 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6897 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6899 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6900 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6903 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6905 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6906 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6907 Add __broadcast_seq field.
6908 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6909 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6910 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6911 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6912 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6914 all waiters as woken with woken_seq and bump broadcast counter.
6915 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6917 __broadcast_seq field.
6918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6919 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6920 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6921 * pthread_cond_init.c: Initialize __broadcast_seq field.
6922 * Makefile (tests): Add tst-cond17 and tst-cond18.
6923 Add .NOTPARALLEL goal.
6924 * tst-cond16.c: New file. From Jakub.
6925 * tst-cond17.c: New file. From Jakub.
6926 * tst-cond18.c: New file. From Jakub.
6928 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6930 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6934 Parametrize frame size. Correct some unwind info.
6935 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6937 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6939 * tst-stack3.c: Note testing functionality beyond POSIX.
6941 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6943 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6944 Change conditional from ifdef to if.
6946 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6948 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6949 SYSDEP_CANCEL_ERROR): Define.
6952 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6954 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6956 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6958 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6960 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6962 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6963 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6964 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6965 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6967 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6969 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6970 thread has all signals blocked.
6972 2004-04-18 Andreas Jaeger <aj@suse.de>
6974 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6975 (SEM_VALUE_MAX): Add missing brace.
6977 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6979 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6981 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6982 * sysdeps/pthread/tst-mqueue8x.c: New test.
6983 * tst-cancel4.c: Update comment about message queues.
6985 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6986 return it_value { 0, 0 }.
6987 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6989 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6990 assertion for SIGEV_NONE.
6991 (thread_attr_compare): Compare all attributes, not just a partial
6994 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6996 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6998 2004-04-17 Ulrich Drepper <drepper@redhat.com>
7000 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7001 Just use a plain number.
7002 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7003 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7004 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7005 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7006 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7007 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7008 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7010 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7012 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7014 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7016 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7018 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7019 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7020 of calling sigwaitinfo.
7022 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7024 * allocatestack.c (allocate_stack): Set reported_guardsize
7026 * pthread_getattr_np.c (pthread_getattr_np): Use
7027 reported_guardsize instead of guardsize.
7028 * descr.h (struct pthread): Add reported_guardsize field.
7030 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7032 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7034 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7036 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7038 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7040 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7041 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7042 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7043 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7044 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7046 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7047 (_POSIX_MESSAGE_PASSING): Define.
7048 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7049 (_POSIX_MESSAGE_PASSING): Define.
7050 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7051 (_POSIX_MESSAGE_PASSING): Define.
7053 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7055 * tst-context1.c (fct): Check whether correct stack is used.
7057 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7059 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7060 matching constraints for asm mem parameters.
7062 * tst-clock2.c (tf): Don't define unless needed.
7064 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7066 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7069 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7071 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7072 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7073 * pthreadP.h: Declare __nptl_deallocate_tsd.
7074 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7077 * Makefile (tests): Add tst-tsd5.
7078 * tst-tsd5.c: New file.
7080 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7082 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7083 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7084 is SHLIB_COMPAT check.
7085 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7086 (__pthread_attr_getaffinity_old): Likewise.
7087 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7088 (__pthread_getaffinity_old): Likewise.
7089 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7090 (__pthread_setaffinity_old): Likewise.
7092 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7094 * allocatestack.c (_make_stacks_executable): Call
7095 _dl_make_stack_executable first.
7097 2004-03-24 Roland McGrath <roland@redhat.com>
7099 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7100 constraint instead of "0".
7102 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7104 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7105 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7107 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7108 code to avoid warning.
7110 2004-03-24 Andreas Jaeger <aj@suse.de>
7112 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7113 (__pthread_attr_setaffinity_old): Remove const.
7115 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7117 * sysdeps/unix/sysv/linux/smp.h: New file.
7118 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7119 * init.c: Define __is_smp.
7120 (__pthread_initialize_minimal_internal): Call is_smp_system to
7121 initialize __is_smp.
7122 * pthreadP.h: Declare __is_smp.
7123 Define MAX_ADAPTIVE_COUNT is necessary.
7124 * pthread_mutex_init.c: Add comment regarding __spins field.
7125 * pthread_mutex_lock.c: Implement adaptive mutex type.
7126 * pthread_mutex_timedlock.c: Likewise.
7127 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7128 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7130 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7131 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7132 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7133 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7134 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7135 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7136 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7137 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7138 lll_mutex_cond_trylock.
7139 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7140 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7141 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7142 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7143 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7144 Define BUSY_WAIT_NOP.
7145 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7146 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7148 * tst-mutex5.c: Add support for testing adaptive mutexes.
7149 * tst-mutex7.c: Likewise.
7150 * tst-mutex5a.c: New file.
7151 * tst-mutex7a.c: New file.
7152 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7154 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7155 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7156 vgettimeofday call might destroy the content.
7158 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7161 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7162 No need to restrict type of ret. Make it int. Add comment.
7164 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7165 Remove unnecessary setne instruction.
7167 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7169 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7170 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7171 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7172 If realloc fails, break out of the loop.
7174 2004-03-20 Andreas Jaeger <aj@suse.de>
7176 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7177 (__pthread_setaffinity_old): Fix interface.
7178 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7179 (__pthread_getaffinity_old): Likewise.
7181 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7182 (__pthread_setaffinity_new): Remove duplicate declaration.
7184 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7186 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7187 the return value to a safe register.
7188 (CDISABLE): Set the function argument correctly.
7190 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7192 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7193 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7194 Rewrite so that only one locked memory operation per round is needed.
7195 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7196 (pthread_barrier_wait): After wakeup, release lock only when the
7197 last thread stopped using the barrier object.
7198 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7199 (__pthread_cond_wait): Don't store mutex address if the current
7200 value is ~0l. Add correct cleanup support and unwind info.
7201 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7202 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7203 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7204 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7205 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7206 Add correct cleanup support and unwind info.
7207 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7208 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7209 information for syscall wrappers.
7211 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7213 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7214 cpusetsize field, remove next.
7215 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7216 parameter for size of the CPU set.
7217 (pthread_setaffinity_np): Likewise.
7218 (pthread_attr_getaffinity_np): Likewise.
7219 (pthread_attr_setaffinity_np): Likewise.
7220 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7221 interface change, keep compatibility code.
7222 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7223 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7224 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7225 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7226 __pthread_getaffinity_np.
7227 * Versions: Add version for changed interfaces.
7228 * tst-attr3.c: Adjust test for interface change.
7229 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7230 increasing buffer sizes.
7231 * pthread_attr_destroy.c: Remove unused list handling.
7232 * pthread_attr_init.c: Likewise.
7234 2004-03-17 Roland McGrath <roland@redhat.com>
7236 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7237 first argument to clock_getres so we ever enable kernel timers.
7239 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7241 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7243 2004-03-12 Richard Henderson <rth@redhat.com>
7245 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7246 oldvalue from CENABLE to CDISABLE.
7248 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7250 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7251 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7252 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7253 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7255 2004-03-11 Richard Henderson <rth@redhat.com>
7257 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7258 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7259 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7261 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7263 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7264 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7265 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7267 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7269 * forward.c (__pthread_cond_broadcast_2_0,
7270 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7271 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7272 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7274 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7276 * sysdeps/sh/tcb-offsets.sym: Add PID.
7277 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7278 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7280 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7282 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7283 include <sysdep-cancel.h>, vfork is no cancellation point.
7284 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7285 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7286 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7288 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7290 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7292 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7293 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7297 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7298 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7299 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7300 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7301 of DO_CALL_VIA_BREAK. Work around a gas problem.
7303 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7304 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7305 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7306 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7307 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7308 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7310 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7311 a local register for saving old PID. Negate PID in parent upon exit.
7313 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7315 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7316 before syscall, set to the old value in the parent afterwards.
7317 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7318 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7320 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7321 before syscall, set to the old value in the parent afterwards.
7322 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7323 * sysdeps/s390/tcb-offsets.sym: Add PID.
7325 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7326 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7327 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7328 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7329 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7330 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7332 2004-03-10 Andreas Schwab <schwab@suse.de>
7334 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7335 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7336 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7338 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7340 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7341 * tst-cancel21.c (do_one_test): Likewise.
7342 Reported by Gordon Jin <gordon.jin@intel.com>.
7344 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7346 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7347 if non-zero and set to INT_MIN if zero.
7348 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7349 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7350 (SAVE_PID, RESTORE_PID): Define.
7352 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7353 Use relative path to avoid including NPTL i386/vfork.S.
7354 (SAVE_PID, RESTORE_PID): Define.
7355 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7356 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7357 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7359 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7360 * tst-vfork1.c: New test.
7361 * tst-vfork2.c: New test.
7362 * tst-vfork1x.c: New test.
7363 * tst-vfork2x.c: New test.
7365 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7367 * sysdeps/i386/tcb-offsets.sym: Add PID.
7368 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7369 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7370 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7372 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7374 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7376 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7378 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7381 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7383 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7386 * tst-once4.c: Remove unnecessary macro definition.
7388 * tst-mutex7.c (do_test): Limit thread stack size.
7389 * tst-once2.c (do_test): Likewise.
7390 * tst-tls3.c (do_test): Likewise.
7391 * tst-tls1.c (do_test): Likewise.
7392 * tst-signal3.c (do_test): Likewise.
7393 * tst-kill6.c (do_test): Likewise.
7394 * tst-key4.c (do_test): Likewise.
7395 * tst-join4.c (do_test): Likewise.
7396 * tst-fork1.c (do_test): Likewise.
7397 * tst-context1.c (do_test): Likewise.
7398 * tst-cond2.c (do_test): Likewise.
7399 * tst-cond10.c (do_test): Likewise.
7400 * tst-clock2.c (do_test): Likewise.
7401 * tst-cancel10.c (do_test): Likewise.
7402 * tst-basic2.c (do_test): Likewise.
7403 * tst-barrier4.c (do_test): Likewise.
7405 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7407 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7409 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7411 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7412 (__pthread_cond_timedwait): Optimize wakeup test.
7413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7414 (__pthread_cond_wait): Likewise.
7415 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7416 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7419 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7421 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7422 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7423 the atomic instruction needed.
7424 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7425 (__lll_mutex_lock_wait): Likewise.
7427 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7429 * Makefile (tests): Add tst-cond14 and tst-cond15.
7430 * tst-cond14.c: New file.
7431 * tst-cond15.c: New file.
7433 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7435 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7436 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7437 needs to be implemented differently to be useful.
7439 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7441 * pthread_attr_setschedparam.c: Don't test priority against limits
7442 here. Set ATTR_FLAG_SCHED_SET flag.
7443 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7444 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7445 from parent thread to child. If attribute is used and scheduling
7446 parameters are not inherited, copy parameters from attribute or
7447 compute them. Check priority value.
7448 * pthread_getschedparam.c: If the parameters aren't known yet get
7449 them from the kernel.
7450 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7451 ATTR_FLAG_POLICY_SET flag for thread.
7452 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7453 and ATTR_FLAG_POLICY_SET.
7455 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7457 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7458 fail if stack address hasn't been set. Just return 0.
7460 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7462 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7463 libpthread for the files in this list.
7464 (CFLAGS-tst-unload): Removed.
7465 * tst-unload.c (do_test): Don't use complete path for
7468 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7471 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7473 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7474 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7475 operation per round is needed.
7476 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7477 (__lll_mutex_lock_wait): Likewise.
7479 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7481 * tst-cancel9.c (cleanup): Don't print to stderr.
7483 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7485 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7487 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7489 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7490 (__syscall_error_handler2): Call CDISABLE.
7491 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7492 (__syscall_error_handler2): Call CDISABLE.
7494 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7495 Release lock before the loop, don't reacquire it.
7497 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7499 2004-02-19 Andreas Schwab <schwab@suse.de>
7501 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7504 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7506 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7507 (pthread_barrier_wait): After wakeup, release lock only when the
7508 last thread stopped using the barrier object.
7509 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7510 (pthread_barrier_wait): Likewise.
7511 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7513 * Makefile (tests): Add tst-barrier4.
7514 * tst-barrier4.c: New file.
7516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7517 (__pthread_cond_timedwait): Perform timeout test while holding
7518 internal lock to prevent wakeup race.
7519 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7520 * sysdeps/pthread/pthread_cond_timedwait.c
7521 (__pthread_cond_timedwait): Likewise.
7522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7523 (__pthread_cond_timedwait): Likewise.
7525 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7527 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7528 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7529 * Makefile (tests): Add tst-rwlock13.
7530 * tst-rwlock13.c: New test.
7532 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7534 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7535 (__condvar_tw_cleanup): Little optimization.
7536 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7538 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7540 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7541 libpthread as "lib" parameter to SHLIB_COMPAT.
7542 (__novmx_siglongjmp): Fix typo in function name.
7543 (__novmx_longjmp): Fix typo in function name.
7545 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7547 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7550 * sysdeps/generic/pt-longjmp.c: Moved to...
7551 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7553 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7555 * Makefile (libpthread-routines): Add pt-cleanup.
7556 * pt-longjmp.c: Removed.
7557 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7558 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7559 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7560 Version longjmp, siglongjmp for GLIBC_2.3.4.
7561 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7563 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7565 * sysdeps/pthread/pthread_cond_timedwait.c
7566 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7567 Reuse code. Add __builtin_expects.
7569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7570 (__pthread_cond_timedwait): Get internal lock in case timeout has
7571 passed before the futex syscall.
7572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7574 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7576 * allocatestack.c: Pretty printing.
7578 * sysdeps/pthread/createthread.c (create_thread): Don't add
7579 CLONE_DETACHED bit if it is not necessary.
7581 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7583 * pthread_getattr_np.c: Include ldsodefs.h.
7585 2004-01-16 Richard Henderson <rth@redhat.com>
7587 * allocatestack.c: Don't declare __libc_stack_end.
7588 * init.c (__pthread_initialize_minimal_internal): Likewise.
7589 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7591 2004-01-15 Richard Henderson <rth@redhat.com>
7593 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7594 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7595 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7596 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7597 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7598 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7599 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7600 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7602 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7604 * init.c (pthread_functions): Make array const.
7606 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7608 * allocatestack.c (__make_stacks_executable): Change interface.
7609 Check parameters. Pass parameter on to libc counterpart.
7610 * pthreadP.h: Change declaration.
7612 2004-01-13 Richard Henderson <rth@redhat.com>
7614 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7616 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7619 * sysdeps/alpha/Makefile: New file.
7620 * sysdeps/alpha/tcb-offsets.sym: New file.
7621 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7622 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7624 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7627 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7629 * Makefile (tests): Add tst-backtrace1.
7630 * tst-backtrace1.c: New test.
7632 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7634 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7635 register as second parameter to the REGISTER macro.
7636 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7637 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7638 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7639 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7640 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7641 of thread register as second parameter to REGISTER macro in 64 case.
7643 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7645 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7646 (CFLAGS-getpid.o): Defined.
7647 (CFLAGS-getpid.os): Defined.
7649 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7651 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7652 returned for main thread does not overlap with any other VMA.
7653 Patch by Jakub Jelinek.
7655 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7657 * tst-raise1.c: Include stdio.h.
7659 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7661 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7662 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7663 If pid is 0, set it to selftid.
7664 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7665 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7666 != 0, return self->tid without doing a syscall.
7667 * descr.h (struct pthread): Move pid field after tid.
7669 * Makefile (tests): Add tst-raise1.
7670 * tst-raise1.c: New file.
7672 2003-12-23 Roland McGrath <roland@redhat.com>
7674 * tst-oddstacklimit.c: New file.
7675 * Makefile (tests): Add it.
7676 (tst-oddstacklimit-ENV): New variable.
7678 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7679 value up to page size for __default_stacksize.
7681 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7683 * Makefile (tests): Add tst-eintr5.
7684 * tst-eintr5.c: New file.
7686 * eintr.c (eintr_source): Prevent sending signal to self.
7688 * tst-eintr2.c (tf1): Improve error message.
7690 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7692 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7693 * sysdeps/unix/sysv/linux/getpid.c: New file.
7694 * pthread_cancel.c: Add comment explaining use of PID field.
7695 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7696 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7697 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7698 temporarily to signal the field must not be relied on and updated
7700 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7701 temporarily negative.
7702 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7704 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7706 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7707 (eintr_source): If ARG != NULL, use pthread_kill.
7708 * tst-eintr1.c: Adjust for this change.
7709 * tst-eintr2.c: Likewise.
7710 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7711 * tst-eintr3.c: New file.
7712 * tst-eintr4.c: New file.
7714 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7716 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7717 if CANCELSTATE_BITMASK is set.
7718 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7721 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7722 (tests-reverse): Add tst-cancel23.
7723 * tst-cancel22.c: New test.
7724 * tst-cancel23.c: New test.
7726 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7728 * tst-eintr1.c: Better error messages.
7730 * Makefile (tests): Add tst-eintr2.
7731 * tst-eintr2.c: New file.
7733 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7735 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7736 (CFLAGS-tst-cancelx21.c): Set.
7737 * tst-cancel21.c: New test.
7738 * tst-cancelx21.c: New test.
7740 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7742 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7743 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7744 * pt-longjmp.c: Include jmpbuf-unwind.h.
7745 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7746 _JMPBUF_UNWINDS. Adjust compared pointers.
7747 * init.c (__pthread_initialize_minimal_internal): Initialize
7748 pd->stackblock_size.
7749 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7750 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7751 * sysdeps/i386/jmpbuf-unwind.h: New file.
7752 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7753 * sysdeps/s390/jmpbuf-unwind.h: New file.
7754 * sysdeps/sh/jmpbuf-unwind.h: New file.
7755 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7756 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7757 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7758 (_JMPBUF_CFA_UNWINDS): Remove.
7759 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7761 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7763 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7764 (CFLAGS-tst-cancelx20.c): Set.
7765 * tst-cancel20.c: New test.
7766 * tst-cancelx20.c: New test.
7768 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7770 * init.c (__pthread_initialize_minimal_internal): Don't treat
7771 architectures with separate register stack special here when
7772 computing default stack size.
7774 2003-12-17 Roland McGrath <roland@redhat.com>
7776 * Makefile (tst-cancelx7-ARGS): New variable.
7777 Reportd by Greg Schafer <gschafer@zip.com.au>.
7779 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7781 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7782 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7783 (tst-stack3-ENV): Set.
7784 ($(objpfx)tst-stack3-mem): New.
7785 * tst-stack3.c: New test.
7787 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7789 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7790 Add unwind directives. Drop unused .regstk directive.
7791 (_fini_EPILOG_BEGINS): Add unwind directives.
7793 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7795 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7796 Assume parameter is a pointer.
7797 (lll_futex_wake): Likewise.
7798 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7800 (lll_futex_wake): Likewise.
7801 Reported by Boris Hu.
7802 * sysdeps/unix/sysv/linux/unregister-atfork.c
7803 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7805 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7807 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7809 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7810 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7811 __rtld_lock_initialize for ld.so lock.
7812 Patch in part by Adam Li <adam.li@intel.com>.
7814 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7816 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7817 in $(gnulib). Also, remove stale comment.
7819 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7821 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7822 advantage of new syscall stub and optimize accordingly.
7824 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7825 from SYS_futex, to match expectations of
7826 sysdep.h:DO_INLINE_SYSCALL.
7827 (lll_futex_clobbers): Remove.
7828 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7829 (lll_futex_wake): Likewise.
7830 (lll_futex_requeue): Likewise.
7831 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7832 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7834 (__lll_mutex_lock): Likewise.
7835 (__lll_mutex_cond_lock): Likewise.
7836 (__lll_mutex_timed_lock): Likewise.
7837 (__lll_mutex_unlock): Likewise.
7838 (__lll_mutex_unlock_force): Likewise.
7840 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7841 comes before the include of <sysdep.h>.
7842 (THREAD_SELF_SYSINFO): New macro.
7843 (THREAD_SYSINFO): Likewise.
7844 (INIT_SYSINFO): New macro.
7845 (TLS_INIT_TP): Call INIT_SYSINFO.
7847 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7849 * sysdeps/pthread/createthread.c (create_thread): Use
7850 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7851 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7852 THREAD_SELF_SYSINFO instead of open code.
7853 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7854 (THREAD_SYSINFO): Likewise.
7856 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7858 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7860 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7862 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7863 instead of .init. Patch by David Mosberger.
7865 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7867 * sysdeps/pthread/configure.in: Remove broken declaration in C
7868 cleanup handling check.
7870 2003-11-30 Andreas Jaeger <aj@suse.de>
7872 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7873 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7876 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7878 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7879 * pthread_attr_destroy.c: Include shlib-compat.h.
7880 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7881 is set in iattr->flags.
7882 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7884 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7886 * Makefile (distribute): Add tst-cleanup4aux.c.
7888 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7891 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7893 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7894 pthread_cond_signal.
7896 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7897 store mutex address if the current value is ~0l.
7898 * sysdeps/pthread/pthread_cond_timedwait.c
7899 (__pthread_cond_timedwait): Likewise.
7900 * sysdeps/pthread/pthread_cond_broadcast.c
7901 (__pthread_cond_broadcast): Don't use requeue for pshared
7904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7905 (__pthread_cond_wait): Don't store mutex address if the current
7907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7908 (__pthread_cond_timedwait): Likewise.
7909 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7910 (__pthread_cond_broadcast): Don't use requeue for pshared
7913 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7914 element with ~0l for pshared condvars, with NULL otherwise.
7916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7917 (__pthread_cond_wait): Don't store mutex address if the current
7919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7920 (__pthread_cond_timedwait): Likewise.
7921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7922 (__pthread_cond_broadcast): Don't use requeue for pshared
7925 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7926 * tst-cond12.c: New file.
7927 * tst-cond13.c: New file.
7929 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7931 * sysdeps/pthread/configure.in: Make missing forced unwind support
7934 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7936 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7938 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7940 * Makefile: Add magic to clean up correctly.
7942 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7944 * unwind.c (FRAME_LEFT): Define.
7945 (unwind_stop): Handle old style cleanups here.
7946 (__pthread_unwind): Handle old style cleanups only if
7947 !HAVE_FORCED_UNWIND.
7948 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7949 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7950 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7951 ($(objpfx)tst-cleanupx4): Likewise.
7952 * tst-cleanup4.c: New test.
7953 * tst-cleanup4aux.c: New.
7954 * tst-cleanupx4.c: New test.
7956 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7958 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7959 lll_mutex_*lock macros to skip atomic operations on some archs.
7961 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7963 * sysdeps/pthread/tst-timer.c (main): Initialize
7964 sigev2.sigev_value as well.
7966 2003-10-15 Roland McGrath <roland@redhat.com>
7968 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7970 * sysdeps/pthread/configure: Regenerated.
7972 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7974 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7975 locking macros. No distinction between normal and mutex locking
7977 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7978 Merge bits from lowlevelmutex.S we still need.
7979 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7980 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7981 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7982 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7983 new mutex implementation.
7984 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7985 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7986 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7987 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7988 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7989 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7990 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7991 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7992 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7993 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7994 symbol for entry point to avoid cancellation.
7996 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7998 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8000 (SAVE_OLDTYPE_0): Fix a typo.
8002 2003-10-03 Ulrich Drepper <drepper@redhat.com>
8004 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8005 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8007 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8009 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8012 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8014 * Makefile (tests): Add tst-cancel19.
8015 * tst-cancel19.c: New test.
8017 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8019 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8020 restoring of the old cancellation type.
8022 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8024 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8026 2003-09-27 Wolfram Gloger <wg@malloc.de>
8028 * sysdeps/pthread/malloc-machine.h: New file
8030 2003-09-24 Roland McGrath <roland@redhat.com>
8032 * allocatestack.c (__make_stacks_executable): Don't ignore return
8033 value from _dl_make_stack_executable.
8035 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8037 * allocatestack.c (__make_stacks_executable): Also change
8038 permission of the currently unused stacks.
8040 * allocatestack.c (change_stack_perm): Split out from
8041 __make_stacks_executable.
8042 (allocate_stack): If the required permission changed between the time
8043 we started preparing the stack and queueing it, change the permission.
8044 (__make_stacks_executable): Call change_stack_perm.
8046 * Makefile: Build tst-execstack-mod locally.
8047 * tst-execstack-mod.c: New file.
8049 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8051 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8053 2003-09-23 Roland McGrath <roland@redhat.com>
8055 * tst-execstack.c: New file.
8056 * Makefile (tests): Add it.
8057 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8058 (LDFLAGS-tst-execstack): New variable.
8060 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8061 whether to use PROT_EXEC for stack mmap.
8062 (__make_stacks_executable): New function.
8063 * pthreadP.h: Declare it.
8064 * init.c (__pthread_initialize_minimal_internal): Set
8065 GL(dl_make_stack_executable_hook) to that.
8067 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8069 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8070 recommendation from AMD re avoidance of lock prefix.
8072 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8074 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8075 lll_futex_timed_wait instead of lll_futex_wait.
8076 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8077 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8078 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8079 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8080 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8081 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8082 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8083 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8084 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8085 Completely revamp the locking macros. No distinction between
8086 normal and mutex locking anymore.
8087 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8088 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8089 __lll_lock_timedwait): Fix prototypes.
8090 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8091 __lll_lock_timedwait): Likewise.
8092 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8093 macros, add __builtin_expect.
8094 (lll_mutex_timedlock): Likewise. Fix return value.
8095 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8096 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8097 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8098 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8099 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8100 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8101 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8102 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8104 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8106 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8107 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8108 operation if possible.
8110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8111 like jumping over the lock prefix.
8113 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8115 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8116 locking macros. No distinction between normal and mutex locking
8118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8119 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8120 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8121 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8122 locking. Merge bits from lowlevelmutex.S we still need.
8123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8124 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8125 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8126 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8127 * Makefile (routines): Remove libc-lowlevelmutex.
8128 (libpthread-rountines): Remove lowlevelmutex.
8129 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8130 for new mutex implementation.
8131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8132 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8139 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8140 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8141 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8144 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8146 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8148 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8150 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8151 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8155 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8157 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8160 in parameters of asm with output parameters.
8162 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8163 type of DECR parameter to int.
8164 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8166 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8168 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8169 guardsize for each thread.
8171 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8173 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8174 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8175 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8177 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8178 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8180 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8181 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8182 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8183 (pthread_getaffinity_np): Add hidden_def.
8185 * Makefile (tests): Add tst-attr3.
8186 * tst-attr3.c: New test.
8188 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8190 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8192 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8193 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8195 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8197 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8198 * tst-align.c: Include tst-stack-align.h.
8199 (tf, do_test): Use TEST_STACK_ALIGN macro.
8201 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8203 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8206 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8208 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8209 stack-related values for the initial thread.
8211 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8213 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8215 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8217 * pthread_mutex_lock.c: Minor code rearrangements.
8219 2003-09-05 Roland McGrath <roland@redhat.com>
8221 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8222 Instead, include ../nptl_db/db_info.c to do its magic.
8223 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8224 (__pthread_pthread_key_2ndlevel_size): Likewise.
8225 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8226 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8227 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8228 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8229 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8230 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8231 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8232 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8233 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8234 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8235 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8236 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8237 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8238 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8239 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8240 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8241 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8243 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8245 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8246 of pthread_t to be compatible with LT.
8247 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8248 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8249 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8250 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8251 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8252 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8253 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8255 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8257 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8259 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8261 * unwind-forcedunwind.c: Move to...
8262 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8263 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8264 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8265 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8266 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8267 * unwind.c: Include jmpbuf-unwind.h.
8268 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8270 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8272 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8273 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8274 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8275 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8276 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8277 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8278 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8279 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8280 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8281 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8282 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8284 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8285 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8286 * Makefile (tests): Add tst-stack2.
8287 * tst-stack2.c: New test.
8288 * tst-stack1.c: Include limits.h and sys/param.h.
8289 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8291 * pthread_condattr_setpshared.c: Include errno.h.
8292 (pthread_condattr_setpshared): Return EINVAL if pshared
8293 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8295 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8296 defined symbol for entry point to avoid cancellation.
8297 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8299 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8301 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8303 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8305 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8307 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8308 __close_nocancel, __read_nocancel, __write_nocancel,
8309 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8310 libpthread.so or librt.so, define to corresponding function
8311 without _nocancel suffix.
8312 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8313 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8314 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8316 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8318 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8320 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8321 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8323 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8324 in subsections has a symbol associated with it.
8326 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8327 defined symbol for entry point to avoid cancellation.
8328 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8330 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8332 * Makefile (tests): Add tst-tls5.
8333 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8334 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8335 ($(objpfx)tst-tls5): New.
8336 ($(objpfx)tst-tls6.out): Likewise.
8337 (tests): Depend on $(objpfx)tst-tls6.out.
8338 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8339 (do_test): Check pthread_self () return value alignment.
8340 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8341 (tf): Check pthread_self () return value alignment.
8342 * tst-tls5.c: New test.
8344 * tst-tls5mod.c: New.
8345 * tst-tls5moda.c: New.
8346 * tst-tls5modb.c: New.
8347 * tst-tls5modc.c: New.
8348 * tst-tls5modd.c: New.
8349 * tst-tls5mode.c: New.
8350 * tst-tls5modf.c: New.
8351 * tst-tls6.sh: New test.
8353 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8354 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8355 * init.c (pthread_functions): Initialize them.
8356 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8357 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8358 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8359 pthread_cond_timedwait@@GLIBC_2.3.2.
8361 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8363 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8364 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8365 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8366 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8367 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8368 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8370 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8372 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8373 _POSIX_THREAD_PRIORITY_SCHEDULING.
8374 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8376 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8378 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8379 nested function, use static inline function from libio.h.
8380 Code by Richard Henderson.
8382 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8385 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8387 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8388 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8389 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8390 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8391 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8392 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8393 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8394 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8395 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8396 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8397 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8398 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8399 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8400 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8401 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8402 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8403 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8404 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8405 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8406 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8407 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8408 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8409 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8410 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8411 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8412 * sysdeps/sparc/tls.h: New file.
8413 * sysdeps/sparc/tcb-offsets.sym: New file.
8414 * sysdeps/sparc/Makefile: New file.
8415 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8416 * init.c [__sparc__] (__NR_set_tid_address): Define.
8418 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8420 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8421 _IO_release_lock): Define.
8423 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8425 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8426 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8428 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8430 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8431 (__pthread_cleanup_class): Add missing return types of member
8434 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8436 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8437 (lll_mutex_unlock_force): Add memory barrier between store and futex
8440 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8442 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8443 tempmsg in first loop.
8445 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8447 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8448 _POSIX_THREAD_PRIORITY_SCHEDULING.
8449 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8451 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8453 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8454 (__rtld_lock_default_lock_recursive,
8455 __rtld_lock_default_unlock_recursive): Define.
8456 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8457 __rtld_lock_unlock_recursive): Define using
8458 GL(_dl_rtld_*lock_recursive).
8459 * init.c (__pthread_initialize_minimal_internal): Initialize
8460 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8461 Lock GL(_dl_load_lock) the same number of times as
8462 GL(_dl_load_lock) using non-mt implementation was nested.
8464 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8465 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8467 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8469 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8472 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8474 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8476 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8478 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8479 to first syscall error check. Move syscall error check for tkill
8480 into __ASSUME_CLONE_STOPPED #ifdef.
8482 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8484 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8485 is not defined, do explicit synchronization.
8486 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8487 is not defined also unlock pd->lock for non-debugging case in case
8489 * pthread_create.c (start_thread): Always get and release pd->lock
8490 if __ASSUME_CLONE_STOPPED is not defined.
8491 (start_thread_debug): Removed. Adjust users.
8492 * allocatestack.c (allocate_stack): Always initialize lock if
8493 __ASSUME_CLONE_STOPPED is not defined.
8494 * Makefile (tests): Add tst-sched1.
8495 * tst-sched1.c: New file.
8497 * sysdeps/pthread/createthread.c (do_clone): Only use
8498 sched_setschduler and pass correct parameters.
8500 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8502 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8503 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8504 PTHREAD_STACK_MIN in comments.
8506 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8508 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8509 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8511 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8512 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8513 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8514 (__pthread_cleanup_upto): Fix prototype.
8515 (_longjmp_unwind): Adjust caller.
8516 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8517 Change second argument to const struct pointer.
8518 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8519 * tst-sem9.c (main): Likewise.
8520 * unwind.c: Include string.h for strlen prototype.
8522 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8525 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8526 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8528 Patch by Nicholas Miell <nmiell@attbi.com>.
8530 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8532 * init.c (__pthread_initialize_minimal_internal): Initialize
8533 GL(dl_init_static_tls).
8534 * pthreadP.h (__pthread_init_static_tls): New prototype.
8535 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8537 * Makefile (tests): Add tst-tls4.
8538 (modules-names): Add tst-tls4moda and tst-tls4modb.
8539 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8540 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8542 * tst-tls4.c: New file.
8543 * tst-tls4moda.c: New file.
8544 * tst-tls4modb.c: New file.
8546 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8548 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8549 before __timer_dealloc.
8550 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8551 Don't call list_unlink.
8553 2003-07-29 Roland McGrath <roland@redhat.com>
8555 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8557 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8559 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8560 Don't reuse struct aiocb A if it failed.
8561 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8562 not just one byte, as that does not block.
8564 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8566 * sysdeps/pthread/unwind-resume.c: New file.
8567 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8568 unwind-resume in csu subdir.
8569 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8571 (librt-sysdep_routines, librt-shared-only-routines): Add
8573 * sysdeps/pthread/rt-unwind-resume.c: New file.
8574 * unwind-forcedunwind.c: New file.
8575 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8576 (libpthread-shared-only-routines): Likewise.
8577 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8578 * pthreadP.h (pthread_cancel_init): New prototype.
8579 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8581 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8582 attr argument const struct pthread_attr *.
8584 * res.c (__res_state): Return __resp.
8585 * descr.h: Include resolv.h.
8586 (struct pthread): Add res field.
8587 * pthread_create.c: Include resolv.h.
8588 (start_thread): Initialize __resp.
8589 * Makefile (tests): Add tst-_res1.
8590 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8591 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8592 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8594 * tst-_res1.c: New file.
8595 * tst-_res1mod1.c: New file.
8596 * tst-_res1mod2.c: New file.
8598 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8600 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8602 * Makefile: Define various *-no-z-defs variables for test DSOs
8603 which has undefined symbols.
8605 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8607 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8608 Retry if the stwcx fails to store once_control.
8610 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8612 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8613 pthread_attr_setaffinity.
8614 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8615 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8616 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8617 * pthread_attr_destroy.c: Free cpuset element if allocated.
8618 * pthread_create.c: Pass iattr as additional parameter to
8620 * sysdeps/pthread/createthread.c: If attribute is provided and
8621 a new thread is created with affinity set or scheduling parameters,
8622 start thread with CLONE_STOPPED.
8623 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8624 pthread_attr_setaffinity.
8625 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8628 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8630 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8632 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8634 * sysdeps/pthread/configure.in: Require CFI directives also for
8637 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8639 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8642 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8644 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8646 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8647 registers as variables. Call __pthread_mutex_unlock_usercnt.
8648 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8649 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8650 not self pointer in __writer. Compare with TID to determine
8652 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8657 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8658 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8659 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8660 macros also when compiling librt.
8662 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8664 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8665 -fasynchronous-unwind-tables.
8666 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8667 (PSEUDO): Add cfi directives.
8668 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8670 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8673 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8675 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8676 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8677 * unwind.c (__pthread_unwind_next): Add hidden_def.
8678 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8680 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8681 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8682 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8684 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8685 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8687 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8688 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8689 __pthread_unregister_cancel and __pthread_unwind_next.
8691 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8693 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8694 different symbol for the cancellation syscall wrapper and
8695 non-cancellation syscall wrapper.
8696 (PSEUDO_END): Define.
8698 2003-07-05 Richard Henderson <rth@redhat.com>
8700 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8701 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8702 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8703 return actual return value from the syscall, not 0.
8705 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8707 * descr.h (struct pthread): Add pid field.
8708 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8709 (__reclaim_stacks): Likewise.
8710 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8711 also check for PID of the signal source.
8712 (__pthread_initialize_minimal_internal): Also initialize pid field
8713 of initial thread's descriptor.
8714 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8715 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8716 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8717 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8718 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8720 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8722 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8723 Fix use of parameter.
8724 (__libc_cleanup_pop): Likewise.
8726 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8728 * init.c (sigcancel_handler): Change parameters to match handler
8729 for SA_SIGACTION. Check signal number and code to recognize
8730 invalid invocations.
8732 2003-07-03 Roland McGrath <roland@redhat.com>
8734 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8735 Apply sizeof (struct pthread) bias to r13 value.
8737 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8739 * sysdeps/pthread/configure.in: Require CFI directives.
8741 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8743 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8744 libpthread compilation.
8745 * unwind.c (__pthread_unwind): Add hidden_def.
8746 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8748 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8750 * libc-cancellation.c (__libc_cleanup_routine): Define.
8751 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8752 (__pthread_cleanup_pop): Define.
8754 2003-07-01 Richard Henderson <rth@redhat.com>
8756 * sysdeps/alpha/elf/pt-initfini.c: New file.
8757 * sysdeps/alpha/pthread_spin_lock.S: New file.
8758 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8759 * sysdeps/alpha/pthreaddef.h: New file.
8760 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8761 * sysdeps/alpha/tls.h: New file.
8762 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8763 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8764 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8765 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8766 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8767 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8768 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8769 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8770 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8771 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8773 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8775 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8776 cleanup support and unwind info.
8778 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8780 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8781 Use correct cleanup handler registration. Add unwind info.
8782 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8783 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8784 * tst-once3.c: Add cleanup handler and check it is called.
8785 * tst-once4.c: Likewise.
8786 * tst-oncex3.c: New file.
8787 * tst-oncex4.c: New file.
8788 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8790 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8792 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8794 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8796 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8797 (tf_msgsnd): Likewise.
8799 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8800 premature returns a bit more.
8802 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8804 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8805 definition to the front.
8807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8808 the cleanup functions to make the names unique. Fix dwarf opcode
8810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8811 functions to make the names unique. Fix CFA offset for two blocks.
8813 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8815 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8816 missing closing braces.
8817 Patch by Christophe Saout <christophe@saout.de>.
8819 2003-06-24 Roland McGrath <roland@redhat.com>
8821 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8823 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8825 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8826 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8828 * pthreadP.h: Declare __find_thread_by_id.
8829 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8830 * pthread_clock_gettime.c: Allow using other thread's clock.
8831 * pthread_clock_settime.c: Likewise.
8832 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8833 * Makefile: Add rules to build and run tst-clock2.
8834 * tst-clock2.c: New file.
8836 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8839 to use exception-based cleanup handler.
8840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8842 * tst-cond8.c (ch): Announce that we are done.
8844 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8846 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8847 Also test aio_suspend with timeout value.
8849 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8851 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8852 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8855 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8856 (__pthread_mutex_lock_internal): Likewise.
8857 (__pthread_mutex_unlock_internal): Likewise.
8858 (__pthread_mutex_unlock_usercnt): Declare.
8859 * pthread_mutex_destroy.c: Always fail if used in any way.
8860 * pthread_mutex_init.c: Update comment.
8861 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8862 * pthread_mutex_timedlock.c: Adjust __nusers.
8863 * pthread_mutex_trylock.c: Adjust __nusers.
8864 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8865 and public interfaces are wrapper with pass additional parameter.
8866 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8868 * tst-mutex8.c: New file.
8869 * Makefile (tests): Add tst-mutex8.
8870 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8871 __pthread_mutex_unlock_usercnt.
8872 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8873 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8876 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8877 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8878 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8880 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8881 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8882 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8883 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8886 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8887 * pthread_mutex_timedlock.c: Likewise.
8888 * pthread_mutex_trylock.c: Adjust __nusers.
8889 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8890 * tst-mutex9.c: New file.
8891 * Makefile (tests): Add tst-mutex9.
8892 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8893 * sysdeps/ia64/tls.h: Likewise.
8894 * sysdeps/powerpc/tls.h: Likewise.
8895 * sysdeps/s390/tls.h: Likewise.
8896 * sysdeps/sh/tls.h: Likewise.
8897 * sysdeps/x86_64/tls.h: Likewise.
8898 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8899 Change type of __owner.
8900 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8901 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8902 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8903 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8904 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8906 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8908 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8909 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8911 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8912 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8913 instead of nr to lll_futex_wake. Only set errno and return -1
8916 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8917 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8918 return actual return value from the syscall, not 0.
8920 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8922 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8923 find a random value.
8924 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8927 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8928 compat_timer_settime.
8929 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8930 compat_timer_gettime.
8931 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8932 compat_timer_getoverrun.
8933 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8934 compat_timer_delete.
8936 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8937 error-checking mutex detect busy mutexes.
8939 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8941 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8942 Add ax to clobber list.
8943 (lll_mutex_cond_lock): Likewise.
8944 (lll_mutex_unlock): Likewise.
8945 (lll_lock): Likewise.
8946 (lll_unlock): Likewise.
8948 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8949 * tst-cancel18.c: New file.
8950 * tst-cancelx18.c: New file.
8952 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8955 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8956 * tst-cancel17.c: New file.
8957 * tst-cancelx17.c: New file.
8959 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8960 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8961 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8963 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8965 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8967 * sysdeps/pthread/createthread.c (create_thread): Set
8968 header.multiple_threads unconditionally.
8969 * allocatestack.c (allocate_stack): Likewise.
8970 * descr.h (struct pthread): Add header.multiple_threads
8972 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8973 Define for librt. #error if neither libpthread, libc nor librt.
8974 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8976 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8977 CDISABLE): Likewise.
8978 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8979 CDISABLE): Likewise.
8980 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8981 CDISABLE): Likewise.
8982 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8983 CDISABLE): Likewise. Access header.multiple_threads outside of
8984 libc and libpthread.
8985 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8987 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8988 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8990 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8992 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8993 Also test early cancellation before the thread reaches the cancellation
8996 * Makefile: Compile forward.c with exceptions.
8998 * sysdeps/unix/sysv/linux/sleep.c: New file.
9000 2003-06-16 Ulrich Drepper <drepper@redhat.com>
9002 * Makefile: Add CFLAGS definition to compile function wrappers
9003 duplicated from libc with exceptions.
9004 * tst-cancel4.c: Also check cancellation handlers.
9006 * Makefile: Add rules to build and run tst-cancel16 and
9007 tst-cancelx16. Add missing CFLAGS definitions.
9008 * tst-cancel16.c: New file.
9009 * tst-cancelx16.c: New file.
9011 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9013 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9014 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9015 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9016 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9018 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9019 (LIBC_CANCEL_RESET): Likewise.
9020 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9021 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9023 (CFLAGS-libcrt-cancellation.c): Define.
9024 * sysdeps/pthread/librt-cancellation.c: New file.
9025 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9026 macros also when compiling librt.
9027 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9028 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9029 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9030 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9031 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9032 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9033 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9035 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9036 compat_timer_create.
9038 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9040 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9042 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9044 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9045 Add libc_hidden_def.
9047 2003-06-13 Roland McGrath <roland@redhat.com>
9049 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9050 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9052 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9054 * allocatestack.c (queue_stack): Always inline.
9055 * ptreadhP.h (__do_cancel): Likewise.
9057 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9059 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9062 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9065 (__pthread_cond_signal): Remove incorrect second addition for
9068 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9070 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9071 (__pthread_cond_signal): Use correct futex pointer in
9072 __lll_mutex_lock_wait call.
9074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9075 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9077 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9079 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9081 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9084 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9085 hand-written CFI generation code. Since ENTRY/END also initiated
9086 CFI frames this caused two CFI sets to be generated.
9088 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9090 * cleanup_routine.c: New file.
9091 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9092 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9094 * Makefile (libpthread-routines): Add cleanup_routine.
9095 Add more CFLAGS variables to compile with exceptions. Add comments
9096 why which file needs unwind tables.
9097 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9099 * tst-cancelx1.c: New file.
9100 * tst-cancelx2.c: New file.
9101 * tst-cancelx3.c: New file.
9102 * tst-cancelx4.c: New file.
9103 * tst-cancelx5.c: New file.
9104 * tst-cancelx6.c: New file.
9105 * tst-cancelx7.c: New file.
9106 * tst-cancelx8.c: New file.
9107 * tst-cancelx9.c: New file.
9108 * tst-cancelx10.c: New file.
9109 * tst-cancelx11.c: New file.
9110 * tst-cancelx12.c: New file.
9111 * tst-cancelx13.c: New file.
9112 * tst-cancelx14.c: New file.
9113 * tst-cancelx15.c: New file.
9114 * tst-cleanupx0.c: New file.
9115 * tst-cleanupx0.expect: New file.
9116 * tst-cleanupx1.c: New file.
9117 * tst-cleanupx2.c: New file.
9118 * tst-cleanupx3.c: New file.
9120 * tst-cleanup0.c: Make standard compliant.
9121 * tst-cleanup1.c: Likewise.
9123 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9124 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9125 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9126 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9127 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9128 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9129 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9131 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9132 * tst-cancel12.c: New file.
9133 * tst-cancel13.c: New file.
9134 * tst-cancel14.c: New file.
9135 * tst-cancel15.c: New file.
9136 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9139 * tst-cancel1.c: Add some comments.
9141 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9144 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9146 * Makefile (CFLAGS-pthread_cancel.c): Define.
9148 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9150 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9151 Change type of __writer element to int.
9152 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9153 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9154 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9155 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9156 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9157 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9158 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9159 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9160 Compare with TID to determine deadlocks.
9161 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9162 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9163 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9164 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9165 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9170 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9172 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9176 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9177 * Makefile (tests): Add tst-rwlock12.
9178 * tst-rwlock12.c: New file.
9180 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9182 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9183 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9184 Remove bogus hidden_proto.
9185 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9187 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9188 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9189 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9190 ___lll_mutex_timedlock): Likewise.
9192 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9195 (__pthread_cond_signal): Add some code to eventually handle
9198 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9200 * Makefile (tests): Add tst-exec4.
9201 (tst-exec4-ARGS): Define.
9202 * tst-exec4.c: New file.
9204 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9206 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9207 Also fail if tv_nsec < 0.
9208 (__lll_timedwait_tid): Likewise.
9209 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9210 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9212 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9214 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9216 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9218 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9220 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9223 * Makefile (tests): Add tst-sem8 and tst-sem9.
9224 * tst-sem8.c: New file.
9225 * tst-sem9.c: New file.
9226 * sem_open.c: Fix creation of in_use record if the file exists but
9229 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9232 * sysdeps/pthread/timer_create.c (timer_create): In case
9233 evp==NULL, assign timer ID to sival_ptr.
9235 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9236 struct pthread_unwind_buf *.
9237 (struct pthread): Likewise for cleanup_jmp_buf element.
9239 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9240 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9241 * unwind.c (__pthread_unwind_next): Likewise.
9243 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9245 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9246 (lll_futex_timed_wait): Use int for futex value parameter.
9247 (lll_futex_wake): Likewise.
9248 (lll_futex_requeue): Likewise.
9250 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9251 Replace one memory operation with one register operation.
9253 * tst-join4.c (do_test): Fix error message.
9255 * tst-rwlock6.c (do_test): Use correct format specifier.
9257 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9258 (__lll_mutex_lock_wait): Replace one memory operation with one
9260 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9261 (__lll_mutex_lock_wait): Likewise.
9263 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9264 (__lll_mutex_cond_lock): Add one to value parameter of
9265 __lll_lock_wait to reflect reality in the futex syscall.
9266 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9267 (lll_mutex_cond_lock): Likewise.
9269 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9271 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9273 (lll_mutex_cond_lock): Define.
9275 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9277 * Makefile (tests): Add tst-signal6.
9278 * tst-signal6.c: New file.
9280 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9281 (__lll_mutex_unlock_force): New function
9282 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9284 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9285 (__lll_mutex_unlock_force): New function.
9286 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9288 * tst-rwlock7.c (do_test): Use correct format specifier.
9290 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9291 Find break parameter in correct asm argument.
9293 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9295 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9297 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9299 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9301 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9302 lll_futex_requeue, lll_mutex_unlock_force): Define.
9304 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9306 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9307 (pthread_cond_t): Add __mutex.
9308 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9309 lll_futex_requeue, lll_mutex_unlock_force): Define.
9311 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9313 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9314 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9316 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9318 (lll_futex_wait, lll_futex_wake): Define.
9319 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9320 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9321 FUTEX_REQUEUE instead of FUTEX_WAIT.
9322 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9323 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9324 mutex which was used in condvar structure. Call
9325 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9326 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9328 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9329 include tcb-offsets.h. Read wakeup value in locked region.
9330 Use the value of gbr register as THREAD_ID.
9331 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9332 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9335 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9338 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9340 * sysdeps/pthread/pthread_cond_broadcast.c
9341 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9343 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9346 typo in register name.
9347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9348 correctly. Actually use requeue. Little optimization.
9349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9350 mutex address early. Handle cancellation state as 32-bit value.
9351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9352 Remove unnecessary label.
9354 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9356 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9357 instead of FUTEX_WAIT.
9358 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9361 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9363 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9364 used in condvar structure. Call __pthread_mutex_cond_lock instead
9365 of __pthread_mutex_lock_internal.
9366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9368 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9369 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9370 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9372 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9373 Add pthread_mutex_cond_lock.
9374 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9375 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9377 lll_mutex_cond_lock.
9378 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9379 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9380 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9382 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9383 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9385 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9386 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9388 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9389 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9390 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9391 macro don't define aliases.
9393 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9394 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9395 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9396 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9399 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9403 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9405 * sem_open.c: Fix one endless loop. Implement correct semantics
9406 wrt opening the same semaphore more then once.
9407 * sem_close.c: Adjust for sem_open change.
9408 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9409 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9410 * Makefile (tests): Add tst-sem7.
9411 * tst-sem7.c: New file.
9413 2003-05-16 Roland McGrath <roland@redhat.com>
9415 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9416 uninitialized variable braino.
9418 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9420 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9421 test for syscall availability.
9423 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9424 __no_posix_timers to -1 if the syscalls don't exist.
9426 * pthread_join.c (pthread_join): Set tid field of the joined
9427 thread to -1. This isn't necessary but helps to recognize some
9428 error conditions with almost no cost.
9430 * allocatestack.c (FREE_P): Also negative values indicate an
9433 * unwind.c: Include <unistd.h>.
9435 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9437 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9439 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9441 * Makefile (crti-objs, crtn-objs): New variables.
9442 (omit-deps, extra-objs): Add crtn.
9443 ($(objpfx)libpthread.so): Depend on both crti and crtn
9444 and links to them in multidir.
9445 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9447 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9449 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9450 (lll_mutex_unlock): Use atomic_exchange_rel.
9452 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9454 * cond-perf.c (cons): Add missing locking around setting of alldone.
9456 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9458 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9460 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9462 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9464 * tst-sem6.c: New file.
9465 * Makefile (tests): Add tst-sem6.
9467 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9468 Use atomic_exchange_rel instead of atomic_exchange.
9469 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9472 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9473 code for lll_futex_wait and lll_futex_wake in static apps. Use
9474 vsyscall is possible.
9476 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9477 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9478 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9479 pthread_setaffinity_np.
9480 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9481 and pthread_setaffinity_np.
9482 * Makefile (libpthread-routines): Add pthread_getaffinity and
9483 pthread_setaffinity.
9485 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9486 use it in case mmap to allocate the stack fails.
9487 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9488 ARCH_MAP_FLAGS here.
9489 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9492 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9494 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9495 handler implementation. It is now lockless in fork().
9496 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9497 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9498 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9499 declare the __fork_*_lists.
9500 (struct fork_handler): Include pointers to all three functions.
9501 Add next, refcntr and need_signal elements.
9502 (__fork_handlers): New declaration.
9503 (__register_atfork_malloc): Remove declaration.
9504 (HAVE_register_atfork_malloc): Remove definition.
9505 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9506 __pthread_child_handler variable.
9507 (__libc_pthread_init): Use __register_atfork instead of explicitly
9509 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9511 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9513 * unwind.c (unwind_cleanup): Print error message and then abort. This
9514 function must never be reached.
9516 * cond-perf.c: New file.
9518 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9520 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9522 2003-05-04 Roland McGrath <roland@redhat.com>
9524 * Makefile ($(objpfx)../libc.so): New target.
9526 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9528 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9529 (pthread_condattr_t): Size is only an int, don't use long for
9531 (pthread_mutexattr_t): Likewise.
9532 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9533 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9534 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9536 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9538 * sysdeps/i386/tls.h: Define THREAD_ID.
9539 * sysdeps/ia64/tls.h: Likewise.
9540 * sysdeps/powerpc/tls.h: Likewise.
9541 * sysdeps/s390/tls.h: Likewise.
9542 * sysdeps/sh/tls.h: Likewise.
9543 * sysdeps/x86_64/tls.h: Likewise.
9544 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9546 * pthread_mutex_timedlock.c: Likewise.
9547 * pthread_mutex_trylock.c: Likewise.
9548 * pthread_mutex_unlock.c: Likewise.
9549 * pthread_rwlock_trywrlock.c: Likewise.
9550 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9551 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9552 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9553 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9555 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9558 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9560 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9561 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9562 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9563 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9564 Make __align long long instead of long.
9565 (pthread_rwlock_t): Formatting.
9566 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9567 (pthread_rwlock_t): Formatting.
9568 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9569 (pthread_cond_t): Make __align long long instead of long.
9570 (pthread_rwlock_t): Move __flags field to the same position as in
9573 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9575 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9576 * tst-rwlock7.c (do_test): Likewise.
9578 2003-04-26 Roland McGrath <roland@redhat.com>
9580 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9582 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9584 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9585 sizeof (struct pthread).
9586 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9588 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9590 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9592 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9594 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9596 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9598 (NO_TLS_OFFSET): Define.
9599 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9600 add TLS_TCB_SIZE unnecessarily.
9602 2003-04-22 Roland McGrath <roland@redhat.com>
9604 * Makeconfig (shared-thread-library): Reverse link order to work
9607 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9609 * semaphore.h: Fix typo in comment.
9611 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9613 * sysdeps/pthread/sigfillset.c: New file.
9615 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9616 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9617 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9618 * sysdeps/pthread/sigaction.c: Likewise.
9619 * sysdeps/pthread/sigprocmask.c: New file.
9620 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9622 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9623 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9626 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9628 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9629 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9631 * sysdeps/unix/sysv/linux/unregister-atfork.c
9632 (__unregister_atfork): Don't free memory not allocated dynamically.
9634 * semaphore.h: Remove __THROW marker from cancellation points.
9635 * nptl/sysdeps/pthread/pthread.h: Likewise.
9637 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9639 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9640 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9643 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9645 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9647 2003-04-15 Roland McGrath <roland@redhat.com>
9649 * forward.c (__pthread_unwind): Tweak to avoid warning.
9651 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9653 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9655 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9658 overflow CFA advance instructions.
9659 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9661 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9663 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9664 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9665 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9669 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9671 DW_CFA_advance_loc for .Laddl-.Lsubl.
9673 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9675 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9676 position-independent unwind data for static libraries.
9677 Add missing unwind info. Add comments.
9679 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9680 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9684 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9686 * Makefile: Make sure all cancellation points are compiled with
9687 exception and asynchronous unwind tables.
9689 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9690 which mishandles loading of global object addresses in PIC.
9691 (THREAD_SETMEM_NC): Likewise.
9693 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9695 * pthread.h: Define new data structure for cleanup buffer. Declare
9696 new cleanup handler interfaces.
9697 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9698 (struct pthread): Add cleanup_jmp_buf pointer. Define
9699 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9700 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9701 it. Declare old cleanup handler installation functions.
9702 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9704 * cleanup_defer.c: Likewise.
9705 * cleanup_compat.c: New file. Old cleanup code.
9706 * cleanup_def_compat.c: New file. Old cleanup code.
9707 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9708 if own thread descriptor.
9709 * unwind.c: New file.
9710 * forward.c: Add __pthread_unwind.
9711 * init.c (pthread_functions): Add __pthread_unwind.
9712 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9713 Add ptr___pthread_unwind.
9714 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9715 and unwind function.
9716 * Makefile (libpthread-routines): Add cleanup_compat,
9717 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9718 table generation if necessary.
9719 * version.c: Record whether unwind support is compiled in.
9720 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9721 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9723 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9724 complication to generate unwind information for syscall wrappers.
9725 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9726 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9727 __cleanup_fct_attribute.
9729 * Makefile: Add rules to build and run tst-cleanup0.
9730 * tst-cleanup0.c: New file.
9731 * tst-cleanup0.expect: New file.
9733 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9734 caller. Optimize to avoid often unecessary local variable.
9736 2003-04-11 Roland McGrath <roland@redhat.com>
9738 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9739 sets variable `multidir'; include that.
9740 (generated): Add it.
9741 ($(objpfx)$(multidir)/crti.o): New target.
9742 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9744 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9746 * tst-attr2.c (do_test): Add cast to avoid warning.
9747 * tst-mutex4.c (do_test): Likewise.
9749 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9751 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9754 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9756 * Makefile (tests): Add tst-detach1.
9757 * tst-detach1.c: New file.
9759 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9761 * sysdeps/pthread/pthread.h: Remove duplicate
9762 pthread_cleanup_{push,pop} definitions.
9764 * tst-barrier2.c: Eliminate warnings.
9765 * tst-cancel4.c: Likewise.
9766 * tst-cond4.c: Likewise.
9767 * tst-cond6.c: Likewise.
9768 * tst-detach1.c: Likewise.
9769 * tst-rwlock4.c: Likewise.
9770 * tst-rwlock6.c: Likewise.
9771 * tst-rwlock7.c: Likewise.
9772 * tst-sem3.c: Likewise.
9773 * tst-spin2.c: Likewise.
9774 * tst-umask1.c: Likewise.
9776 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9778 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9780 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9782 * descr.h (struct pthread): Move cancelhandling member to the front.
9784 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9786 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9787 malloc_parent, and malloc_child statically.
9788 (__register_atfork_malloc): New function.
9789 (free_mem): Don't free any of the malloc_* variables on the list.
9790 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9791 Define HAVE_register_atfork_malloc.
9793 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9795 * sysdeps/pthread/createthread.c (create_thread): Add some more
9796 comments explaining when to set multiple_threads and when not.
9798 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9799 THREAD_ATOMIC_BIT_SET if not already defined.
9800 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9801 THREAD_ATOMIC_BIT_SET:
9802 * sysdeps/x86_64/tls.h: Likewise.
9803 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9804 THREAD_ATOMIC_CMPXCHG_VAL.
9805 (_pthread_cleanup_pop_restore): Likewise.
9806 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9807 (__pthread_enable_asynccancel_2): Likewise.
9808 (__pthread_disable_asynccancel): Likewise.
9809 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9810 (__libc_disable_asynccancel): Likewise.
9811 * init.c (sigcancel_handler): Likewise.
9812 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9813 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9815 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9817 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9818 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9819 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9820 * Makefile (tests): Add tst-cancel11.
9821 * tst-cancel11.c: New file.
9823 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9825 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9826 round, not the first. Use specific_used flag instead of local
9827 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9828 (__free_tcb): Don't call deallocate_tsd here.
9829 (start_thread): Call deallocate_tsd here.
9830 * pthread_setspecific.c: Set specific_used flag really only when
9832 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9833 * tst-tsd3.c: New file.
9834 * tst-tsd4.c: New file.
9836 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9838 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9839 Use atomic_exchange_and_add instead of __lll_add.
9840 (__lll_mutex_timedlock): Likewise.
9841 Patch by Ian Wienand.
9843 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9845 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9846 (SINGLE_THREAD_P): Fix typo.
9847 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9849 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9851 * Makefile (tests): Add tst-align.
9852 * tst-align.c: New file.
9853 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9855 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9858 * tst-tsd2.c: Add casts to avoid warnings.
9860 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9862 * descr.h (struct pthread): Move most often used elements to the front.
9864 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9866 * Makefile (libpthread-routines): Add pthread_atfork.
9867 (libpthread-static-only-routines): Add pthread_atfork.
9869 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9871 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9873 (INSTALL_DTV): Add parens.
9874 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9875 Use passed descr instead of THREAD_SELF.
9876 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9877 (__lll_mutex_timedlock_wait): Correct expected value after
9879 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9880 Release lock before waking up the waiters.
9881 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9882 criteria. Reorderstruct passed to cleanup handler. Fix
9883 handling of cancellation and failung pthread_mutex_unlock call.
9884 Use __pthread_enable_asynccancel_2 instead of
9885 __pthread_enable_asynccancel.
9886 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9887 Return result of lock re-get if it fails.
9888 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9889 for __pthread_cleanup_push.
9890 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9891 completely broken rwlock implementation.
9892 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9894 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9895 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9896 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9897 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9898 versioned_symbol macro.
9899 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9900 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9902 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9904 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9905 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9907 (struct timer): Remove th and bar field.
9908 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9909 debugging code. Create only one helper thread.
9910 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9912 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9913 Renamed. Define statically. Use thread info from siginfo.
9914 (__helper_once): New variable.
9915 (__helper_tid): New variable.
9916 (__reset_helper_control): New function.
9917 (__start_helper_thread): New function.
9919 * pthread_create.c (start_thread): Don't use setjmp inside
9920 __builtin_expect to work around gcc bug.
9922 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9923 timer_delete syscall fails, but not with ENOSYS, set
9926 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9927 (timer_settime): Fix typo.
9928 * sysdeps/unix/sysv/linux/timer_getoverr.c
9929 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9931 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9934 offset of cleanupbuf.__prev.
9936 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9938 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9941 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9943 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9944 NULL provide default definition to syscall.
9946 2003-03-25 Roland McGrath <roland@redhat.com>
9948 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9949 (timer_id2ptr): Fix typo.
9951 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9953 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9954 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9955 * sysdeps/ia64/pthreaddef.h: Likewise.
9956 * sysdeps/powerpc/pthreaddef.h: Likewise.
9957 * sysdeps/s390/pthreaddef.h: Likewise.
9958 * sysdeps/sh/pthreaddef.h: Likewise.
9959 * sysdeps/x86_64/pthreaddef.h: Likewise.
9960 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9961 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9963 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9964 SIGTIMER is not unblocked.
9965 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9967 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9969 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9970 pass pointer through as ID.
9971 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9972 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9973 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9974 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9975 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9976 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9977 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9978 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9979 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9980 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9981 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9982 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9983 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9984 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9985 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9986 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9987 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9988 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9989 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9990 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9991 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9992 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9993 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9994 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9995 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9996 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9997 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9998 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9999 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10000 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10001 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10002 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10003 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10005 * pthreadP.h: Remove FRAME_LEFT definition.
10006 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10007 already left frame. Programs which have this problem are not POSIX
10009 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10011 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10013 * sysdeps/pthread/tst-timer.c: Check return values of the
10016 2003-03-23 Roland McGrath <roland@redhat.com>
10018 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10019 * tst-tls3mod.c: Likewise.
10020 * tst-tls1.c: Likewise.
10021 * tst-tls2.c: Likewise.
10023 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10024 undefined behavior.
10026 * tst-join5.c (tf1, tf2): Add a cast.
10028 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10030 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10031 Don't test anything.
10032 * tst-cond4.c: Likewise.
10033 * tst-cond6.c: Likewise.
10034 * tst-flock2.c: Likewise.
10035 * tst-mutex4.c: Likewise.
10036 * tst-rwlock4.c: Likewise.
10037 * tst-signal1.c: Likewise.
10038 * tst-spin2.c: Likewise.
10039 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10041 * tst-mutex4.c: Use test-skeleton.c.
10042 * tst-spin2.c: Likewise.
10043 * tst-sysconf.c: Likewise.
10044 * tst-barrier2.c: Likewise.
10045 * tst-cond4.c: Likewise.
10046 * tst-cond6.c: Likewise.
10047 * tst-rwlock4.c: Likewise.
10048 * tst-unload.c: Likewise.
10049 * tst-flock2.c (do_test): Use return instead of exit.
10051 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10053 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10055 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10057 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10058 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10059 instead of __lll_compare_and_swap.
10060 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10062 Removed definition if __lll_compare_and_swap.
10064 * cancellation.c: Adjust for new form of compare&exchange macros.
10065 * cleanup_defer.c: Likewise.
10066 * init.c: Likewise.
10067 * libc-cancellation.c: Likewise.
10068 * old_pthread_cond_broadcast.c: Likewise.
10069 * old_pthread_cond_signal.c: Likewise.
10070 * old_pthread_cond_timedwait.c: Likewise.
10071 * old_pthread_cond_wait.c: Likewise.
10072 * pthread_cancel.c: Likewise.
10073 * pthread_create.c: Likewise.
10074 * pthread_detach.c: Likewise.
10075 * pthread_join.c: Likewise.
10076 * pthread_key_delete.c: Likewise.
10077 * pthread_setcancelstate.c: Likewise.
10078 * pthread_setcanceltype.c: Likewise.
10079 * pthread_timedjoin.c: Likewise.
10080 * pthread_tryjoin.c: Likewise.
10081 * sysdeps/pthread/createthread.c: Likewise.
10083 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10085 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10086 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10087 definitions. Replace uses with calls to atomic_* functions.
10088 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10089 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10090 __lll_test_and_set calls with atomic_exchange_and_add and
10091 atomic_exchange calls respectively.
10092 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10093 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10094 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10095 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10096 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10097 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10098 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10100 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10101 returns the old value.
10103 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10105 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10106 int for variable OLDVAL and correct inline assembler contraint.
10107 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10108 type int for variable OLD.
10110 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10112 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10113 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10114 instead of multiple_threads field in the TCB.
10116 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10118 * sysdeps/i386/i686/bits/atomic.h: Removed.
10119 * sysdeps/i386/i586/bits/atomic.h: Removed.
10120 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10121 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10122 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10123 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10124 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10125 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10126 * atomic.h: Removed. Moved to glibc.
10128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10129 support for clock selection.
10131 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10132 signalling waiters.
10134 2003-03-18 Roland McGrath <roland@redhat.com>
10136 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10137 Add __lll_rel_instr first. Add memory clobber.
10138 (lll_mutex_unlock): Use __lll_test_and_set.
10139 From Paul Mackerras <paulus@samba.org>.
10141 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10143 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10144 (SINGLE_THREAD_P): Add `header.' prefix.
10145 From Paul Mackerras <paulus@samba.org>.
10147 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10148 pthread_timedjoin_np to ...
10149 (libpthread: GLIBC_2.3.3): ... here.
10150 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10152 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10153 Avoid shadowing VAL variable.
10155 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10158 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10160 * Makefile (tests): Add tst-cond11.
10161 * tst-cond11.c: New file.
10163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10164 struct passed to cleanup handler to eliminate one more
10166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10168 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10169 (pthrad_cond_t): Replace __unused field with __clock.
10171 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10172 waken all waiters in cleanup handler.
10173 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10176 * pthread_condattr_getclock.c: New file.
10177 * pthread_condattr_setclock.c: New file.
10178 * sysdeps/pthread/pthread.h: Declare these new functions.
10179 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10180 * Makefile (libpthread-routines): Add the new functions.
10181 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10182 Renamed field to value. Document use of the bits.
10183 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10185 * pthread_condattr_setpshared.c: Likewise.
10186 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10187 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10188 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10190 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10191 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10192 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10193 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10195 Implement clock selection.
10196 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10197 * pthread-errnos.sym: Add ENOSYS.
10198 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10199 _POSIX_CLOCK_SELECTION.
10200 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10203 invalid .size directive.
10205 2003-03-17 Roland McGrath <roland@redhat.com>
10207 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10210 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10212 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10213 Use __lll_add instead of spelling it out. Use protected symbol names.
10214 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10216 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10217 Renamed from lll_compare_and_swap. Use new name where necessary.
10218 (__lll_add): Defined.
10219 (__lll_dec_if_positive): Defined.
10220 (__lll_test_and_set): Defined.
10221 * sysdeps/ia64/pthread_spin_init.c: Removed.
10222 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10223 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10224 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10225 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10226 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10227 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10228 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10229 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10230 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10231 __sync_lock_release_si.
10232 Patch by Jakub Jelinek.
10234 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10235 Fix timeout handling.
10236 (__lll_timedwait_tid): Likewise.
10237 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10238 Patch by Jakub Jelinek.
10240 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10242 2003-03-17 Roland McGrath <roland@redhat.com>
10244 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10245 * sysdeps/pthread/pthread_spin_init.c: New file.
10246 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10247 * sysdeps/powerpc/Makefile: New file.
10248 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10249 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10250 * sysdeps/powerpc/pthreaddef.h: New file.
10251 * sysdeps/powerpc/tcb-offsets.sym: New file.
10252 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10253 * sysdeps/powerpc/tls.h: New file.
10254 * sysdeps/powerpc/bits/atomic.h: New file.
10255 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10256 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10257 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10259 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10260 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10261 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10262 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10263 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10264 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10265 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10266 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10267 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10268 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10269 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10270 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10271 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10272 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10273 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10275 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10277 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10278 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10279 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10280 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10281 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10283 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10285 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10286 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10289 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10291 2003-03-16 Roland McGrath <roland@redhat.com>
10293 * tst-fork4.c: Include <string.h>.
10294 * tst-signal2.c: Likewise.
10295 * tst-mutex5.c (do_test): exit -> return.
10296 * tst-mutex2.c: Include <stdlib.h>.
10298 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10300 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10301 (__lll_mutex_timedlock_wait): Correct expected value after
10302 spurious wakeup. Otherwise we would never wait again.
10304 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10305 zone versus inline asm stupidity. Use correct instructions.
10307 * tst-rwlock6.c: Add some more status output.
10309 2003-03-15 Roland McGrath <roland@redhat.com>
10311 * sysdeps/pthread/configure.in: New file.
10312 * sysdeps/pthread/configure: New file (generated).
10314 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10316 * allocatestack.c (allocate_stack): Store the exact stack size of
10317 user allocated stacks.
10319 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10321 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10322 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10323 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10324 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10325 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10326 Use `header.' prefix.
10327 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10329 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10331 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10332 __builtin_frame_address, use stack pointer.
10334 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10335 instead of __builtin_frame_pointer.
10337 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10339 * tst-basic1.c (do_test): Add cast to avoid warning.
10340 * tst-basic2.c (do_test): Likewise.
10342 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10343 amount of stack correction.
10345 * tst-fork4.c: Use test-skeleton.c.
10347 2003-03-14 Roland McGrath <roland@redhat.com>
10349 * init.c: Fix typo "#eli" for "#else".
10351 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10353 * allocatestack.c (__stack_user): Use hidden_data_def.
10354 * pthread_create.c (__pthread_keys): Likewise.
10356 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10358 2003-03-14 Roland McGrath <roland@redhat.com>
10360 * tst-fork4.c: New file.
10361 * Makefile (tests): Add it.
10363 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10364 we always define the padding space.
10365 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10366 stopped supporting its own extensions fully.
10367 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10368 struct also called `header', so `header.multiple_threads' is the field
10369 name to use on all machines.
10370 * allocatestack.c (allocate_stack): Use `header.' prefix.
10371 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10372 * pthread_create.c (__pthread_create_2_1): Likewise.
10373 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10374 (THREAD_SELF): Likewise.
10375 * sysdeps/x86_64/tls.h: Likewise.
10376 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10377 (SINGLE_THREAD_P): Likewise.
10378 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10379 (SINGLE_THREAD_P): Likewise.
10380 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10381 (SINGLE_THREAD_P): Likewise.
10383 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10386 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10388 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10389 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10391 * pthread_create.c (start_thread): setjmp is expected to return 0.
10393 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10394 (THREAD_GETMEM_NC): Likewise.
10396 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10398 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10399 and the size of the stack which must be allocated is a multiple,
10400 allocate one more page.
10401 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10402 MULTI_PAGE_ALIASING.
10404 2003-03-13 Roland McGrath <roland@redhat.com>
10406 * pthread_create.c (start_thread): Set EXITING_BIT after the
10407 event-reporting (and destructors), not before.
10409 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10411 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10412 lll_futex_wake): Declare register variables as long int instead of
10413 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10414 Make syscall arguments clobbered by the syscall.
10415 (lll_futex_wait): Define using lll_futex_timed_wait.
10417 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10420 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10421 PPID if [! NDEBUG].
10423 * allocatestack.c (nptl_ncreated): Only declare if
10424 COLORING_INCREMENT != 0.
10426 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10427 (__libc_enable_asynccancel_2): Remove prototype.
10429 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10430 ctid to match kernel.
10432 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10434 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10435 libc_multiple_threads.
10436 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10437 __libc_multiple_threads to...
10438 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10440 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10442 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10443 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10445 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10446 (__pthread_once_internal): Define.
10448 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10449 macros instead of .symver directly.
10450 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10451 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10453 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10454 * sysdeps/x86_64/tcb-offsets.sym: New file.
10455 * sysdeps/x86_64/Makefile: New file.
10457 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10458 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10459 to access own pthread_t in TCB.
10460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10462 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10464 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10466 2003-03-12 Roland McGrath <roland@redhat.com>
10468 * pthread-errnos.sym: New file.
10469 * Makefile (gen-as-const-headers): New variable, list that file.
10470 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10471 header <pthread-errnos.h> instead of defining errno values here.
10472 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10473 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10474 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10475 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10482 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10483 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10484 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10485 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10486 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10487 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10488 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10489 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10490 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10491 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10492 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10493 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10494 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10495 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10496 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10497 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10498 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10499 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10500 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10501 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10502 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10503 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10504 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10505 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10506 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10508 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10509 CLONE_CHILD_SETTID worked.
10511 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10518 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10519 (pthread_cond_t): Add padding.
10521 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10522 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10523 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10526 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10528 (__pthread_rwlock_timedrdlock): Likewise.
10529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10530 (__pthread_rwlock_wrlock): Likewise.
10531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10532 (__pthread_rwlock_rdlock): Likewise.
10534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10537 result of lock re-get if it fails.
10539 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10541 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10542 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10543 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10544 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10546 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10547 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10548 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10549 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10550 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10552 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10553 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10555 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10556 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10557 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10558 (create_thread): Likewise.
10559 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10560 * init.c (__pthread_initialize_minimal_internal): Initialize
10561 __libc_multiple_threads_ptr if necessary.
10562 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10563 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10564 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10565 __libc_multiple_threads.
10566 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10569 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10570 (THREAD_SETMEM_NC): Likewise.
10572 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10573 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10574 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10575 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10577 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10578 Eliminate one entire instruction.
10580 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10581 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10583 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10584 instead of __pthread_enable_asynccancel.
10585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10586 (__pthread_cond_wait): Likewise.
10587 * sysdeps/pthread/pthread_cond_timedwait.c
10588 (__pthread_cond_timedwait): Likewise.
10589 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10592 (__condvar_cleanup): Wake up all waiters in case we got signaled
10593 after being woken up but before disabling asynchronous
10595 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10597 (__condvar_cleanup): Likewise.
10599 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10600 Make it an error if architecture has no #if case. Add x86-64.
10602 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10603 pt-initfini.s generation.
10605 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10606 (TLS_INIT_TP): Fix typo.
10608 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10610 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10611 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10613 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10614 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10615 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10616 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10617 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10618 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10619 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10620 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10622 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10624 * sysdeps/pthread/pthread_cond_timedwait.c
10625 (__pthread_cond_timedwait): Return the result of the final
10626 locking. If it succeeds, the regular function return value.
10628 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10629 Return result of the final locking.
10630 * version.c (__nptl_main): Work around problems with the strange
10631 INTERNAL_SYSCALL macro on ppc32.
10632 * init.c (__pthread_initialize_minimal_internal): Unblock
10633 SIGCANCEL in case the parent blocked it.
10634 Reported by Paul Mackerras <paulus@samba.org>.
10636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10640 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10642 * sysdeps/pthread/pthread_cond_timedwait.c
10643 (__pthread_cond_timedwait): Unlock and fail if
10644 __pthread_mutex_unlock_internal failed.
10646 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10647 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10649 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10650 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10651 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10652 ALLOCATE_STACK): New macros.
10653 (TLS_TPADJ): New macro.
10654 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10655 (allocate_stack): Handle TLS_DTV_AT_TP and
10656 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10657 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10658 Don't set PD->self.
10659 * init.c [__ia64__] (__NR_set_tid_address): Define.
10661 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10662 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10663 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10664 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10665 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10666 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10667 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10668 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10669 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10670 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10671 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10672 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10673 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10674 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10675 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10676 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10677 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10678 * sysdeps/ia64/bits/atomic.h: New file.
10679 * sysdeps/ia64/Makefile: New file.
10680 * sysdeps/ia64/pthread_spin_init.c: New file.
10681 * sysdeps/ia64/pthread_spin_lock.c: New file.
10682 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10683 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10684 * sysdeps/ia64/pthreaddef.h: New file.
10685 * sysdeps/ia64/tcb-offsets.sym: New file.
10686 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10687 * sysdeps/ia64/tls.h: New file.
10689 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10690 to syscall instead of no arguments.
10692 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10694 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10695 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10696 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10697 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10699 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10702 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10704 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10705 lowlevelbarrier.sym.
10706 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10707 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10708 Include lowlevelbarrier.h and don't define offsets locally.
10709 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10711 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10712 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10713 (__lll_mutex_timedlock_wait): Likewise.
10714 (lll_mutex_lock): Adjust asm for that.
10715 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10716 (lll_lock): Adjust asm for operand order change.
10717 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10718 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10720 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10721 Reverse order of parameters.
10722 (__lll_timedwait_tid): Remove regparms attribute.
10723 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10724 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10726 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10727 (__lll_timedwait_tid): Remove one unnecessary instruction.
10729 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10730 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10731 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10734 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10735 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10737 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10740 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10741 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10743 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10744 define LOCK here (if UP is not defined). The actual code is in
10747 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10748 LOCK is already defined. Don't define lll_unlock_wake_cb and
10749 __lll_timedwait_tid for libc.so.
10750 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10751 define LOCK here (if UP is not defined). The actual code is in
10754 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10755 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10756 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10757 instead of lowlevelsem.h.
10758 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10759 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10760 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10762 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10763 lowlevelrwlock.sym.
10764 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10765 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10766 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10768 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10770 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10771 last changed. D'oh.
10773 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10775 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10776 of __libc_locking_needed.
10777 (lll_trylock): Initialize %eax to zero.
10779 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10780 pthread_cond_t definition.
10782 2003-03-10 Roland McGrath <roland@redhat.com>
10784 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10785 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10786 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10787 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10788 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10790 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10791 Instead of setting PD->multiple_threads, set globals
10792 __pthread_multiple_threads and __libc_multiple_threads.
10793 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10794 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10795 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10797 * descr.h (struct pthread): Conditionalize first member on
10798 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10799 containing an anonymous tcbhead_t. Move `list' member out.
10800 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10801 * allocatestack.c: Remove use of `header.data.' prefix.
10802 * pthread_create.c: Likewise.
10803 * init.c (__pthread_initialize_minimal_internal): Likewise.
10804 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10805 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10806 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10807 * sysdeps/x86_64/tls.h: Likewise.
10808 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10809 (SINGLE_THREAD_P): Likewise.
10810 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10811 (SINGLE_THREAD_P): Likewise.
10812 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10813 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10815 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10817 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10819 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10820 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10822 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10823 leftovers from the ia32 code.
10825 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10827 (clear_once_control): Don't load %esi.
10829 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10832 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10834 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10835 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10837 * Makefile (tests): Add tst-cond10.
10838 * tst-cond10.c: New file.
10840 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10842 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10843 * tst-signal3.c (do_test): Likewise.
10844 * tst-sem5.c (do_test): Likewise.
10845 * tst-kill6.c (do_test): Likewise.
10846 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10848 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10850 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10851 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10852 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10853 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10855 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10856 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10858 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10860 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10861 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10862 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10863 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10865 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10866 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10867 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10869 * allocatestack.c (allocate_stack): If mprotect() fails free the
10872 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10874 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10876 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10877 lll_wake_tid. This was used only to work around kernel limits in
10879 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10880 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10881 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10882 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10884 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10885 (__pthread_initialize_minimal_internal): Change initialization of
10886 __static_tls_align_m1 appropriately.
10887 * pthreadP.h (__static_tls_align_m1): Renamed from
10888 __static_tls_align.
10889 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10890 instead of __static_tls_align-1.
10892 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10894 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10896 * pthread_create.c: Define __pthread_keys using nocommon
10897 attribute, not by placing it explicitly in bss.
10898 Remove DEFINE_DEALLOC definition. Not needed anymore.
10900 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10901 Use it in mmap call to allocate stacks.
10903 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10905 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10906 result of the thread function.
10908 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10910 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10911 version is just fine.
10913 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10914 (__pthread_child_handler): Renamed from pthread_child_handler,
10915 exported, and marked hidden. Change all users.
10916 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10917 free __pthread_child_handler from child list.
10919 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10921 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10923 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10924 Fix handling of cancellation and failing pthread_mutex_unlock call.
10925 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10926 (__pthread_cond_wait): Likewise.
10928 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10929 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10930 lll_futex_timed_wait call.
10931 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10932 (pthread_rwlock_timedwrlock): Likewise.
10934 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10935 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10936 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10938 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10939 check of lll_futex_wake return value.
10941 2003-03-03 Roland McGrath <roland@redhat.com>
10943 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10945 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10946 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10947 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10949 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10951 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10952 error for CPU clocks.
10954 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10955 _POSIX_MONOTONIC_CLOCK.
10956 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10958 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10961 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10963 * descr.h (struct pthread): Move cleanup field to the front.
10965 2003-03-01 Roland McGrath <roland@redhat.com>
10967 * sem_open.c (sem_open): Braino fix.
10969 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10971 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10973 __pthread_cleanup_pop functionality.
10974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10976 * descr.h (struct pthread): Move tid field to the front now that
10979 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10980 (__lll_mutex_timedlock_wait): Remove.
10981 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10982 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10983 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10984 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10985 (lll_unlock_wake_cb): Don't save and restore %esi.
10986 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10988 (__lll_timedwait_tid): Add alignment.
10989 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10990 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10992 (__lll_timedwait_tid): Removed.
10993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10994 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10995 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10996 (pthread_barrier_wait): Don't save, load, and restore %esi for
10998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10999 (__pthread_cond_signal): Don't save, load, and restore %esi.
11000 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11001 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11002 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11003 Don't save, load, and restore %esi.
11005 2003-02-27 Ulrich Drepper <drepper@redhat.com>
11007 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11008 Release lock before waking up the waiters.
11010 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11012 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11013 (reader_thread): Likewise.
11015 * sysdeps/pthread/pthread_rwlock_unlock.c
11016 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11017 to wake up readers if there are none.
11019 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11020 Release internal lock before wake threads.
11022 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11024 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11025 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11027 * tst-rwlock9.c: Likewise.
11028 * tst-rwlock10.c: New file.
11029 * tst-rwlock11.c: New file.
11031 * Makefile (tests): Add tst-dlsym1.
11032 * tst-dlsym1.c: New file.
11034 * init.c (__pthread_initialize_minimal_internal): Set
11035 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11036 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11038 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11040 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11042 * tst-cond2.c: Fix sychronization with child.
11044 * tst-rwlock8.c (reader_thread): Remove unused variable.
11046 * Makefile: Add rules to build and run tst-tls3.
11047 * tst-tls3.c: New file.
11048 * tst-tls3mod.c: New file.
11050 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11051 * tst-rwlock8.c: New file.
11052 * tst-rwlock9.c: New file.
11053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11054 complete broken rwlock implementation.
11055 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11059 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11061 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11062 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11063 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11064 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11065 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11067 2003-02-23 Roland McGrath <roland@redhat.com>
11069 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11071 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11073 * Makefile (tests): Add tst-context1.
11074 * tst-context1.c: New file.
11076 * Makefile (tests): Add tst-tls1 and tst-tls2.
11077 * tst-tls1.c: New file.
11078 * tst-tls2.c: New file.
11080 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11081 for failed cmpxchg.
11083 * pthread_create.c (start_thread): Set EXITING_BIT early.
11085 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11086 (THREAD_GETMEM_NC): Likewise.
11088 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11090 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11091 off 3 more bytes by using offset-less instructions when possible.
11093 * Makefile: Add dependency for $(objpfx)version.d.
11095 * eintr.c (eintr_source): Add unnecessary return but the compiler
11098 * tst-kill3.c: Include <unistd.h>.
11100 2003-02-21 Roland McGrath <roland@redhat.com>
11102 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11104 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11106 * Makefile (tests): Add tst-eintr1.
11107 (distribute): Add eintr.c.
11108 * tst-eintr1.c: New file.
11109 * eintr.c: New file.
11111 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11113 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11114 Disallow sending SIGCANCEL.
11116 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11117 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11118 * tst-kill1.c: New file.
11119 * tst-kill2.c: New file.
11120 * tst-kill3.c: New file.
11121 * tst-kill5.c: New file.
11122 * tst-kill6.c: New file.
11123 * tst-basic7.c: Renamed to...
11124 * tst-kill4.c: ...this.
11126 2003-02-21 Roland McGrath <roland@redhat.com>
11128 * Makefile (install-lib-ldscripts): New variable.
11130 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11132 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11133 * pthread_cancel.c: Use INVALID_TD_P.
11134 * pthread_detach.c: Likewise.
11135 * pthread_getschedparam.c: Likewise.
11136 * pthread_setschedparam.c: Likewise.
11137 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11138 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11139 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11140 * pthread_timedjoin.c: Likewise.
11142 * tst-basic7.c: Include <signal.h>.
11144 * pthread_join.c (pthread_join): Limited checking for invalid
11146 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11148 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11150 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11151 beginning of the loop. Clear the entire first block of TSD.
11152 * Makefile (tests): Add tst-key4.
11153 * tst-key4.c: New file.
11155 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11157 * Makefile (tests): Add tst-basic7.
11158 * tst-basic7.c: New file.
11160 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11161 Add some more __builtin_expect.
11163 * pthreadP.h: Define dummy version of DEBUGGING_P.
11165 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11167 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11168 _POSIX_THREAD_PRIORITY_SCHEDULING.
11169 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11170 _XOPEN_REALTIME_THREADS.
11171 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11173 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11174 kernel returns EINVAL for PID <= 0, work around it.
11176 * Makefile (tests): Add tst-signal5.
11177 * tst-signal5.c: New file.
11179 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11180 and LOGIN_NAME_MAX.
11182 * tst-cancel1.c (tf): Block all signals.
11184 * Makefile (tests): Add tst-basic6.
11185 * tst-basic6.c: New file.
11187 * tst-basic1.c: Add test for process ID.
11189 * Makefile (tests): Add tst-cancel10.
11190 * tst-cancel10.c: New file.
11192 * Makefile (tests): Add tst-signal4.
11193 * tst-signal4.c: New file.
11195 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11196 __sigismember instead of sigismember. Add __builtin_expect.
11198 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11200 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11201 pthread_setcancelstate, and pthread_rwlock_setpshared.
11203 * tst-cancel7.c (do_test): Make sure the pid file exists before
11204 canceling the thread.
11206 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11207 pthread_rwlock_timedrdlock tests.
11208 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11210 Check for invalid tv_nsec field.
11211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11214 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11215 recursive mutex of overflow.
11217 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11219 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11220 going into an endless loop.
11221 * Makefile (tests): Add tst-cancel9.
11222 * tst-cancel9.c: New file.
11224 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11226 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11228 * tst-mutex5.c (do_test): Add more timedlock tests.
11230 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11231 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11233 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11234 use INLINE_SYSCALL. Error number is returned, not -1.
11236 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11237 and __deallocate_stack with internal_function.
11238 * pthread_create.c: Adjust definitions appropriately.
11239 * allocatestack.c: Likewise.
11241 * pthread_join.c: Add one more __builtin_expect.
11242 * pthread_timedjoin.c: Likewise.
11244 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11245 not data of sequence number does not match.
11246 Add one __builtin_expect.
11248 * Makefile (tests): Add tst-clock1.
11249 * tst-clock1.c: New file.
11251 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11252 negative arguments.
11253 * Makefile (tests): Add tst-basic5.
11254 * tst-basic5.c: New file.
11256 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11258 * Makefile (tests): Add tst-basic4.
11259 * tst-basic4.c: New file.
11261 * pthreadP.h: Add declaraction for __nptl_nthreads.
11262 * pthread_create.c: Define __nptl_nthreads
11263 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11264 after thread is done. If then zero, call exit(0).
11265 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11266 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11267 * init.c (pthread_functions): Initialize ptr_nthreads.
11268 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11269 (__reclaim_stacks): Decrement __nptl_nthreads.
11270 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11272 * Makefile (tests): Add tst-basic3.
11273 * tst-basic3.c: New file.
11275 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11276 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11277 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11278 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11279 if asynchronous canceling is enabled.
11280 * pthread_join.c (pthread_join): When recognizing circular joins,
11281 take into account the other thread might be already canceled.
11282 * Makefile (tests): Add tst-join5.
11283 * tst-join5.c: New file.
11285 * Makefile (tests): Add tst-join4.
11286 * tst-join4.c: New file.
11288 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11290 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11292 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11294 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11295 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11296 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11298 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11300 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11301 error if lll_futex_wake failed.
11303 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11306 handling of cancellation and failung pthread_mutex_unlock call.
11307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11308 * Makefile (tests): Add tst-cond8 and tst-cond9.
11309 * tst-cond8.c: New file.
11310 * tst-cond9.c: New file.
11312 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11314 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11315 non-standard initializers with __USE_GNU.
11317 * Makefile (tests): Add tst-cleanup3.
11318 * tst-cleanup3.c: New file.
11320 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11322 * Makefile (tests): Add tst-attr1 and tst-attr2.
11323 * tst-attr1.c: New file.
11324 * tst-attr2.c: New file.
11326 * Makefile: Add rules to build and run tst-atfork2 test.
11327 * tst-atfork2.c: New file.
11328 * tst-atfork2mod.c: New file.
11330 * sysdeps/unix/sysv/linux/unregister-atfork.c
11331 (__unregister_atfork): Free the memory allocated for the handlers
11332 after removing them from the lists.
11334 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11337 * tst-atfork1.c (do_test): Wait for the child we forked.
11338 Report error in child.
11340 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11342 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11344 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11346 * Makefile (tests): Add tst-cancel8.
11347 * tst-cancel8.c: New file.
11349 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11350 clearing of control variable.
11351 * Makefile (tests): Add tst-once3 and tst-once4.
11352 * tst-once3.c: New file.
11353 * tst-once4.c: New file.
11355 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11357 * sysdeps/sh/Makefile: New file.
11358 * sysdeps/sh/bits/atomic.h: New file.
11359 * sysdeps/sh/pthread_spin_init.c: New file.
11360 * sysdeps/sh/pthread_spin_lock.c: New file.
11361 * sysdeps/sh/pthread_spin_trylock.S: New file.
11362 * sysdeps/sh/pthread_spin_unlock.S: New file.
11363 * sysdeps/sh/pthreaddef.h: New file.
11364 * sysdeps/sh/tcb-offsets.sym: New file.
11365 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11366 * sysdeps/sh/tls.h: New file.
11367 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11368 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11369 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11370 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11371 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11372 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11373 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11374 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11375 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11376 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11377 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11378 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11379 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11380 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11381 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11382 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11383 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11384 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11385 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11386 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11387 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11388 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11390 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11391 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11392 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11393 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11394 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11395 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11396 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11398 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11400 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11401 according to POSIX.
11403 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11405 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11407 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11408 (TLS_GET_FS): New #define.
11409 (TLS_SET_FS): New #define.
11410 Correct value of __NR_set_thread_area.
11412 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11414 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11416 * Makefile (tests): Add tst-popen1.
11417 * tst-popen1.c: New file.
11419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11420 but inactive generalization.
11421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11422 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11423 Minor optimization, remove one instruction.
11424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11426 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11428 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11430 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11432 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11433 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11434 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11435 * sysdeps/pthread/pthread_cond_signal.c: New file.
11436 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11437 * sysdeps/pthread/pthread_cond_wait.c: New file.
11438 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11439 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11440 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11441 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11442 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11443 * sysdeps/s390/Makefile: New file.
11444 * sysdeps/s390/bits/atomic.h: New file.
11445 * sysdeps/s390/pthread_spin_init.c: New file.
11446 * sysdeps/s390/pthread_spin_lock.c: New file.
11447 * sysdeps/s390/pthread_spin_trylock.c: New file.
11448 * sysdeps/s390/pthread_spin_unlock.c: New file.
11449 * sysdeps/s390/pthreaddef.h: New file.
11450 * sysdeps/s390/tcb-offsets.sym: New file.
11451 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11452 * sysdeps/s390/tls.h: New file.
11453 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11454 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11455 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11456 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11457 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11458 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11459 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11460 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11461 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11462 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11463 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11464 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11465 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11466 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11467 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11468 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11469 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11470 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11471 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11472 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11473 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11474 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11475 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11477 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11479 * atomic.h: Add a couple more default implementations.
11480 (atomic_compare_and_exchange_acq): Use
11481 __arch_compare_and_exchange_32_acq in return value definition. It
11483 (atomic_bit_set): Renamed from atomic_set_bit.
11484 Add missing atomic_ prefixes.
11486 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11487 thread library is available, use correct value to mark initialized
11490 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11492 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11493 __sysconf to determine pagesize.
11495 * pthread_create.c: Include <atomic.h>.
11496 * allocatestack.c (allocate_stack): Implement coloring of the
11497 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11498 size minus one. Adjust users.
11499 * sysdeps/i386/i686/Makefile: New file.
11501 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11503 * allocatestack.c: Improve comment throughout the file.
11505 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11506 (__lll_lock_wait): Add branch prediction.
11507 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11508 (__lll_lock_wait): Likewise.
11509 (lll_unlock_wake_cb): Removed.
11511 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11513 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11514 _POSIX_THREAD_PRIORITY_SCHEDULING.
11516 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11518 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11519 Fix return type of ptr___pthread_getspecific.
11521 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11523 * Makefile (tests): Add tst-umask1.
11524 (tst-umask1-ARGS): Define.
11525 * tst-umask1.c: New file.
11527 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11529 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11530 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11531 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11532 pthread_rwlock_unlock.
11533 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11534 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11535 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11536 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11542 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11543 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11544 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11546 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11547 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11549 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11550 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11551 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11553 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11554 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11556 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11558 * Makefile (libpthread-routines): Remove lowlevelcond and
11559 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11560 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11561 and pthread_cond_broadcast.
11562 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11563 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11564 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11565 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11566 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11567 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11568 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11569 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11570 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11571 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11572 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11576 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11577 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11578 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11579 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11580 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11581 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11582 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11583 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11584 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11585 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11586 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11587 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11588 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11589 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11590 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11591 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11592 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11594 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11595 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11596 of the code is moved to ...
11597 * sysdeps/pthread/createthread.c: ...here. New file.
11599 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11601 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11602 (__new_sem_post): Clear %eax before returning.
11603 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11605 * Makefile (tests): Add tst-cleanup2.
11606 * tst-cleanup2.c: New file.
11608 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11609 Interpret first parameter correctly.
11611 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11613 * Makefile (headers): Add bits/semaphore.h.
11615 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11617 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11620 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11622 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11623 must be used and mapping failed.
11624 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11626 * Makefile (CFLAGS-pthread_self.os): Define this, not
11627 CFLAGS-pthread_self.c.
11629 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11631 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11632 lll_unlock_wake_cb.
11634 * Makefile (libpthread-routines): Add version. Add rules to build
11635 version.os and banner.h.
11636 * version.c: New file.
11638 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11640 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11641 the alias unconditional.
11642 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11644 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11646 * Makefile (CFLAGS-pthread_self.c): New definition.
11648 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11650 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11651 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11652 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11653 * init.c (__pthread_initialize_minimal_internal): Likewise.
11655 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11657 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11659 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11660 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11661 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11662 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11663 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11664 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11666 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11668 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11669 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11670 * tst-cancel-wrappers.sh: Remove all exceptions.
11672 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11674 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11675 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11677 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11678 Use __libc_pthread_functions array if SHARED.
11680 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11681 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11683 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11684 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11685 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11686 __libc_ptf_call instead of __libc_maybe_call.
11687 (PTF): New #define.
11688 (__libc_cleanup_region_start): Wrap function name with PTF call.
11689 (__libc_cleanup_region_end): Likewise.
11690 (__libc_cleanup_end): Likewise.
11692 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11693 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11694 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11695 * pthreadP.h: Add prototypes.
11697 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11698 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11699 __pthread_rwlock_unlock aliases.
11700 * pthreadP.h: Add prototypes for new aliases.
11702 * pthreadP.h (struct pthead_functions): Moved to...
11703 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11704 * init.c (pthread_functions): Add initializers for new elements.
11706 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11707 __pthread_cleanup_pop_restore aliases.
11708 * pthreadP.h: Add prototypes.
11710 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11711 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11712 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11713 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11714 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11715 * pthreadP.h: Adjust prototypes and callers.
11717 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11719 * Makefile (tests): Add tst-cancel7.
11720 (tst-cancel7-ARGS): New variable.
11721 * tst-cancel7.c: New file.
11723 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11724 around gcc defficiencies.
11725 * old_pthread_cond_signal.c: Likewise.
11726 * old_pthread_cond_timedwait.c: Likewise.
11727 * old_pthread_cond_wait.c: Likewise.
11729 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11731 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11733 * Makefile (tests): Add tst-cond7.
11734 * tst-cond7.c: New file.
11736 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11737 (condvar_cleanup): Get condvar address from the right place.
11739 * atomic.h: Correct definitions of atomic_full_barrier,
11740 atomic_read_barrier, atomic_write_barrier.
11742 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11744 * old_pthread_cond_signal.c: Likewise.
11745 * old_pthread_cond_timedwait.c: Likewise.
11746 * old_pthread_cond_wait.c: Likewise.
11748 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11750 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11752 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11754 * pthreadP.h (pthread_cond_2_0_t): New type.
11755 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11756 Use new type for the 2.0 condvar function prototypes.
11757 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11758 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11760 * old_pthread_cond_destroy.c: Likewise.
11761 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11762 * old_pthread_cond_signal.c: Likewise.
11763 * old_pthread_cond_timedwait.c: Likewise.
11764 * old_pthread_cond_wait.c: Likewise.
11766 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11767 (__pthread_cond_wait): Don't save cancellation mode and seq value
11770 * herrno.c (__h_errno_location): Don't define as weak.
11772 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11774 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11775 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11776 and pthread_cond_wait.
11777 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11779 (__pthread_cond_broadcast_2_0): ... this.
11780 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11782 (__pthread_cond_destroy_2_0): ... this.
11783 * old_pthread_cond_init.c (__old_pthread_cond_init):
11785 (__pthread_cond_init_2_0): ... this.
11786 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11788 (__pthread_cond_signal_2_0): ... this.
11789 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11791 (__pthread_cond_wait_2_0): ... this.
11792 * pthread_cond_destroy.c: Include shlib-compat.h.
11793 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11794 * pthread_cond_init.c: Include shlib-compat.h.
11795 (pthread_cond_init): Change strong_alias into versioned_symbol.
11796 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11797 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11799 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11800 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11801 __pthread_cond_wait_2_0): New prototypes.
11802 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11803 __old_pthread_cond_init, __old_pthread_cond_signal,
11804 __old_pthread_cond_wait): Removed.
11805 * init.c: Include shlib-compat.h.
11806 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11807 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11808 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11809 ptr___pthread_cond_*_2_0 fields.
11810 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11811 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11813 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11814 LIBC_SIGACTION was not yet defined.
11815 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11816 [!defined LIBC_SIGACTION] (__sigaction): New function and
11818 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11819 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11821 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11823 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11825 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11827 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11828 New, larger type definition.
11829 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11831 * Versions [libpthread]: Add definitions for new pthread_cond_*
11832 interfaces for version GLIBC_2.3.2.
11833 * pthread_cond_init.c: Update initialization for new type definition.
11834 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11835 pthread_cond_timedwait, pthread_cond_signal, and
11836 pthread_cond_broadcast. Add old_pthread_cond_init,
11837 old_pthread_cond_destroy, old_pthread_cond_wait,
11838 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11839 old_pthread_cond_broadcast.
11840 * old_pthread_cond_broadcast.c: New file.
11841 * old_pthread_cond_destroy.c: New file.
11842 * old_pthread_cond_init.c: New file.
11843 * old_pthread_cond_signal.c: New file.
11844 * old_pthread_cond_timedwait.c: New file.
11845 * old_pthread_cond_wait.c: New file.
11846 * pthreadP.h: Add prototypes for the compatibility interfaces.
11848 * pthread_cond_destroy.c: Don't include <errno.h>.
11850 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11852 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11853 unnecessary zero offset when addressing MUTEX.
11855 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11857 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11859 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11860 for __register_atfork.
11862 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11864 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11865 instead of ASSEMBLER test macro.
11867 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11868 __libc_current_sigrtmax): Add libc_hidden_def.
11870 * sysdeps/pthread/list.h: Remove assert.h include.
11872 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11874 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11875 __pthread_initialize_minimal_internal not
11876 __pthread_initialize_minimal.
11878 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11880 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11881 __pthread_initialize_minimal as hidden.
11883 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11886 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11888 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11889 $(common-objpfx)format.lds, include that into the output script.
11891 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11893 2002-12-28 Andreas Jaeger <aj@suse.de>
11895 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11896 nsec resolution changes.
11897 (xstat64_conv): Likewise.
11898 (xstat32_conv): Likewise.
11899 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11900 struct kernel_stat.
11901 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11902 structs stat and stat64.
11903 * time/time.h (__timespec_defined): Define for __USE_MISC.
11904 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11906 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11908 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11910 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11911 (pthread_exit): Use strong_alias to avoid warnings.
11912 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11913 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11914 ptr___pthread_attr_init_2_*.
11915 * init.c (pthread_functions): Adjust.
11917 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11919 * forward.c: Make all functions available by default again. It
11920 caused too much trouble.
11922 * pt-siglongjmp.c: Removed.
11924 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11926 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11927 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11928 * sysdeps/i386/Makefile: New file.
11929 * sysdeps/i386/tcb-offsets.sym: New file.
11930 * sysdeps/pthread/tcb-offsets.h: New file.
11931 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11932 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11934 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11935 __register_atfork...
11936 (GLIBC_2.3.2): ...here.
11938 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11940 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11941 pthread_attr_setstackaddr with __attribute_deprecated__.
11943 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11945 * pt-system.c (system): Remove cancellation handling.
11946 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11947 cancellation routines.
11949 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11951 * descr.h: Include <dl-sysdep.h>.
11952 (struct pthread): Move header.data.list to the back of the struct.
11953 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11954 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11955 (SYSINFO_OFFSEET): Likewise.
11957 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11959 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11961 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11962 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11963 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11964 (USE_DL_SYSINFO): Undef.
11966 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11968 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11969 $(common-objpfx)libc.so.
11970 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11971 it is bigger than pipe buffer size even on arches with bigger
11973 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11975 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11977 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11978 correct errno access for case that USE___THREAD is not defined.
11980 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11982 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11983 Patch by Marijn Ros <marijn@mad.scientist.com>.
11985 2002-12-22 Roland McGrath <roland@redhat.com>
11987 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11989 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11991 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11993 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11995 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11996 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11997 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11999 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12001 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12002 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12003 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12004 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12005 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12006 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12007 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12008 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12010 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12012 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12014 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12016 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12018 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12019 that sysinfo is properly initialized.
12020 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12021 to 1 only for ld.so.
12023 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12024 RTLD_CORRECT_DYNAMIC_WEAK.
12026 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12028 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12029 Use return 0 as 6th argument to FORWARD4.
12030 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12032 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12034 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12035 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12036 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12037 (INIT_SYSINFO): New #define.
12038 (TLS_TP_INIT): Use INIT_SYSINFO.
12039 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12040 At test to make sure SYSINFO_OFFSET value is correct.
12041 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12043 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12045 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12046 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12047 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12048 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12049 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12050 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12051 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12053 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12055 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12056 macro instead of using int $0x80 directly.
12058 * sysdeps/pthread/bits/stdio-lock.h: New file.
12059 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12060 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12061 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12062 * Makefile (routines): Add libc-lowlevelmutex.
12064 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12065 __i686.get_pc_thunk.dx.
12067 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12069 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12070 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12071 ($(objpfx)tst-cancel-wrappers.out): New rule.
12072 * tst-cancel-wrappers.sh: New test.
12073 * tst-locale1.c: Include signal.h.
12074 (uselocale): Test static linking of __libc_current_sigrt*.
12076 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12078 * Makefile (tests): Add tst-cancel6.
12079 * tst-cancel6.c: New file
12081 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12083 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12084 Define meaningfully for assembler as well.
12085 * pthreadP.h (struct pthread_functions): Remove
12086 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12087 and ptr_pthread_attr_init_2_1 fields.
12088 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12089 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12090 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12091 (FORWARD3): Define using FORWARD4.
12092 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12094 * pt-system.c: Remove duplicate stdlib.h include.
12096 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12098 * sem_init.c: Define sem_init@GLIBC_2.0.
12099 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12100 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12102 * flockfile.c: Moved to...
12103 * sysdeps/pthread/flockfile.c: ...here. New file.
12104 * funlockfile.c: Moved to...
12105 * sysdeps/pthread/funlockfile.c: ...here. New file.
12106 * ftrylockfile.c: Moved to...
12107 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12109 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12111 * libc-cancellation.c: Guard both function with
12112 #if !defined NOT_IN_libc.
12113 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12114 automatically provided pthread wrappers.
12115 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12116 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12118 * pt-open.c: Removed.
12119 * pt-fcntl.c: Removed.
12120 * pt-fsync.c: Removed.
12121 * pt-lseek.c: Removed.
12122 * pt-msgrcv.c: Removed.
12123 * pt-msgsnd.c: Removed.
12124 * pt-msync.c: Removed.
12125 * pt-nanosleep.c: Removed.
12126 * pt-open64.c: Removed.
12127 * pt-pause.c: Removed.
12128 * pt-pread.c: Removed.
12129 * pt-pread64.c: Removed.
12130 * pt-pwrite.c: Removed.
12131 * pt-pwrite64.c: Removed.
12132 * pt-read.c: Removed.
12133 * pt-recv.c: Removed.
12134 * pt-recvfrom.c: Removed.
12135 * pt-recvmsg.c: Removed.
12136 * pt-send.c: Removed.
12137 * pt-sendto.c: Removed.
12138 * pt-sigtimedwait.c: Removed.
12139 * pt-sigwait.c: Removed.
12140 * pt-wait.c: Removed.
12141 * pt-waitpid.c: Removed.
12142 * pt-write.c: Removed.
12143 * pt-accept.c: Removed.
12144 * pt-close.c: Removed.
12145 * pt-connect.c: Removed.
12146 * pt-lseek64.c: Removed.
12147 * pt-sendmsg.c: Removed.
12148 * pt-tcdrain.c: Removed.
12150 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12152 * init.c (__pthread_initialize_minimal_internal): Renamed from
12153 __pthread_initialize_minimal. Make old name an alias. This
12154 converts a normal relocation into a relative relocation.
12156 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12158 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12159 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12160 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12161 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12162 pt-sigwaitinfo, pt-waitid, and pt-writev.
12163 * pt-creat.c: Removed.
12164 * pt-poll.c: Removed.
12165 * pt-pselect.c: Removed.
12166 * pt-readv.c: Removed.
12167 * pt-select.c: Removed.
12168 * pt-sigpause.c: Removed.
12169 * pt-sigsuspend.c: Removed.
12170 * pt-sigwaitinfo.c: Removed.
12171 * pt-waitid.c: Removed.
12172 * pt-writev.c: Removed.
12174 * init.c (pthread_functions): New variable.
12175 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12176 (or NULL) to __libc_pthread_init.
12177 * forward.c: Rewrite to use __libc:pthread_functions array to get
12178 function addresses.
12179 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12181 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12182 Take new parameter. Copy content of variable pointed to by it
12183 to __libc_pthread_init.
12185 * pthreadP.h (struct pthread_functions): New type.
12186 (__libc_pthread_init): Declare.
12188 * pthread_attr_destroy.c: Add namespace protected alias.
12189 * pthread_attr_getdetachstate.c: Likewise.
12190 * pthread_attr_getinheritsched.c: Likewise.
12191 * pthread_attr_getschedparam.c: Likewise.
12192 * pthread_attr_getschedpolicy.c: Likewise.
12193 * pthread_attr_getscope.c: Likewise.
12194 * pthread_attr_setdetachstate.c: Likewise.
12195 * pthread_attr_setinheritsched.c: Likewise.
12196 * pthread_attr_setschedparam.c: Likewise.
12197 * pthread_attr_setschedpolicy.c: Likewise.
12198 * pthread_attr_setscope.c: Likewise.
12199 * pthread_cond_broadcast.c: Likewise.
12200 * pthread_cond_destroy.c: Likewise.
12201 * pthread_cond_init.c: Likewise.
12202 * pthread_cond_signal.c: Likewise.
12203 * pthread_cond_wait.c: Likewise.
12204 * pthread_condattr_destroy.c: Likewise.
12205 * pthread_condattr_init.c: Likewise.
12206 * pthread_equal.c: Likewise.
12207 * pthread_exit.c: Likewise.
12208 * pthread_getschedparam.c: Likewise.
12209 * pthread_self.c: Likewise.
12210 * pthread_setcancelstate.c: Likewise.
12211 * pthread_setschedparam.c: Likewise.
12212 * pthread_mutex_destroy.c: Likewise.
12213 * pthread_mutex_init.c: Likewise.
12214 * pthreadP.h: Add prototypes for the aliases.
12216 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12217 multiple_threads member in correct TCB to 1.
12219 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12220 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12221 member of thread decriptor, otherwise return unconditionally 1.
12223 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12225 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12226 regular Linux version. Remove file.
12227 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12228 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12229 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12230 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12231 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12232 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12233 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12234 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12235 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12236 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12237 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12238 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12239 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12240 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12241 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12242 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12243 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12244 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12245 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12246 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12247 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12248 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12249 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12250 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12251 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12252 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12253 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12254 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12255 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12256 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12258 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12260 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12261 * sysdeps/unix/sysv/linux/open.c: Removed.
12262 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12263 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12264 * sysdeps/unix/sysv/linux/msync.c: Removed.
12265 * sysdeps/unix/sysv/linux/read.c: Removed.
12266 * sysdeps/unix/sysv/linux/close.c: Removed.
12267 * sysdeps/unix/sysv/linux/creat.c: Removed.
12268 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12269 * sysdeps/unix/sysv/linux/pause.c: Removed.
12270 * sysdeps/unix/sysv/linux/select.c: Removed.
12271 * sysdeps/unix/sysv/linux/write.c: Removed.
12273 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12275 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12276 element in TCB to see whether locking is needed.
12278 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12279 MULTIPLE_THREADS_OFFSET value is correct.
12281 * sysdeps/unix/sysv/linux/close.c: New file.
12282 * sysdeps/unix/sysv/linux/connect.S: New file.
12283 * sysdeps/unix/sysv/linux/creat.c: New file.
12284 * sysdeps/unix/sysv/linux/fsync.c: New file.
12285 * sysdeps/unix/sysv/linux/llseek.c: New file.
12286 * sysdeps/unix/sysv/linux/lseek.c: New file.
12287 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12288 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12289 * sysdeps/unix/sysv/linux/msync.c: New file.
12290 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12291 * sysdeps/unix/sysv/linux/open.c: New file.
12292 * sysdeps/unix/sysv/linux/open64.c: New file.
12293 * sysdeps/unix/sysv/linux/pause.c: New file.
12294 * sysdeps/unix/sysv/linux/poll.c: New file.
12295 * sysdeps/unix/sysv/linux/pread.c: New file.
12296 * sysdeps/unix/sysv/linux/pread64.c: New file.
12297 * sysdeps/unix/sysv/linux/pselect.c: New file.
12298 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12299 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12300 * sysdeps/unix/sysv/linux/readv.c: New file.
12301 * sysdeps/unix/sysv/linux/recv.S: New file.
12302 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12303 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12304 * sysdeps/unix/sysv/linux/select.c: New file.
12305 * sysdeps/unix/sysv/linux/send.S: New file.
12306 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12307 * sysdeps/unix/sysv/linux/sendto.S: New file.
12308 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12309 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12310 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12311 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12312 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12313 * sysdeps/unix/sysv/linux/system.c: New file.
12314 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12315 * sysdeps/unix/sysv/linux/wait.c: New file.
12316 * sysdeps/unix/sysv/linux/waitid.c: New file.
12317 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12318 * sysdeps/unix/sysv/linux/writev.c: New file.
12319 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12321 * pt-readv.c: Fix comment.
12323 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12325 * tst-cleanup1.c: Include stdlib.h.
12327 * tst-cancel5.c: New test.
12328 * Makefile (tests): Add tst-cancel5.
12329 (tst-cancel5): Link against libc.so libpthread.so in that order.
12331 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12333 * forward.c (test_loaded): Prevent recursive calls.
12335 * Makefile (routines): Add libc-cancellation.
12336 * libc-cancellation.c: New file.
12337 * descr.h (struct pthread): Add multiple_threads field.
12338 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12339 new thread descriptor to 1.
12340 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12341 Initialize multiple_thread field after successful thread creation.
12342 * cancellation.c (__do_cancel): Move to pthreadP.h.
12343 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12344 (__pthread_disable_asynccancel): Add internal_function attribute.
12345 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12346 * pthread_setcancelstate.c: Likewise.
12347 * pthread_setcanceltype.c: Likewise.
12348 * pthread_exit.c: Likewise.
12349 * pthreadP.h (CANCELLATION_P): Likewise.
12350 (__do_cancel): Define as static inline.
12351 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12352 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12354 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12355 fields. Define MULTIPLE_THREADS_OFFSET.
12356 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12358 * sysdeps/unix/sysv/linux/accept.S: New file.
12359 * sysdeps/unix/sysv/linux/read.c: New file.
12360 * sysdeps/unix/sysv/linux/write.c: New file.
12361 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12362 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12363 initialization of __libc_locking_needed.
12364 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12365 __libc_locking_needed, use multiple_threads field in TCB.
12366 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12368 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12370 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12372 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12374 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12375 access to __libc_locking_needed for PIC.
12377 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12379 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12380 declare for libc.so.
12381 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12383 (__libc_lock_lock): Put into statement expression.
12384 (__libc_lock_unlock): Remove trailing semicolon.
12385 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12387 2002-12-12 Roland McGrath <roland@redhat.com>
12389 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12390 "m" constraint to refer to __libc_locking_needed. Declare it here.
12392 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12394 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12395 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12396 Initialize __libc_locking_needed.
12397 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12398 instead of __register_pthread_fork_handler.
12399 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12400 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12401 fork-gen with libc_pthread_init.
12402 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12403 of __register_pthread_fork_handler.
12404 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12405 of __register_pthread_fork_handler.
12406 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12407 __libc_locking_needed to determine whether lock prefix can be avoided.
12408 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12410 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12412 * Makefile (tests): Add tst-cleanup1.
12413 * tst-cleanup1.c: New file.
12414 * cancellation.c (__cleanup_thread): Removed.
12415 (__do_cancel): Remove call to __cleanup_thread.
12416 * pthreadP.h: Remove __cleanup_thread prorotype.
12418 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12419 Remember function and argument even if cancellation handler
12420 function is not available.
12421 (__libc_cleanup_region_end): Execute registered function directly if
12422 pthread functions are not available.
12423 (__libc_cleanup_end): Likewise.
12425 * init.c (__pthread_initialize_minimal): Fix initialization in
12426 static lib by preventing gcc from being too clever.
12428 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12430 * init.c (__pthread_initialize_minimal): Remove unneccesary
12433 * Makefile (tests): We can run tst-locale2 now.
12435 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12437 * Versions: Remove duplicated sigwait entry.
12439 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12441 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12444 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12446 * pthreadP.h: Declare __pthread_enable_asynccancel and
12447 __pthread_disable_asynccancel.
12448 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12449 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12450 * cancellation.c (__pthread_enable_asynccancel): New function.
12451 (__pthread_disable_asynccancel): New function.
12452 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12453 * pt-close.c: Likewise.
12454 * pt-connect.c: Likewise.
12455 * pt-creat.c: Likewise.
12456 * pt-fcntl.c: Likewise.
12457 * pt-fsync.c: Likewise.
12458 * pt-lseek.c: Likewise.
12459 * pt-lseek64.c: Likewise.
12460 * pt-msgrcv.c: Likewise.
12461 * pt-msgsnd.c: Likewise.
12462 * pt-msync.c: Likewise.
12463 * pt-nanosleep.c: Likewise.
12464 * pt-open.c: Likewise.
12465 * pt-open64.c: Likewise.
12466 * pt-pause.c: Likewise.
12467 * pt-poll.c: Likewise.
12468 * pt-pread.c: Likewise.
12469 * pt-pread64.c: Likewise.
12470 * pt-pselect.c: Likewise.
12471 * pt-pwrite.c: Likewise.
12472 * pt-pwrite64.c: Likewise.
12473 * pt-read.c: Likewise.
12474 * pt-readv.c: Likewise.
12475 * pt-recv.c: Likewise.
12476 * pt-recvfrom.c: Likewise.
12477 * pt-recvmsg.c: Likewise.
12478 * pt-select.c: Likewise.
12479 * pt-send.c: Likewise.
12480 * pt-sendmsg.c: Likewise.
12481 * pt-sendto.c: Likewise.
12482 * pt-sigpause.c: Likewise.
12483 * pt-sigsuspend.c: Likewise.
12484 * pt-sigtimedwait.c: Likewise.
12485 * pt-sigwait.c: Likewise.
12486 * pt-sigwaitinfo.c: Likewise.
12487 * pt-system.c: Likewise.
12488 * pt-tcdrain.c: Likewise.
12489 * pt-wait.c: Likewise.
12490 * pt-waitid.c: Likewise.
12491 * pt-waitpid.c: Likewise.
12492 * pt-write.c: Likewise.
12493 * pt-writev.c: Likewise.
12494 * pthread_join.c: Likewise.
12495 * pthread_timedjoin.c: Likewise.
12497 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12498 (__xpg_sigpause): New function.
12499 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12501 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12503 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12505 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12506 _GI_pthread_cleanup_pop to pthreadP.h.
12508 * ftrylockfile.c: Use _IO_lock_trylock instead of
12509 pthread_mutex_trylock.
12511 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12512 (CANCEL_RESET): Likewise.
12513 (__pthread_setcanceltype_): Declare.
12514 (__pthread_mutex_lock_internal): Declare.
12515 (__pthread_mutex_unlock_internal): Declare.
12516 (__pthread_once_internal): Declare.
12517 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12518 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12520 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12521 and pthread_mutex_unlock.
12522 * pthread_cond_wait.c: Likewise.
12523 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12524 * pthread_mutex_unlock.c: Likewise.
12526 * pthread_setcanceltype.c: Add additional alias
12527 __pthread_setcanceltype.
12529 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12530 * sem_open.c (sem_open): Likewise.
12531 Use __libc_open, __libc_write, and __libc_close instead of
12532 open, write, and close respectively.
12534 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12535 Rewrite as statement expression since it must return a value.
12537 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12538 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12541 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12542 alias __pthread_once_internal.
12544 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12546 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12548 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12549 * tst-stdio1.c: New file.
12550 * tst-stdio2.c: New file.
12552 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12554 * Makefile (tests): Comment out tst-locale2 for now.
12555 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12557 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12559 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12560 Use _IO_lock_init instead of explicit assignment.
12562 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12563 Define __libc_lock_* and __libc_lock_recursive macros with
12564 lowlevellock macros, not pthread mutexes.
12566 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12567 of pthread_mutex_lock.
12568 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12569 instead of pthread_mutex_unlock.
12571 2002-12-06 Roland McGrath <roland@redhat.com>
12573 * allocatestack.c (__stack_user): Use uninitialized defn.
12574 * init.c (__pthread_initialize_minimal): Initialize it here.
12576 2002-12-05 Roland McGrath <roland@redhat.com>
12578 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12580 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12582 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12583 missing & here too.
12585 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12587 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12589 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12590 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12591 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12592 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12593 for __libc_lock_* macros.
12594 * Makefile (routines): Add libc-lowlevellock.
12596 2002-10-09 Roland McGrath <roland@redhat.com>
12598 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12599 Under [__PIC__], call the function via the pointer fetched for
12600 comparison rather than a call by name that uses the PLT.
12601 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12602 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12603 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12604 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12605 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12607 2002-12-04 Roland McGrath <roland@redhat.com>
12609 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12611 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12612 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12614 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12616 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12618 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12619 a completely opaque, non-integer type.
12620 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12622 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12624 * sysdeps/i386/tls.h: Include stdlib.h.
12625 * sysdeps/x86_64/tls.h: Likewise.
12627 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12629 * Makefile (tests): Add tst-locale2.
12630 (tests-static): Likewise.
12631 * tst-locale2.c: New file.
12633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12634 volatile and add memory clobbers to lock operations.
12636 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12638 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12639 * sysdeps/i386/i486/bits/atomic.h: New file.
12640 * sysdeps/i386/i586/bits/atomic.h: New file.
12641 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12642 include i486 version.
12643 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12644 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12645 Patch by Marijn Ros <marijn@mad.scientist.com>.
12647 * allocatestack.c (get_cached_stack): Don't crash if we first
12648 found a stack with a larger size then needed.
12649 Reported by Hui Huang <hui.huang@sun.com>.
12651 * Makefile (tests): Add tst-sysconf.
12652 * tst-sysconf.c: New file.
12654 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12655 PTHREAD_THREADS_MAX.
12657 2002-12-02 Roland McGrath <roland@redhat.com>
12659 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12660 Declare using hidden_proto instead of attribute_hidden, so there are
12661 non-.hidden static symbols for gdb to find.
12662 (__pthread_keys): Likewise.
12663 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12664 * allocatestack.c (__stack_user): Likewise.
12665 * pthread_create.c (__pthread_keys): Likewise.
12666 (__nptl_threads_events, __nptl_last_event): Make these static instead
12668 * pthread_key_create.c (__pthread_pthread_keys_max,
12669 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12671 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12673 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12675 * tst-locale1.c: New file.
12677 * pthread_cond_timedwait.c: Include <stdlib.h>.
12679 * Makefile (tests): Add tst-fork2 and tst-fork3.
12680 * tst-fork2.c: New file.
12681 * tst-fork3.c: New file.
12683 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12685 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12687 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12688 require it to 200112L.
12690 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12691 instruction only if HAVE_CMOV is defined.
12692 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12694 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12696 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12700 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12702 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12704 * sysdeps/x86_64/bits/atomic.h: New file.
12706 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12709 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12710 possible since gettid cannot fail.
12712 * sysdeps/x86_64/pthreaddef.h: New file.
12714 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12716 * sysdeps/x86_64/pthread_spin_init.c: New file.
12717 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12718 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12719 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12721 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12722 Add missing lock prefix. Minute optimization.
12724 * tst-spin2.c (main): Also check successful trylock call.
12726 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12727 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12729 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12730 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12732 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12733 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12734 value in case of an error. Add support for INTERNAL_SYSCALL.
12736 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12737 value in case of an error.
12739 * sysdeps/x86_64/tls.h: New file.
12741 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12743 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12744 takes the array member name and the index as parameters.
12745 (THREAD_SETMEM_NC): Likewise.
12746 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12747 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12750 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12751 to decide which code to use.
12752 (THREAD_SETMEM_NC): Likewise.
12754 * allocatestack.c (queue_stack): Don't remove stack from list here.
12755 Do it in the caller. Correct condition to prematurely terminate
12756 loop to free stacks.
12757 (__deallocate_stack): Remove stack from list here.
12759 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12761 * Makefile (tests): Add tst-stack1.
12762 * tst-stack1.c: New file.
12764 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12767 * pthread_attr_getstack.c: Return bottom of the thread area.
12769 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12771 * Makefile (libpthread-routines): Add pt-allocrtsig and
12772 pthread_kill_other_threads.
12773 * pt-allocrtsig.c: New file.
12774 * pthread_kill_other_threads.c: New file.
12775 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12776 all three functions.
12777 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12779 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12780 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12781 and __libc_allocate_rtsig_private.
12782 * Versions (libpthread): Export pthread_kill_other_threads_np,
12783 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12785 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12787 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12788 the end of the stack. Adjust computations.
12789 When mprotect call fails dequeue stack and free it.
12790 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12792 * pthread_getattr_np.c: Likewise.
12794 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12797 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12799 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12800 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12802 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12804 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12805 * pthread_setspecific.c: Likewise.
12807 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12809 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12810 definitions. Get them from the official place.
12811 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12813 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12814 Use new CLONE_ flags in clone() calls.
12816 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12817 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12819 * Versions: Add pthread_* functions for libc.
12820 * forward.c: New file.
12822 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12824 * herrno.c: New file.
12827 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12828 sem_trywait, and sem_timedwait. Add herrno and res.
12829 * sem_init.c: Don't initialize lock and waiters members.
12830 * sem_open.c: Likewise.
12831 * sem_post.c: Removed.
12832 * sem_wait.c: Removed.
12833 * sem_trywait.c: Removed.
12834 * sem_timedwait.c: Removed.
12835 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12836 Includes full implementations of sem_post, sem_wait, sem_trywait,
12838 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12839 for new implementation.
12840 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12841 and waiters fields.
12843 * tst-sem3.c: Improve error message.
12844 * tst-signal3.c: Likewise.
12846 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12847 to tell the kernel about the termination futex and to initialize tid
12848 member. Don't initialize main_thread.
12849 * descr.h (struct pthread): Remove main_thread member.
12850 * cancelllation.c (__do_cancel): Remove code handling main thread.
12851 The main thread is not special anymore.
12853 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12854 size of the stacks to stack_cache_actsize.
12856 * pt-readv.c: Add missing "defined".
12857 * pt-sigwait.c: Likewise.
12858 * pt-writev.c: Likewise.
12860 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12862 * Versions: Export __connect from libpthread.
12863 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12865 * Makefile (libpthread-routines): Add pt-raise.
12866 * sysdeps/unix/sysv/linux/raise.c: New file.
12867 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12868 * sysdeps/generic/pt-raise.c: New file.
12870 * pthread_cond_init.c: Initialize all data elements of the condvar
12871 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12873 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12874 * pthread_create.c: Likewise.
12876 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12877 * tst-key1.c: New file.
12878 * tst-key2.c: New file.
12879 * tst-key3.c: New file.
12881 * Versions: Export pthread_detach for version GLIBC_2.0.
12882 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12884 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12886 * pthread_key_create.c: Terminate search after an unused key was found.
12887 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12889 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12890 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12892 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12894 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12895 dynamic lookup for errno in PIC.
12897 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12898 release the stack lock as soon as possible.
12899 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12900 the static TLS block.
12901 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12903 * cancellation.c: Renamed from cancelation.c.
12904 * Makefile: Adjust accordingly.
12905 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12906 * cleanup_defer.c: Use CANCELLATION_P.
12907 * pthread_testcancel.c: Likewise.
12908 * descr.h: Fix spelling in comments.
12909 * init.c: Likewise.
12910 * pthread_getattr_np.c: Likewise.
12911 * pthread_getschedparam.c: Likewise.
12912 * pthread_setschedparam.c: Likewise.
12913 * Versions: Likewise.
12915 * pt-pselect.c: New file.
12916 * Makefile (libpthread-routines): Add pt-pselect.
12917 * Versions: Add pselect.
12919 * tst-cancel4.c: New file.
12920 * Makefile (tests): Add tst-cancel4.
12922 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12924 * pthread_mutex_lock.c: Always record lock ownership.
12925 * pthread_mutex_timedlock.c: Likewise.
12926 * pthread_mutex_trylock.c: Likewise.
12928 * pt-readv.c: New file.
12929 * pt-writev.c: New file.
12930 * pt-creat.c: New file.
12931 * pt-msgrcv.c: New file.
12932 * pt-msgsnd.c: New file.
12933 * pt-poll.c: New file.
12934 * pt-select.c: New file.
12935 * pt-sigpause.c: New file.
12936 * pt-sigsuspend.c: New file.
12937 * pt-sigwait.c: New file.
12938 * pt-sigwaitinfo.c: New file.
12939 * pt-waitid.c: New file.
12940 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12941 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12942 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12943 * Versions: Add all the new functions.
12945 * tst-exit1.c: New file.
12946 * Makefile (tests): Add tst-exit1.
12948 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12950 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12952 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12954 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12955 call. pthread_join is an official cancellation point.
12956 * pthread_timedjoin.c: Likewise.
12958 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12959 and the condvar's mutex are retrieved.
12960 * pthread_cond_timedwait.c: Likewise.
12961 Reported by dice@saros.East.Sun.COM.
12963 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12965 * pthreadP.h: Cut out all type definitions and move them...
12966 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12967 * pthreadP.h: Include <internaltypes.h>.
12969 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12970 performance tweaks.
12972 * sem_trywait.c: Shuffle #includes around to get right order.
12973 * sem_timedwait.c: Likewise.
12974 * sem_post.c: Likewise.
12975 * sem_wait.c: Likewise.
12977 * nptl 0.3 released.
12979 * Makefile (tests): Add tst-signal3.
12980 * tst-signal3.c: New file.
12982 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12984 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12985 the asms modify the sem object.
12986 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12988 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12989 the actual members.
12990 * pthreadP.h (struct sem): New type. Actual semaphore type.
12991 * semaphoreP.h: Include pthreadP.h.
12992 * sem_getvalue.c: Adjust to sem_t change.
12993 * sem_init.c: Likewise.
12994 * sem_open.c: Likewise.
12995 * sem_post.c: Likewise.
12996 * sem_timedwait.c: Likewise.
12997 * sem_trywait.c: Likewise.
12998 * sem_wait.c: Likewise.
13000 2002-10-04 Ulrich Drepper <drepper@redhat.com>
13002 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13003 * tst-basic2.c: New file.
13004 * tst-exec1.c: New file.
13005 * tst-exec2.c: New file.
13006 * tst-exec3.c: New file.
13008 * tst-fork1.c: Remove extra */.
13010 * nptl 0.2 released. The API for IA-32 is complete.