1 2014-02-08 Mike Frysinger <vapier@gentoo.org>
3 * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
5 2014-02-05 Carlos O'Donell <carlos@redhat.com>
7 * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
8 test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
11 2014-01-23 Stefan Liebler <stli@linux.vnet.ibm.com>
13 * tst-tls7.c: Adjust testcase timeout
15 2014-01-18 H.J. Lu <hongjiu.lu@intel.com>
18 * tst-cancel-wrappers.sh: Remove system.
20 2014-01-11 Paul Pluzhnikov <ppluzhnikov@google.com>
22 * tst-tls7.c (action): New function.
24 * tst-tls7mod.c (action): Move sem_post to caller.
26 2011-12-12 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
28 * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
29 * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
31 2013-12-09 Carlos O'Donell <carlos@redhat.com>
33 * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
34 * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
36 2013-12-09 Andreas Schwab <schwab@suse.de>
39 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
40 (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
41 before __condvar_tw_cleanup2 label.
43 2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
45 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
46 (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
47 into our own stack frame instead of the caller's.
48 (PSEUDO): Use them. Use symbolic stack frame offsets.
49 (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
50 (DOCARGS_2, UNDOCARGS_2): Likewise.
51 (DOCARGS_3, UNDOCARGS_3): Likewise.
52 (DOCARGS_4, UNDOCARGS_4): Likewise.
53 (DOCARGS_5, UNDOCARGS_5): Likewise.
54 (DOCARGS_6, UNDOCARGS_6): Likewise.
56 2013-11-26 Ondřej Bílka <neleai@seznam.cz>
58 * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
59 * sysdeps/x86_64/tls.h: Likewise.
61 2013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
64 * Makefile (tst-getpid2-ENV): New variable.
66 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com>
68 * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
70 2013-10-30 Mike Frysinger <vapier@gentoo.org>
72 * sysdeps/pthread/configure.in: Moved to ...
73 * sysdeps/pthread/configure.ac: ... here.
74 * sysdeps/x86_64/configure.in: Moved to ...
75 * sysdeps/x86_64/configure.ac: ... here.
76 * sysdeps/pthread/configure: Regenerated.
77 * sysdeps/x86_64/configure: Likewise.
79 2013-10-04 Maciej W. Rozycki <macro@codesourcery.com>
81 * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
82 from pthread_mutex_init.
84 2013-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
87 * pthread_cond_broadcast.c (__pthread_cond_broadcast)
88 [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
90 * pthread_cond_signal.c (__pthread_cond_signal)
91 [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
93 2013-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
95 * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
96 IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
97 member of the argument.
98 (__libc_lock_trylock_recursive): Likewise.
99 (__libc_lock_unlock_recursive): Likewise.
101 2013-09-04 Joseph Myers <joseph@codesourcery.com>
103 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
104 [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
105 [SHARED && !NO_HIDDEN].
107 2013-09-03 Siddhesh Poyarekar <siddhesh@redhat.com>
110 * tst-cleanup2.c (do_test): New volatile variable RET to
113 2013-08-30 Ondřej Bílka <neleai@seznam.cz>
115 * sysdeps/pthread/pthread.h: Fix typos.
116 * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
117 * tst-cancel4.c: Likewise.
119 2013-08-21 Ondřej Bílka <neleai@seznam.cz>
121 * pthread_getschedparam.c: Fix typos.
122 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
124 2013-07-23 David S. Miller <davem@davemloft.net>
126 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
128 2013-07-22 David S. Miller <davem@davemloft.net>
130 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
132 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
134 * pthread_mutex_lock.c: Fix whitespace.
135 * pthread_mutex_trylock.c: Likewise.
136 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
137 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
138 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
139 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
140 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
141 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
142 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
143 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
144 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
145 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
146 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
147 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
149 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
150 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
151 (elision_init): Don't set __rwlock_rtm_enabled.
152 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
153 Remove __rwlock_rtm_enabled.
155 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
157 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
158 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
160 2013-07-02 Andi Kleen <ak@linux.intel.com>
162 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
163 Check ENABLE_LOCK_ELISION.
165 2013-07-02 Andi Kleen <ak@linux.intel.com>
167 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
168 Disable elision for PTHREAD_MUTEX_DEFAULT.
170 2013-07-02 Andi Kleen <ak@linux.intel.com>
171 Hongjiu Lu <hongjiu.lu@intel.com>
173 * pthread_mutex_lock.c
174 (__pthread_mutex_lock): Add lock elision support.
175 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
176 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
177 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
178 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
179 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
180 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
181 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
182 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
183 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
184 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
185 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
186 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
188 2013-07-02 Andi Kleen <ak@linux.intel.com>
190 * tst-mutex5.c: Include config.h.
191 (do_test): Add checks for ENABLE_LOCK_ELISION.
192 * tst-mutex8.c: Include config.h
193 (tf): Add checks for ENABLE_LOCK_ELISION.
194 (check_type): Likewise.
196 2013-07-02 Andi Kleen <ak@linux.intel.com>
198 * pthreadP.h: Add elision types.
199 (PTHREAD_MUTEX_TYPE_ELISION): Add.
200 * sysdeps/pthread/pthread.h: Add elision initializers.
201 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
202 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
203 (__PTHREAD_SPINS): Add.
205 2013-07-02 Andi Kleen <ak@linux.intel.com>
206 Hongjiu Lu <hongjiu.lu@intel.com>
208 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
209 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
210 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
211 lll_trylock_elision): Add.
212 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
213 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
214 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
215 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
216 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
217 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
218 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
219 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
220 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
221 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
222 lll_trylock_elision): Add.
223 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
224 * elision-conf.h: New file.
226 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
229 * pthread_exit.c: Add reference to pthread_create.
231 2013-06-22 Joseph Myers <joseph@codesourcery.com>
233 * pthread_getattr_default_np.c: Include <string.h>.
235 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
237 * Versions (libpthread): Add GLIBC_2.18.
238 (GLIBC_2.18): Add pthread_setattr_default_np and
239 pthread_getattr_default_np.
240 * allocatestack.c (allocate_stack): Synchronize read from
241 __default_pthread_attr.
242 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
243 * nptl-init.c (__pthread_initialize_minimal_internal):
244 Synchronize write to __default_pthread_attr.
245 * pthreadP.h (__default_pthread_attr_lock): Declare.
246 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
247 Synchronize read from __default_pthread_attr.
248 * pthread_create.c (__pthread_create_2_1): Make a local copy of
249 __default_pthread_attr. Check value of flags in IATTR even if
251 * pthread_getattr_default_np.c: New file.
252 * pthread_setattr_default_np.c: New file.
253 * sysdeps/pthread/pthread.h [__USE_GNU]
254 (pthread_getattr_default_np, pthread_setattr_default_np):
256 * tst-default-attr.c: New test case.
257 * Makefile (libpthread-routines): Add
258 pthread_setattr_default_np and pthread_getattr_default_np.
259 (tests): Add tst-default-attr.
260 * vars.c (__default_pthread_attr_lock): Declare and initialize.
262 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
263 Carlos O'Donell <carlos@redhat.com>
266 * tst-pthread-attr-affinity: New test case.
267 * Makefile (tests): Add it.
268 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
269 (__pthread_attr_getaffinity_new): Copy minimum of source and
270 destination sizes to avoid a buffer overrun.
272 2013-06-10 Carlos O'Donell <carlos@redhat.com>
274 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
275 (lll_futex_wake): Return syscall error.
276 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
277 (lll_futex_wake): Return syscall error.
279 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
281 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
283 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
285 * tst-cond22.c: Fix leading whitespaces.
286 * tst-umask1.c: Likewise.
288 2013-06-06 Joseph Myers <joseph@codesourcery.com>
290 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
292 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
293 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
294 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
295 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
296 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
297 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
298 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
299 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
301 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
302 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
303 * tst-mutexpp10.c: Likewise.
304 * tst-stackguard1.c: Likewise.
306 2013-05-31 Joseph Myers <joseph@codesourcery.com>
308 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
311 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
313 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
315 * sysdeps/pthread/createthread.c: Likewise.
317 2013-05-14 Andreas Jaeger <aj@suse.de>
320 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
321 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
323 2013-05-09 Andi Kleen <ak@linux.intel.com>
325 * tst-mutex8.c (do_test): Check for ENABLE_PI.
327 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
329 * pthreadP.h (check_sched_policy_attr): New inline function.
330 (check_sched_priority_attr): Likewise.
331 (check_stacksize_attr): Likewise.
332 (__kernel_cpumask_size, __determine_cpumask_size): Declare
334 (check_cpuset_attr): New inline function.
335 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
336 Use check_sched_priority_attr.
337 * pthread_attr_setschedpolicy.c
338 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
339 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
340 check_stacksize_attr.
341 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
343 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
344 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
346 2013-04-11 Andreas Schwab <schwab@suse.de>
348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
349 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
350 directly use absolute timeout.
352 2013-04-07 Carlos O'Donell <carlos@redhat.com>
354 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
356 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
359 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
361 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
362 __pthread_unwind hidden.
364 2013-03-28 Roland McGrath <roland@hack.frob.com>
366 * pthread_create.c (start_thread) [!SHARED]:
367 Call __call_tls_dtors only if it's not NULL.
369 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
371 * allocatestack.c (allocate_stack): Use __default_pthread_attr
372 instead of __default_stacksize.
373 * nptl-init.c (__pthread_initialize_minimal_internal):
374 Likewise. Initialize guardsize.
375 * pthreadP.h (__default_pthread_attr): Declare.
376 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
377 Use __default_pthread_attr instead of __default_stacksize.
378 * pthread_create.c (default_attr): Remove.
379 (__pthread_create_2_1): Use __default_pthread_attr instead of
381 * vars.c (__default_stacksize): Remove.
382 (__default_pthread_attr): New static variable to store
383 default thread attributes.
385 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
387 * pthread_barrier_init.c (default_attr): Rename to
389 (pthread_barrier_init): Adjust for the rename.
390 * pthread_mutex_init.c (default_attr): Rename to
392 (__pthread_mutex_init): Adjust for the rename.
393 * pthread_rwlock_init.c (default_attr): Rebane to
395 (__pthread_rwlock_init): Adjust for the rename.
397 2013-03-12 Carlos O'Donell <carlos@redhat.com>
399 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
401 2013-03-04 Roland McGrath <roland@hack.frob.com>
403 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
404 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
406 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
407 (RTLD_PRIVATE_ERRNO): Likewise.
408 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
409 Move macros and associated declaration to ...
410 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
411 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
414 2013-03-01 Carlos O'Donell <carlos@redhat.com>
416 * Makefile (tests): Revert last change.
417 (tst-pthread-stack-env-ENV): Likewise.
418 * nptl-init.c (set_default_stacksize): Likewise.
419 (__pthread_initialize_minimal_internal): Likewise.
420 * tst-pthread-stack-env.c: Likewise.
422 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
424 * tst-oddstacklimit.c: Include stdlib.h.
426 * Makefile (tests): Add tst-pthread-stack-env.
427 (tst-pthread-stack-env-ENV): Set environment for test.
428 * nptl-init.c (set_default_stacksize): New function.
429 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
430 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
431 * tst-pthread-stack-env.c: New test case.
433 2013-02-21 David S. Miller <davem@davemloft.net>
435 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
436 (FUTEX_WAIT_REQUEUE_PI): Define.
437 (FUTEX_CMP_REQUEUE_PI): Likewise.
438 (lll_futex_wait_requeue_pi): Likewise.
439 (lll_futex_timed_wait_requeue_pi): Likewise.
440 (lll_futex_cmp_requeue_pi): Likewise.
442 2013-02-21 Carlos O'Donell <carlos@redhat.com>
444 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
446 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
448 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
450 * tst-barrier4.c: Likewise.
451 * tst-robust7.c: Likewise.
454 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
456 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
457 PI-aware futex operations if available and mutex is PI-aware.
458 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
459 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
461 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
462 cancellation occurred just after futex returned successfully
463 from a PI operation with the mutex held.
464 (__pthread_cond_wait): Use PI-aware futex operations if
465 available and mutex is PI-aware.
466 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
467 (FUTEX_WAIT_REQUEUE_PI): Define.
468 (FUTEX_CMP_REQUEUE_PI): Likewise.
469 (lll_futex_wait_requeue_pi): Likewise.
470 (lll_futex_timed_wait_requeue_pi): Likewise.
471 (lll_futex_cmp_requeue_pi): Likewise.
472 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
473 (FUTEX_WAIT_REQUEUE_PI): Define.
474 (FUTEX_CMP_REQUEUE_PI): Likewise.
475 (lll_futex_wait_requeue_pi): Likewise.
476 (lll_futex_timed_wait_requeue_pi): Likewise.
477 (lll_futex_cmp_requeue_pi): Likewise.
478 * sysdeps/unix/sysv/linux/kernel-features.h: Define
479 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
481 2013-02-04 Andreas Schwab <schwab@suse.de>
484 * tst-cancel14.c: Include <sys/time.h>.
485 * tst-cancel15.c: Likewise.
486 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
487 * tst-stackguard1.c: Include <tls.h>
489 2013-01-16 Andreas Schwab <schwab@suse.de>
492 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
494 2013-01-11 Carlos O'Donell <codonell@redhat.com>
496 * allocatestack.c (allocate_stack): Add comment. Remove assert
499 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
501 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
502 with $(host-test-program-cmd).
503 (tst-exec4-ARGS): Likewise.
504 (tst-stackguard1-ARGS): Likewise.
505 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
506 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
507 * tst-tls6.sh (elf_objpfx): Removed.
508 (rtld_installed_name): Renamed to ...
509 (test_via_rtld_prefix): This.
510 (tst_tls5): Prepend ${test_via_rtld_prefix}.
512 2013-01-02 Joseph Myers <joseph@codesourcery.com>
514 * All files with FSF copyright notices: Update copyright dates
515 using scripts/update-copyrights.
517 2013-01-01 Joseph Myers <joseph@codesourcery.com>
519 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
522 2012-12-28 Andi Kleen <ak@linux.intel.com>
524 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
526 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
529 2012-12-27 David S. Miller <davem@davemloft.net>
531 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
532 (lll_futex_timed_wait_bitset): New macro.
534 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
536 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
538 (lll_futex_timed_wait): Replace assembly code with
540 (lll_futex_timed_wait_bitset): Likewise.
541 (lll_futex_wake): Likewise.
542 (lll_futex_requeue): Likewise.
543 (lll_futex_wake_unlock): Likewise.
545 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
547 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
548 Declare LOCAL_VAR as char.
550 2012-12-04 Joseph Myers <joseph@codesourcery.com>
552 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
553 Cast result of atomic_increment_val to (void) instead of storing
554 in otherwise-unused variable.
556 2012-12-03 Allan McRae <allan@archlinux.org>
558 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
560 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
562 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
564 * sysdeps/i386/tls.h: Include <libc-internal.h>.
565 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
566 (THREAD_SETMEM_NC): Likewise.
567 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
568 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
569 (THREAD_SETMEM_NC): Likewise.
571 2012-11-21 Joseph Myers <joseph@codesourcery.com>
573 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
574 of atomic_increment_val to (void) instead of storing in
575 otherwise-unused variable.
577 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
578 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
579 instead of storing in otherwise-unused variable.
581 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
583 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
584 (CFLAGS-recv.c, CFLAGS-send.c): Define.
586 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
588 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
589 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
591 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
593 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
594 if absolute timeout is negative.
595 [__ASSUME_FUTEX_CLOCK_REALTIME &&
596 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
597 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
599 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
601 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
602 (__lll_robust_timedlock_wait): Likewise.
603 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
604 (lll_futex_timed_wait_bitset): New macro.
605 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
606 (lll_futex_timed_wait_bitset): Likewise.
608 2012-11-03 David S. Miller <davem@davemloft.net>
610 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
612 (__cpu_relax): Likewise.
614 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
616 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
617 (__128bits): New struct typedef.
618 (tcbhead_t): Replace __m128 with __128bits.
620 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
621 Joseph Myers <joseph@codesourcery.com>
623 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
625 2012-10-28 David S. Miller <davem@davemloft.net>
627 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
628 Define when we have v9 instructions available.
629 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
630 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
632 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
634 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
635 to libpthread-routines.
637 2012-10-25 Roland McGrath <roland@hack.frob.com>
639 * tst-cond-except.c (TEST_FUNCTION): New macro.
641 2012-10-25 Joseph Myers <joseph@codesourcery.com>
643 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
645 * tst-tls6.sh: Use /bin/bash not /bin/sh.
647 2012-10-25 Roland McGrath <roland@hack.frob.com>
649 * tst-basic2.c (do_test): Return RESULT, not always zero.
651 * tst-cond25.c: Include <stdint.h>
652 (waiter): Add casts to uintptr_t between casting integer<->pointer.
653 (timed_waiter): Likewise.
654 (do_test_wait): Likewise.
655 * tst-cond-except.c (thr): Likewise.
656 (do_test): Use prototype definition.
658 2012-10-24 Joseph Myers <joseph@codesourcery.com>
659 Jim Blandy <jimb@codesourcery.com>
661 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
663 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
664 programs with LD_PRELOAD set.
666 2012-10-24 Roland McGrath <roland@hack.frob.com>
668 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
669 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
670 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
671 ($(objpfx)tst-rwlock14): Likewise.
673 2012-10-24 Joseph Myers <joseph@codesourcery.com>
675 * Makefile (tests): Remove tst-oddstacklimit.
676 (test-srcs): New variable.
677 (tst-oddstacklimit-ENV): Remove.
678 [$(run-built-tests) = yes] (tests): Depend on
679 $(objpfx)tst-oddstacklimit.out.
680 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
682 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
683 setrlimit before executing tst-basic1 test passed to --command.
685 2012-10-23 Joseph Myers <joseph@codesourcery.com>
687 * Makefile [$(cross-compiling) = no]: Change condition to
688 [$(run-built-tests) = yes].
690 2012-10-23 Jim Blandy <jimb@codesourcery.com>
691 Joseph Myers <joseph@codesourcery.com>
693 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
694 (tst-exec4-ARGS): Likewise.
695 (tst-stackguard1-ARGS): Likewise.
697 2012-10-21 Jim Blandy <jimb@codesourcery.com>
698 Joseph Myers <joseph@codesourcery.com>
700 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
701 tst-cancel-wrappers.sh.
702 * tst-cancel-wrappers.sh: Use nm program given as first argument,
705 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
707 * tst-cond25.c (do_test_wait): Don't check for return value from
710 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
713 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
714 (__condvar_tw_cleanup): Adjust the mutex data structure if it
715 was locked by FUTEX_WAIT_REQUEUE_PI.
716 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
717 (__condvar_w_cleanup): Likewise.
718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
719 (__condvar_cleanup2): Likewise.
720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
721 (__condvar_cleanup1): Likewise.
723 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
725 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
726 defined __EXCEPTIONS) && defined __USE_GNU]
727 (pthread_cleanup_push_defer_np): Fix formatting.
729 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
732 * Makefile (tests): New test case tst-cond25.
733 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
734 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
735 (__condvar_tw_cleanup): Lock mutex only if we don't already
737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
738 (__condvar_w_cleanup): Likewise.
739 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
740 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
741 (__condvar_cleanup2): Lock mutex only if we don't already
743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
744 (__condvar_cleanup1): Likewise.
745 * tst-cond25.c: New test case.
747 2012-10-09 Roland McGrath <roland@hack.frob.com>
749 * sysdeps/pthread/configure: Regenerated.
750 * sysdeps/x86_64/configure: Regenerated.
752 2012-10-05 David S. Miller <davem@davemloft.net>
755 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
756 (DB_THREAD_SELF): Use constants for the register offsets. Correct
757 the case of a 64-bit debugger with a 32-bit inferior.
759 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
762 * Makefile (tests-static): Add tst-cancel24-static,
763 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
764 tst-sem11-static and tst-sem12-static.
766 (LDLIBS-tst-cancel24-static): New macro.
767 * tst-cancel24-static.cc: New file.
768 * tst-cond8-static.c: Likewise.
769 * tst-mutex8-static.c: Likewise.
770 * tst-mutexpi8-static.c: Likewise.
771 * tst-sem11-static.c: Likewise.
772 * tst-sem12-static.c: Likewise.
774 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
777 * Makefile (tests): New test case tst-cond24.
778 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
779 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
780 (__pthread_cond_timedwait): Unlock mutex before going back to
782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
783 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
784 return from futex_wait.
785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
786 (__pthread_cond_timedwait): Unlock mutex before going back to
787 wait in PI case. Set requeue_pi flag only if wait returned 0.
788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
789 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
790 return from futex_wait.
791 * tst-cond24.c: New test case.
793 2012-10-04 Roland McGrath <roland@hack.frob.com>
795 * pthread_create.c (start_thread): Use __madvise, not madvise.
797 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
799 * sysdeps/i386/tls.h: Update copyright years.
801 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
803 * pthread_create.c (start_thread): Fix clone flag name in
804 comment to CLONE_CHILD_CLEARTID.
805 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
806 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
807 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
808 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
809 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
810 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
812 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
815 * Makefile (tests): Add tst-cond-except.
816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
817 (__pthread_cond_timedwait): Mark instructions where %ebx is
818 incremented in PI case.
819 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
820 for the marked PI case instructions.
821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
822 (__pthread_cond_wait): Mark instructions where %ebx is
823 incremented in PI case.
824 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
825 for the marked PI case instructions.
826 * tst-cond-except.c: New test case.
828 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
830 * tst-tls6.sh: Add "set -e".
831 * Makefile: Do not specify -e option when running testsuite
834 * tst-tls6.sh: Add copyright header.
836 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
838 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
839 to uint64_t for 64-bit store.
840 (THREAD_SETMEM_NC): Likewise.
842 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
844 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
846 (THREAD_SETMEM_NC): Likewise.
848 2012-09-14 Jeff Law <law@redhat.com>
851 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
853 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
856 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
859 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
861 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
862 (LDLIBS-tst-cancel24): This.
864 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
867 * Makefile (tests-static): Add tst-cancel21-static.
869 * tst-cancel21-static.c: New file.
871 2012-09-01 Joseph Myers <joseph@codesourcery.com>
873 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
874 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
875 [__NR_clock_getres]: Make code unconditional.
876 (pthread_getcpuclockid): Remove code left unreachable by removal
879 2012-08-31 Joseph Myers <joseph@codesourcery.com>
882 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
883 atomic_compare_and_exchange_bool_rel.
884 * tst-sem14.c: New file.
885 * Makefile (tests): Add tst-sem14.
887 2012-08-15 Roland McGrath <roland@hack.frob.com>
889 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
891 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
892 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
894 2012-08-16 Joseph Myers <joseph@codesourcery.com>
896 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
897 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
898 * pthread_condattr_setclock.c (pthread_condattr_setclock)
899 [!__ASSUME_POSIX_TIMERS]: Likewise.
900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
901 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
902 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
903 [!__ASSUME_POSIX_TIMERS]: Likewise.
904 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
905 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
906 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
908 [!__NR-timer_create]: Remove conditional code.
909 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
910 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
912 [!__NR_timer_delete]: Remove conditional code.
913 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
914 * sysdeps/unix/sysv/linux/timer_getoverr.c
915 [__NR_timer_getoverrun]: Make code unconditional.
916 [!__NR_timer_getoverrun]: Remove conditional code.
917 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
918 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
919 Make code unconditional.
920 [!__NR_timer_gettime]: Remove conditional code.
921 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
922 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
923 Make code unconditional.
924 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
925 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
926 Make code unconditional.
927 [!__NR_timer_settime]: Remove conditional code.
928 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
930 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
933 2012-08-15 Tom de Vries <vries@codesourcery.com>
934 Maxim Kuvyrkov <maxim@codesourcery.com>
936 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
937 (__libc_lock_trylock): Allow pre-existing definitions.
939 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
941 * pthread_spin_lock.c: New file.
942 * pthread_spin_trylock.c: New file.
944 2012-08-08 Joseph Myers <joseph@codesourcery.com>
946 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
948 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
949 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
951 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
952 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
953 Make code unconditional.
954 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
955 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
956 __NR_tgkill]: Make code unconditional.
957 (raise) [__ASSUME_TGKILL]: Likewise.
958 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
959 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
960 [__ASSUME_TGKILL]: Make code unconditional.
961 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
962 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
963 __NR_tgkill]: Make code unconditional.
964 (raise) [__ASSUME_TGKILL]: Likewise.
965 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
967 2012-08-07 Joseph Myers <joseph@codesourcery.com>
969 * sysdeps/pthread/createthread.c (create_thread)
970 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
972 2012-08-03 Joseph Myers <joseph@codesourcery.com>
974 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
976 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
978 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
980 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
981 (pagesize): New static variable.
982 (allocate_and_test): Return MEM. Rename parameter to TARGET.
983 (check_stack_top): New local variables MEM and PAGEMASK. Cap
984 stack size to MAX_STACK_SIZE. Call allocate_and_test for
985 halfway up the stack top page. Verify that the top page was
987 (do_test): Get pagesize using sysconf.
989 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
991 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
993 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
994 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
997 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
999 * tst-pthread-getattr.c: Revert last change.
1001 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1003 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1006 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
1008 (check_stack_top): Read valued written into STACKADDR in
1009 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
1011 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
1013 * nptl-init.c (sighandler_setxid): Fix the comment that
1016 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
1018 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1019 (__lll_robust_timedlock_wait): Simplify CFI directives.
1021 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1024 * Makefile (tests): Add test case.
1025 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1026 the __libc_stack_end page from stacksize. Truncate stacksize to
1027 make it page aligned when it is computed from RLIMIT_STACK.
1028 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1031 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
1034 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1037 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
1038 Jakub Jelinek <jakub@redhat.com>
1041 * sysdeps/pthread/pthread.h
1042 [!(defined __GNUC__ && defined __EXCEPTIONS)]
1043 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1044 __libc_unlikely instead of __builtin_expect.
1046 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
1049 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1050 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1051 * sysdeps/unix/sysv/linux/i386/Implies: New file.
1052 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1053 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1055 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1056 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1058 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1060 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
1063 * nptl-init.c (pthread_functions): Remove use of INTUSE and
1065 (__pthread_initialize_minimal_internal): Likewise.
1066 * sem_open.c: Likewise.
1067 * sem_unlink.c: Likewise.
1068 * pthreadP.h: Replace _internal aliases by hidden_proto
1070 * pthread_getspecific.c: Replace _internal alias by hidden_def.
1071 * pthread_key_create.c: Likewise.
1072 * pthread_mutex_destroy.c: Likewise.
1073 * pthread_mutex_init.c: Likewise.
1074 * pthread_mutex_lock.c: Likewise.
1075 * pthread_mutex_unlock.c: Likewise.
1076 * pthread_once.c: Likewise.
1077 * pthread_rwlock_rdlock.c: Likewise.
1078 * pthread_rwlock_unlock.c: Likewise.
1079 * pthread_rwlock_wrlock.c: Likewise.
1080 * pthread_setspecific.c: Likewise.
1081 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1083 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1087 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1088 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1089 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1090 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1093 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1094 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1095 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1096 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1098 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1100 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1103 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
1105 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1106 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1108 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1109 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1111 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1112 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1113 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1114 (pthread_barrier_wait): Likewise.
1115 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1116 (__pthread_cond_broadcast): Likewise.
1117 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1118 (__pthread_cond_signal): Likewise.
1119 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1120 (__pthread_cond_timedwait): Likewise.
1121 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1123 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1124 (__pthread_rwlock_rdlock): Likewise.
1125 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1126 (pthread_rwlock_timedrdlock): Likewise.
1127 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1128 (pthread_rwlock_timedwrlock): Likewise.
1129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1130 (__pthread_rwlock_unlock): Likewise.
1131 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1132 (__pthread_rwlock_wrlock): Likewise.
1133 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1134 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1135 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1137 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1139 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1142 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1143 __libc_stack_end rounded to the end of containing page as the
1146 2012-05-25 Rayson Ho <rho@redhat.com>
1148 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1150 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1151 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1156 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1159 2012-05-25 Rayson Ho <rho@redhat.com>
1160 Roland McGrath <roland@hack.frob.com>
1162 * DESIGN-systemtap-probes.txt: New file.
1163 * pthread_cond_broadcast.c: SystemTap probes.
1164 * pthread_cond_init.c: Likewise.
1165 * pthread_cond_signal.c: Likewise.
1166 * pthread_cond_wait.c: Likewise.
1167 * pthread_cond_destroy.c: Likewise.
1168 * pthread_create.c: Likewise.
1169 * pthread_join.c: Likewise.
1170 * pthread_mutex_destroy.c: Likewise.
1171 * pthread_mutex_init.c: Likewise.
1172 * pthread_mutex_lock.c: Likewise.
1173 * pthread_mutex_timedlock.c: Likewise.
1174 * pthread_mutex_unlock.c: Likewise.
1175 * pthread_rwlock_destroy.c: Likewise.
1176 * pthread_rwlock_rdlock.c: Likewise.
1177 * pthread_rwlock_unlock.c: Likewise.
1178 * pthread_rwlock_wrlock.c: Likewise.
1179 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1180 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1181 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1185 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1186 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1188 2012-05-24 Roland McGrath <roland@hack.frob.com>
1190 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1192 2012-05-17 Andreas Jaeger <aj@suse.de>
1194 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1195 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1196 only for older kernels.
1198 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1200 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1203 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1205 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1206 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1207 (lll_robust_lock): Likewise.
1208 (lll_cond_lock): Likewise.
1209 (lll_robust_cond_lock): Likewise.
1210 (lll_timedlock): Likewise.
1211 (lll_robust_timedlock): Likewise.
1212 (lll_unlock): Likewise.
1213 (lll_robust_unlock): Likewise.
1215 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1218 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1220 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1222 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1224 (__gcc_personality_v0): Replace 8-byte data alignment with
1225 LP_SIZE alignment and .quad with ASM_ADDR.
1227 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1229 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1231 (__gcc_personality_v0): Replace 8-byte data alignment with
1232 LP_SIZE alignment and .quad with ASM_ADDR.
1234 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1236 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1237 NWAITERS, which is unsigned long int.
1239 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1241 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1242 (__gcc_personality_v0): Replace 8-byte data alignment with
1243 LP_SIZE alignment and .quad with ASM_ADDR.
1245 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1248 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1249 __vdso_clock_gettime pointer into RAX_LP.
1250 (__gcc_personality_v0): Replace 8-byte data alignment with
1251 LP_SIZE alignment and .quad with ASM_ADDR.
1253 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1255 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1256 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1257 __vdso_clock_gettime pointer into RAX_LP.
1258 (__gcc_personality_v0): Replace 8-byte data alignment with
1259 LP_SIZE alignment and .quad with ASM_ADDR.
1261 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1264 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1266 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1268 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1269 to update pointer in memory. Load pointer into RDI_LP.
1271 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1273 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1274 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1276 (LLL_STUB_UNWIND_INFO_END): Likewise.
1277 (lll_timedlock): Load timeout pointer into RDX_LP.
1278 (lll_robust_timedlock): Likewise.
1280 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1281 Jakub Jelinek <jakub@redhat.com>
1284 * Makefile (tests): Add test cases.
1285 * descr.h (struct pthread): Add a comment describing multiple_threads.
1286 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1287 single-process case.
1288 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1289 before setting cancelstate of the thread.
1290 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1291 (__libc_multiple_threads): Add explanatory comment.
1292 * tst-cancel-self-cancelstate.c: New test case.
1293 * tst-cancel-self-canceltype.c: Likewise.
1294 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1295 * tst-cancel-self-testcancel.c: New test case.
1296 * tst-cancel-self.c: Likewise.
1297 * vars.c: Expand comment to include single-process case.
1299 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1301 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1302 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1305 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1307 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1309 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1310 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1312 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1314 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1315 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1316 * sysdeps/x86_64/x32/shlib-versions: New file.
1318 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1320 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1321 __SIZEOF_PTHREAD_XXX_T.
1322 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1323 (pthread_mutex_t): Likewise.
1324 (pthread_rwlock_t): Likewise.
1325 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1328 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1330 * sysdeps/x86_64/x32/tls.h: New file.
1332 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1334 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1336 (THREAD_SETMEM_NC): Likewise.
1338 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1340 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1343 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1345 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1346 (__cleanup_fct_attribute): Check __x86_64__ instead of
1349 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1351 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1352 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1353 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1354 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1355 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1357 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1359 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1360 instead of __WORDSIZE.
1362 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1365 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1367 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1369 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1370 (__pthread_cond_timedwait): Use CFI directives.
1371 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1372 (__pthread_cond_wait): Likewise.
1373 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1374 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1376 2012-05-03 David S. Miller <davem@davemloft.net>
1378 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1379 always have to return 0, especially for the pthread_spin_init
1381 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1383 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1384 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1386 2012-05-02 David S. Miller <davem@davemloft.net>
1388 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1389 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1390 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1391 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1392 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1393 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1394 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1395 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1396 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1397 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1398 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1399 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1400 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1401 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1402 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1403 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1404 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1405 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1407 2012-05-02 Allan McRae <allan@archlinux.org>
1409 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1410 (LDFLAGS-tst-cancel24): Likewise.
1412 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1414 * sysdeps/i386/pthread_spin_lock.S: New.
1415 * sysdeps/i386/pthread_spin_lock.c: Delete.
1416 * sysdeps/x86_64/pthread_spin_lock.S: New.
1417 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1419 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1421 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1422 run when cross-compiling.
1424 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1426 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1427 instead of libgcc_s.h.
1429 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1431 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1433 2012-03-27 David S. Miller <davem@davemloft.net>
1435 * tst-cond16.c (do_test): Use a thread stack size which is either
1436 PTHREAD_STACK_MIN or the page size, whichever is larger.
1437 * tst-cond18.c (do_test): Likewise.
1439 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1441 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1442 register char * __asm__("rsp") to get stack frame.
1444 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1446 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1447 __NR_futex directly.
1449 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1451 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1454 2012-03-16 David S. Miller <davem@davemloft.net>
1457 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1459 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1462 2012-03-15 David S. Miller <davem@davemloft.net>
1465 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1467 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1470 * pt-crti.S: Replace FSF snail mail address with URL.
1472 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1474 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1475 Do not define before including <time.h>.
1477 2012-03-08 David S. Miller <davem@davemloft.net>
1479 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1481 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1483 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1484 Check for timestamp before the Epoch.
1486 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1489 * tst-sem13.c (do_test): Add another test case.
1490 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1491 Fix updating nwaiters.
1493 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1496 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1497 link test to a compile test.
1498 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1500 * sysdeps/pthread/configure: Regenerated.
1502 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1504 * Makefile (distribute): Remove variable.
1506 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1508 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1509 superfluous assignment.
1510 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1512 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1513 (sem_timedwait): Likewise.
1515 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1517 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1518 installed headers to...
1519 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1521 2012-03-06 David S. Miller <davem@davemloft.net>
1523 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1524 atomic_increment and remove unused local variable.
1525 (__old_sem_post): Likewise.
1527 2012-02-27 David S. Miller <davem@davemloft.net>
1529 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1530 non-existing __pthread_attr.
1531 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1532 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1533 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1534 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1535 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1537 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1539 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1541 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1543 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1545 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1546 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1547 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1548 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1549 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1551 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1554 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1556 [crti.S not in sysdirs] (omit-deps): Do not append.
1557 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1558 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1559 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1560 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1561 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1562 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1563 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1564 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1565 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1567 * sysdeps/pthread/pt-initfini.c: Remove file.
1569 2012-02-16 Richard Henderson <rth@twiddle.net>
1571 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1572 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1574 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1576 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1578 2012-02-16 David S. Miller <davem@davemloft.net>
1580 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1582 2012-02-15 Marek Polacek <polacek@redhat.com>
1584 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1586 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1588 Replace FSF snail mail address with URLs, as per GNU coding standards.
1590 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1592 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1594 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1596 Support crti.S and crtn.S provided directly by architectures.
1597 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1598 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1599 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1600 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1601 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1602 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1603 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1604 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1605 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1606 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1607 * pt-crti.S: New file.
1608 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1610 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1613 macros for PIC register setup.
1614 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1615 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1616 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1617 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1618 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1620 2012-01-11 Marek Polacek <polacek@redhat.com>
1622 * forward.c (FORWARD_NORETURN): Define macro.
1623 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1624 (__pthread_exit): Likewise.
1626 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1628 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1630 * pthreadP.h: Add noreturn to __pthread_exit.
1631 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1633 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1635 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1636 Call pthread_attr_setstacksize() with result of
1637 __pthread_get_minstack() to account for application TLS usage.
1639 2012-01-08 Marek Polacek <polacek@redhat.com>
1641 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1643 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1646 * pthreadP.h: Use const instead of __const.
1647 * semaphore.h: Likewise.
1648 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1649 * sysdeps/pthread/bits/sigthread.h: Likewise.
1650 * sysdeps/pthread/pthread.h: Likewise.
1652 * Makefile: Remove elf=yes test, only ELF is supported.
1654 * shlib-versions: Remove entries for ports architectures.
1656 In case anyone cares, the IA-64 architecture could move to ports.
1657 * sysdeps/ia64/*: Removed.
1658 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1660 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1662 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1663 __pthread_get_minstack.
1664 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1667 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1668 through __pthread_get_minstack.
1669 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1670 directly from _rtld_global_ro.
1671 (__pthread_get_minstack): New function.
1672 * pthreadP.h: Declare __pthread_get_minstack.
1673 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1675 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1678 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1679 Correct reading name from file.
1681 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1683 * allocatestack.c (allocate_stack): Return errno on failure.
1685 2011-12-14 Jeff Law <law@redhat.com>
1688 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1690 2011-11-28 Andreas Schwab <schwab@redhat.com>
1692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1693 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1696 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1698 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1701 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1704 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1705 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1706 path for kernels with FUTEX_CLOCK_REALTIME.
1707 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1709 2011-10-27 Andreas Schwab <schwab@redhat.com>
1712 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1713 for memory synchronization functions.
1714 * semaphore.h: Likewise.
1716 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1718 * tst-cancel7.c: Avoid warning.
1719 * tst-mutex6.c: Likewise.
1720 * tst-mutex9.c: Likewise.
1721 * tst-mutexpi6.c: Likewise.
1723 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1725 * sysdeps/i386/tls.h: Remove #include <list.h>.
1727 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1729 * pthread_create.c (start_thread): Call __ctype_init.
1731 2011-09-15 Andreas Schwab <schwab@redhat.com>
1733 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1735 (list_add): Add atomic_write_barrier.
1736 * descr.h: Define __need_list_t before including <list.h>.
1737 * nptl-init.c: Include <list.h>
1738 * allocatestack.c: Likewise.
1740 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1742 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1743 * sysdeps/ia64/tls.h: Likewise.
1744 * sysdeps/powerpc/tls.h: Likewise.
1745 * sysdeps/s390/tls.h: Likewise.
1746 * sysdeps/sh/tls.h: Likewise.
1747 * sysdeps/sparc/tls.h: Likewise.
1748 * sysdeps/x86_64/tls.h: Likewise.
1750 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1752 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1754 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1756 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1757 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1758 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1759 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1760 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1761 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1762 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1763 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1764 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1765 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1766 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1767 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1769 * tst-tls1.c: Support for __thread is now mandatory.
1770 * tst-tls2.c: Likewise.
1771 * tst-tls3.c: Likewise.
1772 * tst-tls3mod.c: Likewise.
1773 * tst-tls4.c: Likewise.
1774 * tst-tls4moda.c: Likewise.
1775 * tst-tls4modb.c: Likewise.
1776 * tst-tls5.h: Likewise.
1778 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1781 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1782 (pthread_rwlock_timedwrlock): Use correct macro in test.
1783 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1785 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1787 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1788 use gettimeofday vsyscall, just call gettimeofday.
1789 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1790 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1791 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1793 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1795 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1796 Simplify __vdso_clock_gettime use.
1798 2011-09-05 David S. Miller <davem@davemloft.net>
1800 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1802 (sem_timedwait): Call it to force an exception region around
1803 the async cancel enable and the futex operation.
1804 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1805 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1806 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1807 (__new_sem_wait): Call it to force an exception region around
1808 the async cancel enable and the futex operation.
1809 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1810 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1812 2011-08-31 Andreas Schwab <schwab@redhat.com>
1814 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1817 2011-08-20 David S. Miller <davem@davemloft.net>
1819 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1821 2011-08-14 Roland McGrath <roland@hack.frob.com>
1823 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1824 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1826 2011-08-08 Andreas Schwab <schwab@redhat.com>
1828 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1833 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1835 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1837 (__gcc_personality_v0): Likewise.
1838 (_Unwind_ForcedUnwind): Likewise.
1839 (_Unwind_GetCFA): Likewise.
1841 2011-07-14 Roland McGrath <roland@hack.frob.com>
1843 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1846 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1848 * nptl-init.c (__nptl_set_robust): New function.
1849 (pthread_functions): Add reference.
1850 * npthreadP.h: Declare __nptl_set_robust.
1851 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1852 ptr_set_robust member.
1853 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1854 child if threads are used.
1856 2011-06-14 Andreas Jaeger <aj@suse.de>
1858 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1860 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1863 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1865 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1868 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1870 Patch partly by Robert Rex <robert.rex@exasol.com>.
1872 2011-01-19 Roland McGrath <roland@redhat.com>
1874 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1875 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1876 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1877 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1878 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1879 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1881 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1883 * Makefile (test-extras): Add tst-cleanup4aux.
1885 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1888 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1889 (__SETXID_2): Likewise.
1890 (__SETXID_3): Likewise.
1892 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1895 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1896 * alloca_cutoff.c: Add libc_hidden_def.
1898 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1901 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1902 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1903 of "struct pthread".
1905 2010-09-21 Andreas Schwab <schwab@redhat.com>
1907 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1908 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1909 (pthread_cleanup_push_defer_np): Likewise.
1911 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1916 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1917 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1920 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1922 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1924 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1926 2010-05-01 Alan Modra <amodra@gmail.com>
1928 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1929 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1930 to save temps. Correct cfi for possible later frame manipulation.
1931 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1932 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1933 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1934 (DOCARGS_6, UNDOCARGS_6): Likewise.
1935 (CENABLE, CDISABLE): Add nops for non-shared calls.
1937 2010-07-06 Andreas Schwab <schwab@redhat.com>
1939 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1942 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1944 * tst-abstime.c (do_test): Some more cleanups
1946 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1948 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1950 2010-07-01 Andreas Schwab <schwab@redhat.com>
1951 Ulrich Drepper <drepper@redhat.com>
1953 * Makefile (tests): Add tst-abstime.
1954 * tst-abstime.c: New file.
1955 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1956 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1957 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1958 (__lll_timedlock_wait): Likewise.
1959 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1960 (__lll_robust_timedlock_wait): Likewise.
1961 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1962 (__pthread_cond_timedwait): Likewise.
1963 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1964 (pthread_rwlock_timedrdlock): Likewise.
1965 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1966 (pthread_rwlock_timedwrlock): Likewise.
1967 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1970 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1972 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1974 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1976 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1977 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1979 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1982 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1983 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1984 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1986 * Makefile (libpthread-routines): Add pthread_getname and
1988 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1990 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1992 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1993 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1994 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1995 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1997 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1999 * pthread_cond_timedwait.c: Add check for
2000 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2001 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2004 2010-03-09 Ulrich Drepper <drepper@redhat.com>
2006 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2007 and the call fails wake eventually waiting setxid threads. Don't free
2008 stack here if we try starting a thread.
2009 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2010 if the clone call failed.
2012 2010-03-08 Andreas Schwab <schwab@redhat.com>
2014 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2015 * allocatestack.c (get_cached_stack): Set setxid_futex.
2016 (allocate_stack): Likewise.
2018 2010-03-05 Andreas Schwab <schwab@redhat.com>
2019 Ulrich Drepper <drepper@redhat.com>
2021 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2022 it is creating a thread or it is just being created.
2023 * pthread_create.c (start_thread): Wake setxid thread if it is
2025 (__pthread_create_2_1): Initialize setxid_futex.
2026 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2029 2010-01-15 Ulrich Drepper <drepper@redhat.com>
2031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2035 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
2037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2038 Fix pthread_cond_timedwait with requeue-PI.
2039 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2040 Fix pthread_cond_wait with requeue-PI.
2042 2010-01-14 Ulrich Drepper <drepper@redhat.com>
2044 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2045 and pthread_mutexattr_setrobust for GLIBC_2.12.
2046 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2047 * pthread_mutexattr_getrobust.c: Define alias
2048 pthread_mutexattr_getrobust.
2049 * pthread_mutexattr_setrobust.c: Define alias
2050 pthread_mutexattr_setrobust.
2052 2010-01-12 Ulrich Drepper <drepper@redhat.com>
2054 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
2056 2010-01-08 Ulrich Drepper <drepper@redhat.com>
2058 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2060 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
2062 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2063 call __gmon_start__.
2064 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2066 2009-12-17 Ulrich Drepper <drepper@redhat.com>
2068 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2071 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
2073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2074 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2075 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2076 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2079 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2082 2009-12-12 Ulrich Drepper <drepper@redhat.com>
2084 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2085 Don't update nwaiters after invalid timeout is recognized.
2087 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
2089 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2092 2009-11-27 Andreas Schwab <schwab@redhat.com>
2094 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2095 THREAD_SELF->cancelhandling after returning from futex call.
2097 2009-11-24 Ulrich Drepper <drepper@redhat.com>
2099 * tst-sem13.c: New file.
2100 * Makefile (tests): Add tst-sem13.
2102 2009-11-22 Roland McGrath <roland@redhat.com>
2104 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2105 instead of recapitulating its contents.
2107 2009-11-18 Ulrich Drepper <drepper@redhat.com>
2109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2110 optimizations and cleanups.
2112 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
2114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2115 Remove redundant code. Fix cfi offsets.
2116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2119 2009-11-17 Ulrich Drepper <drepper@redhat.com>
2121 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2122 reduce size of unwind info.
2124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2127 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2129 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2132 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2134 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2136 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2138 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2141 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2142 steps to avoid races with creation and terminations.
2143 * nptl-init.c (sighandler_setxid): Adjust.
2144 Patch by Daniel Jacobowitz.
2146 2009-09-07 Andreas Schwab <schwab@redhat.com>
2148 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2150 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2151 Joseph Myers <joseph@codesourcery.com>
2154 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2155 Initialize the sigev_notify field for newly created timer to make sure
2156 the timer gets deleted from the active timer's list upon timer_delete.
2158 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2160 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2161 Correct a logic error.
2163 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2165 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2166 of the field in local variables.
2167 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2168 variable and don't unconditionally clear it.
2170 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2172 * pthread_create.c (start_thread): Hint to the kernel that memory for
2173 the stack can be reused. We do not mark all the memory. The part
2174 still in use and some reserve are kept.
2176 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2178 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2180 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2182 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2185 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2187 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2189 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2191 2009-08-10 Andreas Schwab <schwab@redhat.com>
2193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2194 (__pthread_cond_signal): Don't clobber register used for syscall
2197 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2199 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2200 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2203 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2206 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2208 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2209 enabled by the special *_asynccancel functions.
2210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2213 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2215 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2217 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2218 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2219 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2220 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2221 since we can assume the special __*_{en,dis}able_asynccancel
2223 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2224 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2225 and PTHREAD_CANCELED.
2227 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2229 * descr.h: Better definition of *_BITMASK macros for cancellation.
2231 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2233 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2235 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2236 dynamic linker might have to save.
2237 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2238 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2241 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2243 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2245 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2247 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2248 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2249 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2250 requeue_pi for robust mutexes.
2251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2253 Don't only skip __pthread_mutex_cond_lock. Call instead
2254 __pthread_mutex_cond_lock_adjust.
2255 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2257 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2258 optimization of PI mutex handling.
2260 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2263 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2264 instead of of _acq variants of cmpxchg.
2266 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2268 * sysdeps/x86_64/configure.in: New file.
2270 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2271 path when not using absolute timeout futex.
2273 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2276 optimizations of last changes.
2277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2279 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2281 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2282 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2283 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2284 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2287 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2291 (__pthread_cond_timedwait): Make more robust.
2293 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2296 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2297 directly use absolute timeout.
2299 * tst-sem5.c (do_test): Add test for premature timeout.
2300 * Makefile: Linu tst-sem5 with librt.
2302 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2303 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2304 directly use absolute timeout.
2305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2306 (pthread_rwlock_timedrdlock): Likewise.
2308 * tst-cond11.c (run_test): Add test to check that the timeout is
2311 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2312 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2313 directly use absolute timeout.
2315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2316 (__pthread_cond_wait): Convert to using exception handler instead of
2317 registered unwind buffer.
2318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2319 (__pthread_cond_timedwait): Likewise.
2321 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2323 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2324 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2325 use absolute timeout.
2327 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2328 handling of uncontested semaphore.
2330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2331 (__condvar_cleanup): Rewrite to use cfi directives instead of
2332 hand-coded unwind tables.
2333 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2335 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2336 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2339 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2341 * Makefile (libpthread-routines): Add pthread_sigqueue.
2342 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2343 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2344 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2346 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2349 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2350 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2352 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2354 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2356 * libc-cancellation.c: Move __libc_cleanup_routine to...
2357 * libc-cleanup.c: ...here. New file.
2358 * Makefile (routines): Add libc-cleanup.
2360 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2362 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2363 * sysdeps/pthread/librt-cancellation.c: Likewise.
2366 * nptl-init.c: Renamed from init.c.
2367 * Makefile: Change all occurences of init.c to nptl-init.c.
2369 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2371 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2372 to test when deciding on the delay.
2373 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2374 * pthread_cancel.c: Close race between deciding on sending a signal
2375 and setting the CANCELING_BIT bit.
2377 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2379 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2381 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2383 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2385 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2386 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2387 * sysdeps/i386/tls.h: Likewise.
2388 (tcbhead_t): Add __private_tm member.
2390 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2392 * sem_open.c (sem_open): Rewrite initialization of initsem to
2395 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2396 Avoid warning by using may_alias attribute on ptrhack.
2398 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2401 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2402 Check policy and priority for validity.
2403 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2405 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2408 (__pthread_cond_timedwait): Change to use cfi directives instead of
2409 hand-coded unwind sections.
2411 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2413 * init.c (nptl_freeres): Compile only for SHARED.
2415 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2417 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2418 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2419 FUTEX_BITSET_MATCH_ANY.
2421 2009-02-27 Roland McGrath <roland@redhat.com>
2423 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2424 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2426 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2428 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2429 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2430 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2433 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2435 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2438 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2440 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2441 Unify name of include protector macro.
2443 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2445 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2446 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2448 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2450 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2453 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2454 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2455 * init.c (nptl_freeres): New function.
2456 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2457 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2458 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2460 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2461 load DSO. Assign last.
2462 (__unwind_freeres): New function.
2464 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2465 for better debugging. No need to use stack_list_add here.
2467 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2469 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2470 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2471 instead of computing relative timeout.
2472 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2473 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2475 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2477 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2479 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2481 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2482 (list_add_tail): Removed.
2484 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2486 * (in_flight_stack): New variable.
2487 (stack_list_del): New function. Use instead of list_del.
2488 (stack_list_add): New function. Use instead of list_add when adding to
2489 stack_cache and stack_used lists.
2490 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2491 when the fork call interrupted another thread.
2493 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2495 * init.c (__pthread_initialize_minimal_internal): Optimize test
2496 FUTEX_CLOCK_REALTIME a bit.
2498 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2500 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2501 only passing five parameters to FUTEX_WAIT_BITSET call.
2503 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2504 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2505 instead of computing relative timeout.
2507 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2509 * init.c (__pthread_initialize_minimal_internal): Check for
2510 FUTEX_CLOCK_REALTIME flag.
2511 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2512 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2516 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2517 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2518 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2519 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2520 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2522 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2524 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2525 loop body instead of ; to avoid gcc warnings.
2526 (pthread_cleanup_pop_restore_np): Likewise.
2527 Patch by Caolán McNamara <caolanm@redhat.com>.
2529 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2531 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2532 fast path here, for robust/PI/PP mutexes call
2533 __pthread_mutex_lock_full. Don't use switch, instead use a series
2534 of ifs according to their probability.
2535 (__pthread_mutex_lock_full): New function.
2536 * pthread_mutex_unlock.c: Include assert.h.
2537 (__pthread_mutex_unlock_usercnt): Handle only the
2538 fast path here, for robust/PI/PP mutexes call
2539 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2540 of ifs according to their probability.
2541 (__pthread_mutex_unlock_full): New function.
2542 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2543 (__pthread_mutex_lock_full): Define.
2545 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2547 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2548 implementation. Add necessary padding and.
2549 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2552 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2554 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2555 and FUTEX_WAKE_BITSET.
2557 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2559 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2560 and FUTEX_WAKE_BITSET.
2561 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2562 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2563 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2564 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2566 2008-11-25 Roland McGrath <roland@redhat.com>
2568 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2569 Subdirectories moved to ports repository as
2570 sysdeps/.../nptl subdirectories.
2572 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2575 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2577 * pthread_cond_init.c (__pthread_cond_init): Fix
2578 cond->__data.__nwaiters initialization.
2579 * Makefile (tests): Add tst-cond23.
2580 * tst-cond23.c: New test.
2582 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2584 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2586 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2589 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2592 * pthread_mutex_lock.c: Add support for private PI mutexes.
2593 * pthread_mutex_timedlock.c: Likewise.
2594 * pthread_mutex_trylock.c: Likewise.
2595 * pthread_mutex_unlock.c: Likewise.
2596 Patch mostly by Ben Jackson <ben@ben.com>.
2598 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2601 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2602 Increase stack size for helper thread.
2604 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2606 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2607 assembly with a clobber list for access registers a0 and a1.
2609 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2611 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2612 to force runp->refcntr to be read from memory.
2614 2008-09-08 Richard Guenther <rguenther@suse.de>
2616 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2617 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2618 lll_timedlock, lll_robust_timedlock, lll_unlock,
2619 lll_robust_unlock): Promote private to int.
2621 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2623 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2624 ARCH_RETRY_MMAP definitions.
2625 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2626 Define MAP_STACK when not defined.
2627 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2628 handling of ARCH_RETRY_MMAP.
2630 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2632 * tst-align2.c (f): Print message that f is reached.
2634 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2637 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2638 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2640 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2642 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2643 SOCK_CLOEXEC if possible.
2645 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2647 * Makefile (tests): Add tst-rwlock2a.
2648 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2649 * tst-rwlock2a.c: New file.
2651 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2653 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2655 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2657 * sysdeps/pthread/pthread.h: Fix typo in comment.
2659 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2661 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2662 of CPU set to the kernel.
2664 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2666 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2669 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2673 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2675 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2677 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2683 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2686 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2688 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2690 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2692 David S. Miller <davem@davemloft.net>
2694 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2696 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2699 __pshared correctly.
2700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2702 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2704 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2706 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2708 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2710 2008-04-14 David S. Miller <davem@davemloft.net>
2712 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2713 (__old_sem_wait): Fix argument to lll_futex_wait().
2715 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2717 * pthread_create.c: Require pthread_mutex_trylock and
2718 pthread_key_delete for libgcc.
2720 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2723 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2724 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2725 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2727 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2729 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2730 <linux/limits.h> has defined it.
2731 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2732 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2733 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2734 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2736 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2738 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2740 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2741 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2743 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2745 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2746 HAVE_DL_DISCOVER_OSVERSION.
2747 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2748 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2750 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2753 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2754 _POSIX_CHOWN_RESTRICTED value to zero.
2756 2008-01-31 Roland McGrath <roland@redhat.com>
2758 * Makefile (omit-deps): Variable removed.
2760 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2762 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2763 unnecessary addr32 prefix.
2765 2008-01-29 Roland McGrath <roland@redhat.com>
2767 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2769 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2771 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2773 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2775 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2777 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2778 (__lll_lock_wait_private): Fix typo.
2779 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2780 (pthread_barrier_wait): Likewise. Adjust XADD use.
2781 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2783 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2784 (pthread_rwlock_timedrdlock): Return correct return value.
2785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2786 (pthread_rwlock_timedwrlock): Likewise.
2788 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2790 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2791 thread returns the program exits with an error code.
2793 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2795 * pthread-errnos.sym: Add EOVERFLOW.
2796 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2797 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2798 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2799 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2801 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2803 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2804 parameter. Passed it as permission to mmap.
2805 * allocatestack.c (allocate_stack): Pass prot as second parameter
2808 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2810 * tst-basic7.c: Allocate memory for the stack.
2813 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2814 (__pthread_cond_timedwait): Don't use VDSO.
2815 Patch by Michal Januszewski.
2817 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2820 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2821 Allow label before pthread_cleanup_pop.
2822 (pthread_cleanup_pop_restore_np): Likewise.
2824 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2826 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2827 Store 2 before returning ETIMEDOUT.
2829 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2832 Store 2 before returning ETIMEDOUT.
2833 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2834 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2835 (__lll_lock_wait_private): Optimize.
2836 (__lll_lock_wait): Likewise.
2838 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2840 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2841 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2842 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2844 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2847 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2848 If we time out, try one last time to lock the futex to avoid
2849 losing a wakeup signal.
2850 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2851 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2854 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2857 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2860 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2861 mmap failed to EAGAIN.
2862 * Makefile (tests): Add tst-basic7.
2863 * tst-basic7.c: New file.
2865 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2867 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2868 Use __linkin_atfork.
2870 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2872 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2873 missing line continuations.
2874 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2875 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2877 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2880 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2881 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2882 (struct timer): Add next element.
2883 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2884 enqueue timer structure into __active_timer_sigev_thread list.
2885 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2886 remove timer struct from __active_timer_sigev_thread.
2887 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2888 Before using timer structure make sure it is still on the
2889 __active_timer_sigev_thread list. Keep lock until done.
2890 Define __active_timer_sigev_thread and
2891 __active_timer_sigev_thread_lock.
2893 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2895 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2896 Redefine thread_atfork for use of ATFORK_MEM.
2897 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2898 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2900 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2901 Use atomic operation when removing first element of list.
2903 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2905 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2906 routine instead of an alias to __new_sem_post.
2908 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2910 * init.c (__pthread_initialize_minimal): Initialize word to appease
2913 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2915 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2916 libc.so just clear NAME.
2917 (__libc_rwlock_fini): Nop inside of libc.so.
2918 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2921 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2923 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2924 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2926 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2928 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2931 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2932 reclaimed stack if necessary.
2933 * Makefile (tests): Add tst-tsd6.
2934 * tst-tsd6.c: New file.
2936 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2938 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2939 Add private argument.
2941 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2944 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2946 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2948 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2949 (__lll_robust_timedlock): Pass private as last argument to
2950 __lll_robust_timedlock_wait.
2951 (__lll_unlock): Fix a pasto.
2953 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2955 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2956 sparc_old_sem): New structs.
2957 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2958 (__sem_wait_cleanup): New function.
2959 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2960 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2961 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2963 (__old_sem_wait): New function.
2964 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2965 nptl/sysdeps/unix/sysv/linux/sparc version.
2966 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2968 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2969 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2970 (__new_sem_trywait): Use sparc_old_sem structure.
2971 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2972 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2973 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2974 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2975 lll_futex_timed_wait.
2976 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2977 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2978 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2980 (__old_sem_post): New function.
2981 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2982 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2983 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2984 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2985 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2986 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2988 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2990 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2991 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2992 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2993 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2994 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2995 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2996 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2998 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2999 kernel-features.h and tcb-offsets.h.
3000 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3001 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3003 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3005 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3006 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3008 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3009 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3010 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3011 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3012 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3013 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3014 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3016 2007-08-14 Jakub Jelinek <jakub@redhat.com>
3018 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3019 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3020 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3021 lll_futex_timed_wait.
3023 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3024 __lll_robust_unlock): Rewrite as macros instead of inline functions.
3025 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3026 __lll_robust_unlock, __lll_wait_tid): Likewise.
3028 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3030 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3033 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3034 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3035 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3037 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3038 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3039 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3041 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3042 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3043 process private. Switch DW_CFA_advance_loc1 and some
3044 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3045 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3046 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3047 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3048 process private. Switch DW_CFA_advance_loc{1,2} and some
3049 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3051 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3055 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3056 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3059 (__pthread_cond_broadcast): Compare %r8 instead of
3060 dep_mutex-cond_*(%rdi) with $-1.
3061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3062 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3065 2007-08-13 Ulrich Drepper <drepper@redhat.com>
3067 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3069 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3071 * allocatestack.c: Include kernel-features.h.
3072 * pthread_create.c: Likewise.
3073 * pthread_mutex_init.c: Likewise.
3075 * pthread_cond_timedwait.c: Likewise.
3076 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3077 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3078 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3079 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3080 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3086 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3087 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3088 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3089 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3091 2007-08-12 Jakub Jelinek <jakub@redhat.com>
3093 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3094 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3095 byte elements. One of them is the new __shared element.
3096 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3097 adjust names of other padding elements.
3098 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3099 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3100 byte elements. One of them is the new __shared element.
3101 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3102 adjust names of other padding elements.
3103 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3104 Renamed __pad1 element to __shared, adjust names of other padding
3106 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3107 (pthread_rwlock_t): Likewise.
3108 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3111 2007-08-09 Anton Blanchard <anton@samba.org>
3113 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3115 2007-08-12 Ulrich Drepper <drepper@redhat.com>
3117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3118 <kernel-features.h>.
3119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3121 2007-08-11 Ulrich Drepper <drepper@redhat.com>
3123 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3124 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3125 dealing with robust mutexes.
3126 * pthread_mutex_timedlock.c: Likewise.
3127 * pthread_mutex_trylock.c: Likewise.
3128 * pthread_mutex_unlock.c: Likewise.
3129 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3131 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3133 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3134 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3135 (PTHREAD_MUTEX_PSHARED): Define.
3136 * pthread_mutex_init.c (__pthread_mutex_init): Set
3137 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3139 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3140 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3141 as second argument to lll_lock.
3142 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3143 instead of its __data.__lock field.
3144 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3145 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3147 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3148 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3149 instead of mutex->__data.__kind directly, pass
3150 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3151 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3152 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3153 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3154 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3155 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3156 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3157 of mutex->__data.__kind directly.
3158 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3159 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3160 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3161 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3162 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3163 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3165 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3166 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3167 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3169 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3170 Take mutex as argument instead of its __data.__lock field, pass
3171 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3172 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3173 __data.__lock field.
3174 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3175 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3176 to lll_robust_cond_lock.
3177 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3178 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3179 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3180 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3181 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3182 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3184 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3185 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3187 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3188 pshared variable, pass it to lll_lock, lll_unlock,
3189 lll_futex_timedwait and lll_futex_wake.
3190 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3191 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3193 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3194 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3196 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3197 lll_futex_wake_unlock): Likewise.
3198 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3200 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3201 lll_futex_wake_unlock): Likewise.
3202 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3204 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3205 lll_futex_wake_unlock): Likewise.
3206 (lll_futex_wake): Fix a typo.
3207 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3209 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3210 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3211 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3213 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3214 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3216 (__pthread_cond_timedwait): Likewise.
3217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3218 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3220 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3222 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3223 Don't use CGOTSETUP and CGOTRESTORE macros.
3224 (CGOTSETUP, CGOTRESTORE): Remove.
3225 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3228 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3230 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3231 definitions for private futexes.
3232 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3233 kernel-features.h and lowlevellock.h. Use private futexes if
3235 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3236 (__lll_mutex_lock_wait): Rename to
3237 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3238 (__lll_mutex_timedlock_wait): Rename to ...
3239 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3240 Don't compile in for libc.so.
3241 (__lll_mutex_unlock_wake): Rename to ...
3242 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3243 (__lll_timedwait_tid): Use __NR_gettimeofday.
3244 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3245 the header from assembler. Renamed all lll_mutex_* resp.
3246 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3247 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3248 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3250 (__lll_lock_wait_private): Add prototype.
3251 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3252 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3253 __lll_unlock_wake): Likewise.
3254 (lll_lock): Add private argument. Call __lll_lock_wait_private
3255 if private is constant LLL_PRIVATE.
3256 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3257 lll_timedlock, lll_robust_timedlock): Add private argument.
3258 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3259 if private is constant LLL_PRIVATE.
3260 (lll_robust_unlock, lll_robust_dead): Add private argument.
3261 (lll_lock_t): Remove.
3262 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3263 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3264 lll_cond_wake, lll_cond_broadcast): Remove.
3265 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3266 kernel-features.h and lowlevellock.h.
3267 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3268 (LOAD_FUTEX_WAIT): Define.
3269 (__lll_robust_mutex_lock_wait): Rename to ...
3270 (__lll_robust_lock_wait): ... this. Add private argument.
3271 Use LOAD_FUTEX_WAIT macro.
3272 (__lll_robust_mutex_timedlock_wait): Rename to ...
3273 (__lll_robust_timedlock_wait): ... this. Add private argument.
3274 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3275 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3277 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3278 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3279 __lll_mutex_{lock,unlock}_*.
3280 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3281 lowlevellock.h and pthread-errnos.h.
3282 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3283 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3284 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3285 __lll_mutex_{lock,unlock}_*.
3286 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3287 lowlevellock.h and pthread-errnos.h.
3288 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3289 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3290 __lll_mutex_{lock,unlock}_*.
3291 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3293 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3294 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3295 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3296 (__condvar_tw_cleanup): Likewise.
3297 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3299 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3300 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3301 __lll_mutex_{lock,unlock}_*.
3302 ( __condvar_w_cleanup): Likewise.
3303 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3304 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3305 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3307 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3308 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3309 __lll_mutex_{lock,unlock}_*.
3310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3312 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3313 FUTEX_PRIVATE_FLAG): Remove.
3314 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3315 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3316 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3318 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3319 FUTEX_PRIVATE_FLAG): Remove.
3320 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3321 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3322 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3324 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3325 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3326 __lll_mutex_{lock,unlock}_*.
3327 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3329 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3330 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3331 __lll_mutex_{lock,unlock}_*.
3332 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3333 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3334 (__new_sem_post): Use standard initial exec code sequences.
3335 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3337 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3338 FUTEX_PRIVATE_FLAG): Remove.
3339 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3340 exec code sequences.
3341 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3342 (__new_sem_trywait): Use standard initial exec code sequences.
3343 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3344 (__new_sem_wait): Use standard initial exec code sequences.
3346 2007-07-31 Anton Blanchard <anton@samba.org>
3348 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3349 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3350 atomic_full_barrier.
3352 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3354 * allocatestack.c (stack_cache_lock): Change type to int.
3355 (get_cached_stack, allocate_stack, __deallocate_stack,
3356 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3357 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3358 as second argument to lll_lock and lll_unlock macros on
3360 * pthread_create.c (__find_in_stack_list): Likewise.
3361 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3362 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3364 * descr.h (struct pthread): Change lock and setxid_futex field
3366 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3367 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3368 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3369 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3371 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3372 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3373 * pthreadP.h (__attr_list_lock): Change type to int.
3374 * pthread_attr_init.c (__attr_list_lock): Likewise.
3375 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3376 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3378 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3379 also for lll_futex_{wake,wait}.
3380 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3382 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3383 LLL_SHARED as second argument to lll_{,un}lock.
3384 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3385 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3386 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3387 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3389 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3390 as second argument to lll_{,un}lock macros on pd->lock.
3391 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3392 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3393 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3394 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3396 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3398 * pthread_once.c (once_lock): Change type to int.
3399 (__pthread_once): Pass LLL_PRIVATE as second argument to
3400 lll_{,un}lock macros on once_lock.
3401 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3402 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3403 rwlock->__data.__shared as second argument to them and similarly
3405 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3407 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3409 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3410 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3411 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3412 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3413 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3414 to lll_{,un}lock macros on __sem_mappings_lock.
3415 * sem_open.c (check_add_mapping): Likewise.
3416 (__sem_mappings_lock): Change type to int.
3417 * semaphoreP.h (__sem_mappings_lock): Likewise.
3418 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3419 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3420 instead of lll_*mutex_*, pass LLL_SHARED as last
3422 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3423 pass LLL_SHARED as last argument.
3424 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3425 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3426 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3427 pass LLL_SHARED as last argument.
3428 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3429 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3430 LLL_SHARED as last argument.
3431 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3432 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3434 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3435 __libc_lock_lock_recursive, __libc_lock_unlock,
3436 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3437 argument to lll_{,un}lock.
3438 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3439 _IO_lock_unlock): Likewise.
3440 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3442 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3443 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3445 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3446 free_mem): Likewise.
3447 (__fork_lock): Change type to int.
3448 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3449 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3450 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3452 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3453 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3454 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3456 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3457 pass it through to lll_futex_*wait, only compile in when
3459 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3460 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3461 argument and pass it through to lll_futex_*wait.
3462 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3463 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3464 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3465 inline functions to __lll_* resp. __lll_robust_*.
3466 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3467 (lll_mutex_dead): Add private argument.
3468 (__lll_lock_wait_private): New prototype.
3469 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3470 __lll_robust_lock_timedwait): Add private argument to prototypes.
3471 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3472 call __lll_lock_wait_private, otherwise pass private to
3474 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3475 __lll_robust_timedlock): Add private argument, pass it to
3476 __lll_*wait functions.
3477 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3478 call __lll_unlock_wake_private, otherwise pass private to
3480 (__lll_robust_unlock): Add private argument, pass it to
3481 __lll_robust_unlock_wake.
3482 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3483 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3484 argument, pass it through to __lll_* inline function.
3485 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3486 (lll_lock_t): Remove.
3487 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3488 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3489 lll_cond_wake, lll_cond_broadcast): Remove.
3490 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3491 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3492 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3493 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3495 the header from assembler. Renamed all lll_mutex_* resp.
3496 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3497 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3498 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3499 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3500 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3501 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3502 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3504 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3505 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3506 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3507 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3508 MULTIPLE_THREADS_OFFSET as another asm operand.
3509 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3510 MULTIPLE_THREADS_OFFSET as last asm operand, call
3511 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3512 otherwise pass private as another argument to __lll_lock_wait.
3513 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3514 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3515 private as another argument to __lll_*lock_wait call.
3516 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3517 MULTIPLE_THREADS_OFFSET as another asm operand, call
3518 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3519 otherwise pass private as another argument to __lll_unlock_wake.
3520 (lll_robust_unlock): Add private argument, pass private as another
3521 argument to __lll_unlock_wake.
3522 (lll_robust_dead): Add private argument, use __lll_private_flag
3524 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3525 LLL_MUTEX_LOCK_INITIALIZER.
3526 (lll_lock_t): Remove.
3527 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3528 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3529 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3530 lll_cond_wake, lll_cond_broadcast): Remove.
3531 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3532 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3533 2007-05-2{3,9} changes.
3534 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3535 kernel-features.h and lowlevellock.h.
3536 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3537 (LOAD_FUTEX_WAIT): Rewritten.
3538 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3540 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3541 (__lll_mutex_lock_wait): Rename to ...
3542 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3543 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3544 (__lll_mutex_timedlock_wait): Rename to ...
3545 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3546 contains private argument. Don't compile in for libc.so.
3547 (__lll_mutex_unlock_wake): Rename to ...
3548 (__lll_unlock_wake): ... this. %ecx contains private argument.
3549 Don't compile in for libc.so.
3550 (__lll_timedwait_tid): Use __NR_gettimeofday.
3551 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3552 kernel-features.h and lowlevellock.h.
3553 (LOAD_FUTEX_WAIT): Define.
3554 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3556 (__lll_robust_mutex_lock_wait): Rename to ...
3557 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3558 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3560 (__lll_robust_mutex_timedlock_wait): Rename to ...
3561 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3562 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3563 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3565 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3566 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3567 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3568 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3569 to __lll_lock_wait in %edx.
3570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3571 Include lowlevellock.h and pthread-errnos.h.
3572 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3573 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3574 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3575 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3576 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3578 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3579 Include lowlevellock.h and pthread-errnos.h.
3580 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3581 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3582 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3583 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3584 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3587 Include lowlevellock.h.
3588 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3590 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3591 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3592 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3593 __lll_unlock_wake. Use __NR_gettimeofday.
3594 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3595 Include lowlevellock.h.
3596 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3597 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3598 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3599 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3600 and __lll_unlock_wake.
3601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3602 Include lowlevellock.h.
3603 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3604 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3605 MUTEX(%ebx) address in %edx rather than %ecx to
3606 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3607 and __lll_unlock_wake. Move return value from %ecx to %edx
3609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3610 Include lowlevellock.h.
3611 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3613 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3614 MUTEX(%ebp) address in %edx rather than %ecx to
3615 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3616 and __lll_unlock_wake. Move return value from %ecx to %edx
3617 register. Use __NR_gettimeofday.
3618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3619 Include lowlevellock.h.
3620 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3622 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3623 MUTEX(%ebp) address in %edx rather than %ecx to
3624 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3625 and __lll_unlock_wake. Move return value from %ecx to %edx
3626 register. Use __NR_gettimeofday.
3627 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3628 Include lowlevellock.h.
3629 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3630 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3631 MUTEX(%edi) address in %edx rather than %ecx to
3632 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3633 and __lll_unlock_wake.
3634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3635 Include lowlevellock.h.
3636 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3637 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3638 MUTEX(%ebx) address in %edx rather than %ecx to
3639 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3640 and __lll_unlock_wake. Move return value from %ecx to %edx
3642 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3644 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3646 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3647 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3648 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3650 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3651 (sem_timedwait): Use __NR_gettimeofday.
3652 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3654 (LOCK): Don't define.
3655 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3657 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3658 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3660 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3661 2007-05-2{3,9} changes.
3662 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3663 kernel-features.h and lowlevellock.h.
3664 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3665 (LOAD_FUTEX_WAIT): Rewritten.
3666 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3667 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3668 (__lll_mutex_lock_wait): Rename to ...
3669 (__lll_lock_wait): ... this. %esi is now private argument.
3670 Don't compile in for libc.so.
3671 (__lll_mutex_timedlock_wait): Rename to ...
3672 (__lll_timedlock_wait): ... this. %esi contains private argument.
3673 Don't compile in for libc.so.
3674 (__lll_mutex_unlock_wake): Rename to ...
3675 (__lll_unlock_wake): ... this. %esi contains private argument.
3676 Don't compile in for libc.so.
3677 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3678 kernel-features.h and lowlevellock.h.
3679 (LOAD_FUTEX_WAIT): Define.
3680 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3681 (__lll_robust_mutex_lock_wait): Rename to ...
3682 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3683 Use LOAD_FUTEX_WAIT macro.
3684 (__lll_robust_mutex_timedlock_wait): Rename to ...
3685 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3686 private, use LOAD_FUTEX_WAIT macro.
3687 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3689 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3690 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3691 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3692 __lll_lock_wait and __lll_unlock_wake.
3693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3694 Include lowlevellock.h and pthread-errnos.h.
3695 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3696 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3697 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3698 pass LLL_SHARED in %esi to both __lll_lock_wait and
3700 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3701 Include lowlevellock.h and pthread-errnos.h.
3702 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3703 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3704 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3705 pass LLL_SHARED in %esi to both __lll_lock_wait and
3707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3708 Include lowlevellock.h.
3709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3710 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3711 pass LLL_SHARED in %esi to both __lll_lock_wait and
3713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3714 Include lowlevellock.h.
3715 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3716 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3717 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3718 and __lll_unlock_wake.
3719 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3720 Include lowlevellock.h.
3721 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3723 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3724 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3725 and __lll_unlock_wake.
3726 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3727 Include lowlevellock.h.
3728 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3730 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3731 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3732 and __lll_unlock_wake.
3733 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3734 Include lowlevellock.h.
3735 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3737 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3738 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3739 and __lll_unlock_wake.
3740 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3741 Include lowlevellock.h.
3742 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3744 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3745 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3746 and __lll_unlock_wake.
3747 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3748 Include lowlevellock.h.
3749 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3751 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3752 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3753 and __lll_unlock_wake.
3754 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3756 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3758 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3759 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3760 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3762 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3763 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3765 (LOCK): Don't define.
3766 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3768 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3769 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3770 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3771 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3772 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3773 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3774 (__lll_lock_wait_private): New function.
3775 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3776 it to lll_futex_*wait. Don't compile in for libc.so.
3777 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3779 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3780 (struct sparc_pthread_barrier): Remove.
3781 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3782 struct sparc_pthread_barrier. Pass
3783 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3784 and lll_futex_wait macros.
3785 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3787 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3788 Include sparc pthread_barrier_wait.c instead of generic one.
3790 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3792 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3794 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3795 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3798 (pthread_rwlock_timedwrlock): Likewise.
3799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3800 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3802 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3804 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3806 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3808 * tst-locale2.c (useless): Add return statement.
3810 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3812 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3813 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3814 * pthread_create.c (start_thread): Likewise.
3815 * init.c (sighandler_setxid): Likewise.
3816 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3817 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3818 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3819 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3820 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3821 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3822 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3823 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3824 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3826 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3828 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3830 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3831 __rtld_notify): Likewise.
3832 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3833 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3834 __pthread_once): Likewise.
3835 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3836 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3837 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3838 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3839 (lll_futex_wait): Add private argument, define as wrapper around
3840 lll_futex_timed_wait.
3841 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3842 use __lll_private_flag macro.
3843 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3844 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3845 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3846 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3847 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3848 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3849 (lll_futex_wait): Add private argument, define as wrapper around
3850 lll_futex_timed_wait.
3851 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3852 use __lll_private_flag macro.
3853 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3854 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3855 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3857 (lll_futex_timed_wait, lll_futex_wake): Use it.
3858 (lll_private_futex_wait, lll_private_futex_timed_wait,
3859 lll_private_futex_wake): Removed.
3860 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3861 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3862 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3863 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3864 (lll_futex_wait): Add private argument, define as wrapper around
3865 lll_futex_timed_wait.
3866 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3867 use __lll_private_flag macro.
3868 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3869 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3871 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3872 (lll_private_futex_wait, lll_private_futex_timed_wait,
3873 lll_private_futex_wake): Removed.
3874 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3875 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3876 (lll_private_futex_wait, lll_private_futex_timed_wait,
3877 lll_private_futex_wake): Removed.
3878 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3879 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3880 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3881 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3882 (lll_futex_wait): Add private argument, define as wrapper around
3883 lll_futex_timed_wait.
3884 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3885 use __lll_private_flag macro.
3886 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3887 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3889 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3891 (lll_futex_timed_wait, lll_futex_wake): Use it.
3892 (lll_private_futex_wait, lll_private_futex_timed_wait,
3893 lll_private_futex_wake): Removed.
3895 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3897 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3898 of the structure for sparc32.
3900 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3902 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3904 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3906 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3907 code used when private futexes are assumed.
3908 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3911 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3913 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3914 (__lll_private_flag): Define.
3915 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3916 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3918 (lll_private_futex_wait, lll_private_futex_timedwait,
3919 lll_private_futex_wake): Define as wrapper around non-_private
3921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3922 (__lll_private_flag): Define.
3923 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3924 (lll_private_futex_wait, lll_private_futex_timedwait,
3925 lll_private_futex_wake): Define as wrapper around non-_private
3928 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3930 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3931 parameter to lll_futex_wait call.
3932 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3934 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3935 Replace lll_futex_wait with lll_private_futex_wait.
3936 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3937 Add LLL_SHARED parameter to lll_futex_wake().
3939 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3940 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3941 lll_private_futex_wake.
3942 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3943 bit from private parm before syscall.
3944 (lll_futex_timed_wait): Likewise.
3945 (lll_futex_wake): Likewise.
3946 (lll_futex_wake_unlock): Likewise.
3947 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3948 (lll_robust_mutex_unlock): Likewise.
3949 (lll_mutex_unlock_force): Likewise.
3950 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3952 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3954 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3955 compilation when unconditionally using private futexes.
3956 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3957 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3959 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3960 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3962 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3964 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3967 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3969 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3972 2007-05-16 Roland McGrath <roland@redhat.com>
3974 * init.c (__nptl_initial_report_events): New variable.
3975 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3978 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3980 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3981 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3983 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3985 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3988 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3990 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3991 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3992 * pthread_mutex_timedlock.c: Likewise.
3993 * pthread_mutex_trylock.c: Likewise.
3994 * pthread_mutex_unlock.c: Likewise.
3996 2007-06-17 Andreas Schwab <schwab@suse.de>
3998 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4001 2007-06-17 Ulrich Drepper <drepper@redhat.com>
4003 * allocatestack.c (allocate_stack): Make code compile if
4004 __ASSUME_PRIVATE_FUTEX is set.
4006 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4008 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4009 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4010 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4011 (__pthread_rwlock_wrlock): Likewise.
4012 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4013 (pthread_rwlock_timedrdlock): Likewise.
4014 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4015 (pthread_rwlock_timedwrlock): Likewise.
4016 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4017 (__pthread_rwlock_unlock): Likewise.
4019 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4021 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4022 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4023 Split __flags into __flags, __shared, __pad1 and __pad2.
4024 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4025 futexes if they are available.
4026 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4027 in libc-lowlevellock.S allow using private futexes.
4028 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4029 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
4030 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
4031 to call lll_futex_timed_wait. Add lll_private_futex_wait,
4032 lll_private_futex_timed_wait and lll_private_futex_wake.
4033 (lll_robust_mutex_unlock): Fix typo.
4034 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4035 field in futex command setup.
4036 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4037 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4038 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4039 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4040 if they are available. Remove clear_once_control.
4041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4042 futexes if they are available.
4043 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4044 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4045 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4046 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4047 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4048 Wake only when there are waiters.
4049 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4050 support. Indicate that there are waiters. Remove unnecessary
4051 extra cancellation test.
4052 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
4053 left-over duplication of __sem_wait_cleanup.
4055 2007-06-07 Ulrich Drepper <drepper@redhat.com>
4057 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4058 parameter to lll_futex_wait, lll_futex_timed_wait, and
4059 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
4060 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4061 lll_private_futex_wake.
4062 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4063 * allocatestack.c: Adjust use of lll_futex_* macros.
4065 * lowlevellock.h: Likewise.
4066 * pthread_barrier_wait.c: Likewise.
4067 * pthread_cond_broadcast.c: Likewise.
4068 * pthread_cond_destroy.c: Likewise.
4069 * pthread_cond_signal.c: Likewise.
4070 * pthread_cond_timedwait.c: Likewise.
4071 * pthread_cond_wait.c: Likewise.
4072 * pthread_create.c: Likewise.
4073 * pthread_mutex_lock.c: Likewise.
4074 * pthread_mutex_setprioceiling.c: Likewise.
4075 * pthread_mutex_timedlock.c: Likewise.
4076 * pthread_mutex_unlock.c: Likewise.
4077 * pthread_rwlock_timedrdlock.c: Likewise.
4078 * pthread_rwlock_timedwrlock.c: Likewise.
4079 * pthread_rwlock_unlock.c: Likewise.
4080 * sysdeps/alpha/tls.h: Likewise.
4081 * sysdeps/i386/tls.h: Likewise.
4082 * sysdeps/ia64/tls.h: Likewise.
4083 * sysdeps/powerpc/tls.h: Likewise.
4084 * sysdeps/pthread/aio_misc.h: Likewise.
4085 * sysdeps/pthread/gai_misc.h: Likewise.
4086 * sysdeps/s390/tls.h: Likewise.
4087 * sysdeps/sh/tls.h: Likewise.
4088 * sysdeps/sparc/tls.h: Likewise.
4089 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4090 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4091 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4092 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4093 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4094 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4095 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4096 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4097 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4098 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4100 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4101 * sysdeps/x86_64/tls.h: Likewise.
4103 2007-05-29 Ulrich Drepper <drepper@redhat.com>
4105 * pthread_getattr_np.c: No need to install a cancellation handler,
4106 this is no cancellation point.
4107 * pthread_getschedparam.c: Likewise.
4108 * pthread_setschedparam.c: Likewise.
4109 * pthread_setschedprio.c: Likewise.
4110 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4112 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4113 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4114 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4115 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4116 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4117 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4118 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4119 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4120 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4121 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4122 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4125 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4126 whether there are more than one thread makes no sense here since
4127 we only call the slow path if the locks are taken.
4128 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4130 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4131 COND_NWAITERS_SHIFT.
4132 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4134 * pthread_cond_init.c: Likewise.
4135 * pthread_cond_timedwait.c: Likewise.
4136 * pthread_cond_wait.c: Likewise.
4137 * pthread_condattr_getclock.c: Likewise.
4138 * pthread_condattr_setclock.c: Likewise.
4139 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4145 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4147 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4150 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4152 (THREAD_GSCOPE_GET_FLAG): Remove.
4153 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4154 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4156 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4157 (THREAD_GSCOPE_GET_FLAG): Remove.
4158 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4159 instead of THREAD_GSCOPE_GET_FLAG.
4160 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4162 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4163 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4164 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4165 THREAD_GSCOPE_WAIT): Define.
4166 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4167 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4168 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4169 THREAD_GSCOPE_WAIT): Define.
4170 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4171 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4172 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4173 THREAD_GSCOPE_WAIT): Define.
4174 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4175 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4176 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4177 THREAD_GSCOPE_WAIT): Define.
4179 2007-05-24 Richard Henderson <rth@redhat.com>
4181 * descr.h (struct pthread): Add header.gscope_flag.
4182 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4183 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4184 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4185 THREAD_GSCOPE_WAIT): Define.
4187 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4189 * init.c: Make it compile with older kernel headers.
4191 * tst-initializers1.c: Show through exit code which test failed.
4193 * pthread_rwlock_init.c: Also initialize __shared field.
4194 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4195 element in rwlock structure into four byte elements. One of them is
4196 the new __shared element.
4197 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4199 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4200 __shared, adjust names of other padding elements.
4201 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4202 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4203 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4204 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4207 futex to use private operations if possible.
4208 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4210 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4212 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4213 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4219 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4222 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4224 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4225 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4226 * pthread_rwlock_timedrdlock.c: Likewise.
4227 * pthread_rwlock_tryrdlock.c: Likewise.
4229 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4232 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4233 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4234 duplication of __sem_wait_cleanup.
4236 * allocatestack.c: Revert last change.
4238 * sysdeps/i386/tls.h: Likewise.
4239 * sysdeps/x86_64/tls.h: Likewise.
4240 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4242 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4244 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4246 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4247 * pthread_barrier_init.c: Set private flag if pshared and private
4248 futexes are supported.
4249 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4250 private field in futex command setup.
4251 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4253 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4255 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4257 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4258 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4259 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4260 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4261 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4263 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4264 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4265 fields in the structure.
4266 (__old_sem_init): New function.
4267 * sem_open.c: Initialize all fields of the structure.
4268 * sem_getvalue.c: Adjust for renamed element.
4269 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4270 (gen-as-const-headers): Add structsem.sym.
4271 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4272 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4273 struct new_sem. Add struct old_sem.
4274 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4275 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4276 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4277 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4278 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4279 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4280 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4281 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4282 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4283 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4284 * tst-sem10.c: New file.
4285 * tst-sem11.c: New file.
4286 * tst-sem12.c: New file.
4287 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4290 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4291 Jakub Jelinek <jakub@redhat.com>
4293 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4294 Move __pthread_enable_asynccancel right before futex syscall.
4295 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4298 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4300 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4301 THREAD_COPY_PRIVATE_FUTEX): Define.
4302 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4303 THREAD_COPY_PRIVATE_FUTEX): Define.
4304 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4305 * init.c (__pthread_initialize_minimal_internal): Use
4306 THREAD_SET_PRIVATE_FUTEX.
4308 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4309 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4310 THREAD_GSCOPE_FLAG_WAIT): Define.
4311 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4312 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4313 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4315 (THREAD_GSCOPE_GET_FLAG): Define.
4316 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4317 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4318 instead of ->header.gscope_flag directly.
4320 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4322 * init.c (__pthread_initialize_minimal_internal): Check whether
4323 private futexes are available.
4324 * allocatestack.c (allocate_stack): Copy private_futex field from
4325 current thread into the new stack.
4326 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4327 futexes if they are available.
4328 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4329 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4330 in libc-lowlevellock.S allow using private futexes.
4331 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4332 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4334 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4335 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4336 if they are available.
4337 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4338 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4339 * sysdeps/i386/tcb-offsets.sym: Likewise.
4340 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4341 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4343 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4345 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4346 Remove ptr_wait_lookup_done again.
4347 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4348 (__pthread_initialize_minimal_internal): Initialize
4349 _dl_wait_lookup_done pointer in _rtld_global directly.
4350 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4351 Remove code to code _dl_wait_lookup_done.
4352 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4355 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4357 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4358 pthread_mutex_init failed with ENOTSUP.
4360 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4362 * allocatestack.c (__wait_lookup_done): New function.
4363 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4364 Add ptr_wait_lookup_done.
4365 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4366 * pthreadP.h: Declare __wait_lookup_done.
4367 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4368 Define macros to implement reference handling of global scope.
4369 * sysdeps/x86_64/tls.h: Likewise.
4370 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4371 Initialize GL(dl_wait_lookup_done).
4373 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4376 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4378 * pthread_mutex_timedlock.c: Likewise.
4379 * pthread_mutex_trylock.c: Likewise.
4380 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4382 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4383 * tst-robust9.c: New file.
4384 * tst-robustpi9.c: New file.
4386 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4387 unnecessary extra cancellation test.
4389 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4391 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4392 extra cancellation test.
4393 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4395 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4397 * descr.h (struct pthread): Rearrange members to fill hole in
4400 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4401 (__pthread_setaffinity_new): If syscall was successful and
4402 RESET_VGETCPU_CACHE is defined, use it before returning.
4403 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4405 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4408 * tst-align2.c: Include stackinfo.h.
4409 * tst-getpid1.c: Likewise.
4411 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4414 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4415 * tst-getpid1.c (do_test): Likewise.
4418 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4419 (allocate_stack): Likewise.
4421 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4423 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4424 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4425 (__lll_robust_timedlock_wait): Likewise.
4426 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4428 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4431 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4432 * tst-cancel4.c (tf_fdatasync): New test.
4434 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4437 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4438 check mutexes like normal mutexes.
4441 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4442 Initialize the whole sigevent structure to appease valgrind.
4444 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4446 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4447 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4449 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4451 * tst-locale1.c: Avoid warnings.
4452 * tst-locale2.c: Likewise.
4454 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4456 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4457 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4459 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4461 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4462 __extern_always_inline where appropriate.
4463 * sysdeps/pthread/pthread.h: Likewise.
4465 2007-03-13 Richard Henderson <rth@redhat.com>
4467 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4468 separate cfi regions for the two subsections.
4470 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4472 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4473 new thread, don't just decrement it.
4474 Patch by Suzuki K P <suzuki@in.ibm.com>.
4476 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4478 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4479 PTHFCT_CALL definition.
4481 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4483 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4484 available, don't use it.
4486 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4488 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4489 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4490 call into the kernel to delay.
4492 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4494 * tst-initializers1.c: We want to test the initializers as seen
4495 outside of libc, so undefined _LIBC.
4497 * pthread_join.c (cleanup): Avoid warning.
4499 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4502 (__lll_timedwait_tid): Add unwind info.
4504 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4505 function table, mangle the pointers.
4506 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4507 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4508 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4509 demangle pointers before use.
4510 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4512 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4513 * sysdeps/pthread/setxid.h: Likewise.
4515 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4517 * tst-rwlock7.c: Show some more information in case of correct
4520 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4523 (lll_futex_timed_wait): Undo part of last change, don't negate
4526 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4528 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4529 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4531 2006-12-28 David S. Miller <davem@davemloft.net>
4533 * shlib-versions: Fix sparc64 linux target specification.
4535 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4537 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4538 Adjust include path for pthread_barrier_wait.c move.
4540 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4542 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4543 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4545 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4547 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4548 6 argument cancellable syscalls.
4549 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4550 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4551 6 argument cancellable syscalls.
4552 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4554 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4556 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4557 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4559 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4561 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4562 __sync_lock_release instead of __sync_lock_release_si.
4564 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4566 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4568 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4569 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4570 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4571 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4572 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4573 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4574 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4575 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4576 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4577 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4578 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4580 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4582 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4583 * pthread_barrier_wait.c: ...here.
4584 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4585 * pthread_cond_broadcast.c: ...here.
4586 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4587 * pthread_cond_signal.c: ...here.
4588 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4589 * pthread_cond_timedwait.c: ...here.
4590 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4591 * pthread_cond_wait.c: ...here.
4592 * sysdeps/pthread/pthread_once.c: Move to...
4593 * pthread_once.c: ...here.
4594 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4595 * pthread_rwlock_rdlock.c: ...here.
4596 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4597 * pthread_rwlock_timedrdlock.c: ...here.
4598 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4599 * pthread_rwlock_timedwrlock.c: ...here.
4600 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4601 * pthread_rwlock_unlock.c: ...here.
4602 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4603 * pthread_rwlock_wrlock.c: ...here.
4604 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4605 * pthread_spin_destroy.c: ...here.
4606 * sysdeps/pthread/pthread_spin_init.c: Move to...
4607 * pthread_spin_init.c: ...here.
4608 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4609 * pthread_spin_unlock.c: ...here.
4610 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4611 * pthread_getcpuclockid.c: ...here.
4613 * init.c: USE_TLS support is now always enabled.
4614 * tst-tls5.h: Likewise.
4615 * sysdeps/alpha/tls.h: Likewise.
4616 * sysdeps/i386/tls.h: Likewise.
4617 * sysdeps/ia64/tls.h: Likewise.
4618 * sysdeps/powerpc/tls.h: Likewise.
4619 * sysdeps/s390/tls.h: Likewise.
4620 * sysdeps/sh/tls.h: Likewise.
4621 * sysdeps/sparc/tls.h: Likewise.
4622 * sysdeps/x86_64/tls.h: Likewise.
4624 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4626 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4627 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4630 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4631 Define to THREAD_SELF->header.multiple_threads.
4632 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4634 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4636 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4637 (SINGLE_THREAD_P): Likewise.
4638 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4639 (SINGLE_THREAD_P): Likewise.
4640 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4641 (SINGLE_THREAD_P): Likewise.
4642 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4643 (SINGLE_THREAD_P): Likewise.
4644 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4646 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4647 (SINGLE_THREAD_P): Likewise.
4648 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4649 (SINGLE_THREAD_P): Likewise.
4650 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4653 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4655 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4656 by default rather than 2_3_3.
4658 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4660 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4661 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4662 atomic_* instead of catomic_* macros.
4664 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4667 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4668 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4669 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4670 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4671 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4672 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4673 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4674 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4675 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4676 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4677 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4678 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4679 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4681 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4683 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4684 cancelable syscalls with six parameters.
4686 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4687 operations instead of atomic_*.
4689 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4691 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4693 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4695 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4696 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4697 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4699 * pthread_attr_setstack.c: Allow overwriting the version number of the
4701 * pthread_attr_setstacksize.c: Likewise.
4702 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4704 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4705 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4707 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4710 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4711 Patch by Petr Baudis.
4713 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4715 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4717 * tst-cancel2.c (tf): Loop as long as something was written.
4719 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4721 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4722 mutexes wake all mutexes.
4723 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4724 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4725 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4727 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4729 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4730 to guarantee the thread is always canceled.
4732 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4734 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4736 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4737 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4738 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4740 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4742 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4745 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4746 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4750 * Makefile (tests): Add tst-cond22.
4751 * tst-cond22.c: New file.
4753 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4756 * descr.h (struct pthread): Add parent_cancelhandling.
4757 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4758 cancelhandling value to child.
4759 * pthread_create.c (start_thread): If parent thread was canceled
4760 reset the SIGCANCEL mask.
4761 * Makefile (tests): Add tst-cancel25.
4762 * tst-cancel25.c: New file.
4764 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4765 Ulrich Drepper <drepper@redhat.com>
4767 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4768 counterp if it is already zero.
4769 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4771 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4772 Roland McGrath <roland@redhat.com>
4774 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4775 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4776 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4777 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4778 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4779 lll_robust_mutex_timedlock, lll_mutex_unlock,
4780 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4781 Add _L_*_ symbols around the subsection.
4782 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4783 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4785 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4786 Roland McGrath <roland@redhat.com>
4788 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4789 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4790 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4791 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4792 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4793 lll_robust_mutex_timedlock, lll_mutex_unlock,
4794 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4795 Add _L_*_ symbols around the subsection.
4796 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4797 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4799 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4801 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4802 change because it can disturb too much existing code. If real hard
4803 reader preference is needed we'll introduce another type.
4804 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4805 (pthread_rwlock_timedwrlock): Likewise.
4806 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4809 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4811 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4813 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4814 (pthread_rwlock_timedwrlock): Likewise.
4815 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4818 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4820 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4821 Only define ifdef SHARED.
4823 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4825 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4826 (free_stacks): ...here.
4827 (__free_stack_cache): New function.
4828 * pthreadP.h: Declare __free_stack_cache.
4829 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4831 * init.c (pthread_functions): Initialize ptr_freeres.
4832 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4833 New freeres function.
4835 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4838 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4840 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4842 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4843 _XOPEN_REALTIME_THREADS.
4845 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4847 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4848 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4849 HAVE_CLOCK_GETTIME_VSYSCALL.
4850 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4852 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4854 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4855 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4856 * descr.h (struct priority_protection_data): New type.
4857 (struct pthread): Add tpp field.
4858 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4859 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4860 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4861 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4863 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4864 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4865 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4866 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4868 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4870 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4871 * pthread_mutexattr_getprioceiling.c
4872 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4873 in the SCHED_FIFO priority range.
4874 * pthread_mutexattr_setprioceiling.c
4875 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4876 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4877 if mutex is not TPP. Ceiling is now in __data.__lock.
4878 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4879 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4880 is now in __data.__lock. Add locking.
4881 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4882 * Makefile (libpthread-routines): Add tpp.
4883 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4884 * tst-tpp.h: New file.
4885 * tst-mutexpp1.c: New file.
4886 * tst-mutexpp6.c: New file.
4887 * tst-mutexpp10.c: New file.
4888 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4889 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4891 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4894 * pthread_join.c (pthread_join): Account for self being canceled
4895 when checking for deadlocks.
4896 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4897 (tf1): Don't print anything after pthread_join returns, this would be
4898 another cancellation point.
4900 * tst-join6.c: New file.
4901 * Makefile (tests): Add tst-join6.
4903 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4906 * pthread_setspecific.c (__pthread_setspecific): Check
4907 out-of-range index before checking for unused key.
4909 * sysdeps/pthread/gai_misc.h: New file.
4911 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4913 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4914 file. Don't use sysctl.
4915 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4916 overwrite the file if this is likely not true.
4918 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4920 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4921 * Makefile (tests): Add tst-getpid3.
4922 * tst-getpid3.c: New file.
4924 2006-07-30 Roland McGrath <roland@redhat.com>
4926 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4928 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4929 (pause_not_cancel): New macro.
4930 (nanosleep_not_cancel): New macro.
4931 (sigsuspend_not_cancel): New macro.
4932 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4933 nanosleep_not_cancel macro from <not-cancel.h>.
4934 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4935 macro from <not-cancel.h>.
4937 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4938 Jakub Jelinek <jakub@redhat.com>
4940 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4941 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4942 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4943 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4944 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4945 * pthread_mutex_lock.c: Likewise.
4946 * pthread_mutex_timedlock.c: Likewise.
4947 * pthread_mutex_trylock.c: Likewise.
4948 * pthread_mutex_unlock.c: Likewise.
4949 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4952 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4953 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4954 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4955 pthread-pi-defines.sym.
4956 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4957 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4958 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4959 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4960 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4961 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4962 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4963 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4964 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4965 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4966 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4967 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4968 * tst-mutex2.c: Likewise.
4969 * tst-mutex3.c: Likewise.
4970 * tst-mutex4.c: Likewise.
4971 * tst-mutex5.c: Likewise.
4972 * tst-mutex6.c: Likewise.
4973 * tst-mutex7.c: Likewise.
4974 * tst-mutex7a.c: Likewise.
4975 * tst-mutex8.c: Likewise.
4976 * tst-mutex9.c: Likewise.
4977 * tst-robust1.c: Likewise.
4978 * tst-robust7.c: Likewise.
4979 * tst-robust8.c: Likewise.
4980 * tst-mutexpi1.c: New file.
4981 * tst-mutexpi2.c: New file.
4982 * tst-mutexpi3.c: New file.
4983 * tst-mutexpi4.c: New file.
4984 * tst-mutexpi5.c: New file.
4985 * tst-mutexpi6.c: New file.
4986 * tst-mutexpi7.c: New file.
4987 * tst-mutexpi7a.c: New file.
4988 * tst-mutexpi8.c: New file.
4989 * tst-mutexpi9.c: New file.
4990 * tst-robust1.c: New file.
4991 * tst-robust2.c: New file.
4992 * tst-robust3.c: New file.
4993 * tst-robust4.c: New file.
4994 * tst-robust5.c: New file.
4995 * tst-robust6.c: New file.
4996 * tst-robust7.c: New file.
4997 * tst-robust8.c: New file.
4998 * Makefile (tests): Add the new tests.
5000 * pthread_create.c (start_thread): Add some casts to avoid warnings.
5001 * pthread_mutex_destroy.c: Remove unneeded label.
5003 2006-07-01 Ulrich Drepper <drepper@redhat.com>
5005 * pthread_mutex_init.c (__pthread_mutex_init): Move some
5006 computations to compile time.
5008 2006-06-04 Ulrich Drepper <drepper@redhat.com>
5010 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5012 2006-05-15 Ulrich Drepper <drepper@redhat.com>
5014 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5016 2006-05-11 Ulrich Drepper <drepper@redhat.com>
5018 * pthread_key_create.c (__pthread_key_create): Do away with
5019 __pthread_keys_lock.
5021 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5022 (__kernel_cpumask_size): Mark as hidden.
5023 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5025 * sem_open.c (__sem_mappings_lock): Mark as hidden.
5026 * semaphoreP.h (__sem_mappings_lock): Likewise.
5028 2006-05-10 Ulrich Drepper <drepper@redhat.com>
5030 * pthread_atfork.c: Mark __dso_handle as hidden.
5032 2006-05-09 Ulrich Drepper <drepper@redhat.com>
5035 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5036 the reload problem. Change the one path in pthread_cancel_init
5037 which causes the problem. Force gcc to reload. Simplify callers.
5038 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5039 (_Unwind_GetBSP): Undo last patch.
5041 2006-05-07 Ulrich Drepper <drepper@redhat.com>
5043 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5044 function pointer is reloaded after pthread_cancel_init calls.
5047 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5048 pointers are reloaded after pthread_cancel_init calls.
5050 2006-05-01 Ulrich Drepper <drepper@redhat.com>
5052 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5055 2006-04-27 Ulrich Drepper <drepper@redhat.com>
5057 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5058 Allocate new object which is passed to timer_sigev_thread so that
5059 the timer can be deleted before the new thread is scheduled.
5061 2006-04-26 Roland McGrath <roland@redhat.com>
5063 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5065 2006-04-08 Ulrich Drepper <drepper@redhat.com>
5067 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5068 suffix for conditional jumps.
5069 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5070 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5071 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5072 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5073 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5074 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5076 * init.c (sigcancel_handler): Compare with correct PID even if the
5077 thread is in the middle of a fork call.
5078 (sighandler_setxid): Likewise.
5079 Reported by Suzuki K P <suzuki@in.ibm.com> .
5081 2006-04-07 Jakub Jelinek <jakub@redhat.com>
5083 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5085 2006-04-06 Ulrich Drepper <drepper@redhat.com>
5087 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5088 fails [Coverity CID 105].
5090 2006-04-05 Ulrich Drepper <drepper@redhat.com>
5092 * sysdeps/pthread/pthread.h: Add nonnull attributes.
5094 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
5097 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5098 Define __lll_rel_instr using lwsync.
5100 2006-03-27 Ulrich Drepper <drepper@redhat.com>
5102 * allocatestack.c (allocate_stack): Always initialize robust_head.
5103 * descr.h: Define struct robust_list_head.
5104 (struct pthread): Use robust_list_head in robust mutex list definition.
5105 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5106 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5107 (__pthread_initialize_minimal_internal): Register robust_list with
5109 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5110 Declare __set_robust_list_avail.
5111 * pthread_create.c (start_thread): Register robust_list of new thread.
5112 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5114 * pthread_mutex_destroy.c: For robust mutexes don't look at the
5115 number of users, it's unreliable.
5116 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5117 set_robust_list syscall is available.
5118 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5119 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5120 Set robust_head.list_op_pending before trying to lock a robust mutex.
5121 * pthread_mutex_timedlock.c: Likewise.
5122 * pthread_mutex_trylock.c: Likewise.
5123 * pthread_mutex_unlock.c: Likewise for unlocking.
5124 * Makefile (tests): Add tst-robust8.
5125 * tst-robust8.c: New file.
5127 2006-03-08 Andreas Schwab <schwab@suse.de>
5129 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5130 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5132 2006-03-05 Roland McGrath <roland@redhat.com>
5134 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5135 and $config_os doesn't match *linux*.
5137 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5139 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5140 Use __syscall_error.
5141 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5142 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5143 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5144 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5145 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5146 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5148 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5150 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5152 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5154 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5155 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5157 (__lll_robust_timedlock_wait): Likewise.
5158 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5159 (__lll_robust_lock_wait): Likewise.
5160 (__lll_robust_timedlock_wait): Likewise.
5161 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5162 (__lll_robust_lock_wait): Likewise.
5163 (__lll_robust_timedlock_wait): Likewise.
5165 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5167 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5168 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5169 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5170 lll_robust_mutex_unlock): Define.
5171 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5173 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5175 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5176 instead of <clone.S>.
5178 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5180 * Makefile (libpthread-routines): Add
5181 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5182 and pthread_mutex_[sg]etprioceiling.
5183 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5184 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5185 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5186 pthread_mutex_setprioceiling.
5187 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5188 PTHREAD_PRIO_PROTECT): New enum values.
5189 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5190 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5191 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5193 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5194 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5195 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5197 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5198 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5199 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5200 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5201 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5202 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5203 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5205 * pthread_mutex_getprioceiling.c: New file.
5206 * pthread_mutex_setprioceiling.c: New file.
5207 * pthread_mutexattr_getprioceiling.c: New file.
5208 * pthread_mutexattr_setprioceiling.c: New file.
5209 * pthread_mutexattr_getprotocol.c: New file.
5210 * pthread_mutexattr_setprotocol.c: New file.
5212 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5214 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5216 2006-02-27 Roland McGrath <roland@redhat.com>
5218 * sysdeps/pthread/Subdirs: List nptl here too.
5219 * configure (libc_add_on_canonical): New variable.
5221 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5223 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5224 self to get main source tree's file.
5225 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5226 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5227 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5228 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5229 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5230 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5231 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5232 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5233 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5234 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5235 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5236 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5237 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5239 * Makefile: Use $(sysdirs) in vpath directive.
5241 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5242 (CPPFLAGS-timer_routines.c): Likewise.
5244 * Makeconfig (includes): Variable removed.
5246 2006-02-26 Roland McGrath <roland@redhat.com>
5248 * sysdeps/generic/pt-raise.c: Moved to ...
5249 * pt-raise.c: ... here.
5250 * sysdeps/generic/lowlevellock.h: Moved to ...
5251 * lowlevellock.h: ... here.
5253 2006-02-23 Roland McGrath <roland@redhat.com>
5255 * descr.h (struct pthread): Add final member `end_padding'.
5256 (PTHREAD_STRUCT_END_PADDING): Use it.
5258 2006-02-20 Roland McGrath <roland@redhat.com>
5260 * sysdeps/mips: Directory removed, saved in ports repository.
5261 * sysdeps/unix/sysv/linux/mips: Likewise.
5263 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5265 * tst-robust1.c: Add second mutex to check that the mutex list is
5268 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5270 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5271 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5272 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5273 lll_robust_mutex_unlock): New macros.
5274 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5275 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5276 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5277 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5278 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5280 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5282 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5284 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5286 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5288 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5289 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5290 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5291 (lll_robust_mutex_unlock): Likewise.
5293 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5295 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5296 Set robust_list.__next rather than robust_list.
5297 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5298 (__pthread_list_t): New typedef.
5299 (pthread_mutex_t): Replace __next and __prev fields with __list.
5300 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5301 (__pthread_list_t): New typedef.
5302 (pthread_mutex_t): Replace __next and __prev fields with __list.
5303 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5304 (__pthread_list_t, __pthread_slist_t): New typedefs.
5305 (pthread_mutex_t): Replace __next and __prev fields with __list.
5306 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5307 (__pthread_list_t, __pthread_slist_t): New typedefs.
5308 (pthread_mutex_t): Replace __next and __prev fields with __list.
5309 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5310 (__pthread_list_t, __pthread_slist_t): New typedefs.
5311 (pthread_mutex_t): Replace __next and __prev fields with __list.
5312 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5313 (__pthread_slist_t): New typedef.
5314 (pthread_mutex_t): Replace __next field with __list.
5316 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5318 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5319 PTHREAD_MUTEX_OWNERDEAD.
5320 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5321 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5322 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5323 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5324 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5325 to PTHREAD_MUTEX_INCONSISTENT.
5326 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5327 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5328 * pthread_mutex_trylock.c: Likewise.
5329 * pthread_mutex_timedlock.c: Likewise.
5330 * pthread_mutex_unlock.c: Likewise.
5331 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5332 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5333 lowlevelrobustlock.sym.
5334 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5335 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5337 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5338 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5339 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5340 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5341 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5343 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5345 * allocatestack.c (allocate_stack): Initialize robust_list.
5346 * init.c (__pthread_initialize_minimal_internal): Likewise.
5347 * descr.h (struct xid_command): Pretty printing.
5348 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5349 robust_list. Adjust macros.
5350 * pthread_create.c (start_thread): Adjust robust_list handling.
5351 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5352 but the owner for all robust mutex types.
5353 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5354 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5355 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5356 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5358 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5359 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5361 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5364 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5366 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5368 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5370 (lll_futex_timed_wait): Define.
5372 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5374 * tst-cancel4.c: Test ppoll.
5376 2006-01-18 Andreas Jaeger <aj@suse.de>
5379 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5380 (pthread_mutex_t): Follow changes for other archs. Based on patch
5381 by Jim Gifford <patches@jg555.com>.
5383 2006-01-13 Richard Henderson <rth@redhat.com>
5385 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5387 2006-01-10 Roland McGrath <roland@redhat.com>
5389 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5390 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5391 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5392 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5393 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5394 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5395 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5396 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5397 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5398 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5400 2006-01-09 Roland McGrath <roland@redhat.com>
5402 * tst-initializers1-c89.c: New file.
5403 * tst-initializers1-c99.c: New file.
5404 * tst-initializers1-gnu89.c: New file.
5405 * tst-initializers1-gnu99.c: New file.
5406 * Makefile (tests): Add them.
5407 (CFLAGS-tst-initializers1-c89.c): New variable.
5408 (CFLAGS-tst-initializers1-c99.c): New variable.
5409 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5410 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5412 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5413 Use __extension__ on anonymous union definition.
5414 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5415 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5416 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5417 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5418 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5420 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5422 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5423 Don't give the union a name because it changes the mangled name.
5424 Instead name the struct for __data.
5425 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5427 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5430 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5432 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5433 stack bias to mc_ftp field.
5435 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5437 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5438 being too clever and reloading the futex value where it shouldn't.
5440 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5442 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5445 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5447 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5450 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5452 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5453 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5454 rename in tcbhead_t.
5456 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5457 Don't give the union a name because it changes the mangled name.
5458 Instead name the struct for __data.
5459 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5460 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5461 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5462 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5463 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5464 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5466 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5468 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5470 (lll_futex_timed_wait): Define.
5471 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5472 * sysdeps/pthread/aio_misc.h: New file.
5474 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5476 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5478 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5480 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5481 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5484 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5486 * tst-cancel24.cc: Use C headers instead of C++ headers.
5488 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5490 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5491 sparc-linux configured glibc.
5492 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5493 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5494 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5495 atomic_compare_and_exchange_val_24_acq instead of
5496 atomic_compare_and_exchange_val_acq.
5497 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5498 instead of atomic_exchange_rel.
5499 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5500 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5502 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5504 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5505 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5506 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5507 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5508 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5509 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5511 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5513 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5514 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5515 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5517 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5519 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5521 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5523 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5526 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5528 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5529 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5530 THREAD_COPY_POINTER_GUARD): Define.
5531 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5532 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5534 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5536 * version.c: Update copyright year.
5538 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5540 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5541 .eh_frame section, use cfi_* directives.
5542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5544 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5546 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5549 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5551 * sysdeps/pthread/sigaction.c: Removed.
5552 * sigaction.c: New file.
5553 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5555 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5557 * Makefile (tests): Add tst-signal7.
5558 * tst-signal7.c: New file.
5560 2005-12-27 Roland McGrath <roland@redhat.com>
5562 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5563 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5564 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5565 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5566 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5567 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5568 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5569 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5570 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5571 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5572 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5574 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5576 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5577 and __prev field to pthread_mutex_t.
5578 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5579 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5580 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5581 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5582 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5585 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5587 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5588 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5589 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5590 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5591 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5592 and PTHREAD_MUTEXATTR_FLAG_BITS.
5593 * descr.h (struct pthread): Add robust_list field and define
5594 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5595 * pthread_mutexattr_getrobust.c: New file.
5596 * pthread_mutexattr_setrobust.c: New file.
5597 * pthread_mutex_consistent.c: New file.
5598 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5599 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5600 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5601 Adjust pthread_mutex_t initializers.
5602 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5603 field to pthread_mutex_t.
5604 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5605 and __prev field to pthread_mutex_t.
5606 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5607 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5608 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5609 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5610 * pthread_mutexattr_gettype.c: Likewise.
5611 * pthread_mutexattr_setpshared.c: Likewise.
5612 * pthread_mutexattr_settype.c: Likewise.
5613 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5614 Initialize mutex kind according to robust flag.
5615 * pthread_mutex_lock.c: Implement local robust mutex.
5616 * pthread_mutex_timedlock.c: Likewise.
5617 * pthread_mutex_trylock.c: Likewise.
5618 * pthread_mutex_unlock.c: Likewise.
5619 * pthread_create.c (start_thread): Mark robust mutexes which remained
5621 * tst-robust1.c: New file.
5622 * tst-robust2.c: New file.
5623 * tst-robust3.c: New file.
5624 * tst-robust4.c: New file.
5625 * tst-robust5.c: New file.
5626 * tst-robust6.c: New file.
5627 * tst-robust7.c: New file.
5628 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5629 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5630 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5631 tst-robust5, tst-robust6, and tst-robust7.
5633 * tst-typesizes.c: New file.
5634 * Makefile (tests): Add tst-typesizes.
5636 * tst-once3.c: More debug output.
5638 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5640 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5641 missing after last change.
5643 * version.c: Update copyright year.
5645 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5647 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5648 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5649 * pthread_mutex_trylock.c: Likewise.
5650 * pthread_mutex_timedlock.c: Likewise.
5651 * pthread_mutex_unlock.c: Likewise.
5653 2005-12-22 Roland McGrath <roland@redhat.com>
5655 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5656 so that #include_next's search location is not reset to the -I..
5657 directory where <nptl/...> can be found.
5659 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5662 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5663 Fix unwind info. Remove useless branch prediction prefix.
5664 * tst-cancel24.cc: New file.
5665 * Makefile: Add rules to build and run tst-cancel24.
5667 2005-12-21 Roland McGrath <roland@redhat.com>
5669 * libc-cancellation.c: Use <> rather than "" #includes.
5670 * pt-cleanup.c: Likewise.
5671 * pthread_create.c: Likewise.
5672 * pthread_join.c: Likewise.
5673 * pthread_timedjoin.c: Likewise.
5674 * pthread_tryjoin.c: Likewise.
5675 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5676 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5677 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5678 * unwind.c: Likewise.
5680 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5682 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5683 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5684 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5685 THREAD_COPY_POINTER_GUARD): Define.
5687 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5689 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5691 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5692 THREAD_COPY_POINTER_GUARD): Define.
5693 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5694 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5695 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5696 THREAD_COPY_POINTER_GUARD): Define.
5697 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5698 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5699 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5700 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5701 Use PTR_DEMANGLE for B0 if defined.
5703 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5705 * pthread_create.c (__pthread_create_2_1): Use
5706 THREAD_COPY_POINTER_GUARD if available.
5707 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5708 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5709 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5710 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5711 * sysdeps/x86_64/tls.h: Likewise.
5713 2005-12-15 Roland McGrath <roland@redhat.com>
5715 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5717 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5719 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5721 * errno-loc.c: New file.
5723 2005-12-12 Roland McGrath <roland@redhat.com>
5725 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5726 adjustments before choosing stack size. Update minimum stack size
5727 calculation to match allocate_stack change.
5729 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5731 * allocatestack.c (allocate_stack): Don't demand that there is an
5732 additional full page available on the stack beside guard, TLS, the
5735 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5737 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5738 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5740 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5741 compiling 32-bit code we must define __cleanup_fct_attribute.
5743 005-11-24 Jakub Jelinek <jakub@redhat.com>
5746 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5747 __attribute__ instead of __attribute.
5748 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5749 (__cleanup_fct_attribute): Likewise.
5751 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5753 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5754 a write barrier before writing libgcc_s_getcfa.
5756 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5758 * sysdeps/unix/sysv/linux/configure: Removed.
5760 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5762 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5763 optional init_array/fini_array support.
5765 2005-10-24 Roland McGrath <roland@redhat.com>
5767 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5768 versioned_symbol use.
5770 2005-10-16 Roland McGrath <roland@redhat.com>
5772 * init.c (__pthread_initialize_minimal_internal): Even when using a
5773 compile-time default stack size, apply the minimum that allocate_stack
5774 will require, and round up to page size.
5776 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5778 * Makefile ($(test-modules)): Remove static pattern rule.
5780 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5781 Ulrich Drepper <drepper@redhat.com>
5783 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5784 alignment in callback function.
5785 * Makefile: Add rules to build and run tst-align3.
5786 * tst-align3.c: New file.
5788 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5790 * allocatestack.c (setxid_signal_thread): Add
5791 INTERNAL_SYSCALL_DECL (err).
5793 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5795 * allocatestack.c (setxid_signal_thread): Need to use
5796 atomic_compare_and_exchange_bool_acq.
5798 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5799 Jakub Jelinek <jakub@redhat.com>
5801 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5803 (struct pthread): Move specific_used field to avoid padding.
5804 Add setxid_futex field.
5805 * init.c (sighandler_setxid): Reset setxid flag and release the
5807 * allocatestack.c (setxid_signal_thread): New function. Broken
5808 out of the bodies of the two loops in __nptl_setxid. For undetached
5809 threads check whether they are exiting and if yes, don't send a signal.
5810 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5811 * pthread_create.c (start_thread): For undetached threads, check
5812 whether setxid bit is set. If yes, wait until signal has been
5815 * allocatestack.c (STACK_VARIABLES): Initialize them.
5816 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5818 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5820 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5821 waiters, awake all waiters on the associated mutex.
5823 2005-09-22 Roland McGrath <roland@redhat.com>
5825 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5826 ../sysdeps/x86_64/hp-timing.h).
5828 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5830 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5831 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5832 (lll_futex_wake_unlock): Define.
5833 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5834 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5835 (lll_futex_wake_unlock): Define.
5836 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5837 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5838 (lll_futex_wake_unlock): Define.
5839 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5840 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5841 (lll_futex_wake_unlock): Define.
5842 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5843 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5844 (lll_futex_wake_unlock): Define.
5845 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5846 lll_futex_wake_unlock.
5847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5848 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5849 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5850 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5851 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5852 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5854 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5856 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5857 Fix typo in register name.
5859 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5861 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5862 Use __sigfillset. Document that sigfillset does the right thing wrt
5865 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5868 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5869 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5870 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5871 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5872 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5873 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5875 * Makefile (tests): Add tst-initializers1.
5876 (CFLAGS-tst-initializers1.c): Set.
5877 * tst-initializers1.c: New test.
5879 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5881 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5882 Make sure __flags are located at offset 48 from the start of the
5885 2005-07-02 Roland McGrath <roland@redhat.com>
5887 * Makeconfig: Comment fix.
5889 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5891 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5892 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5893 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5894 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5895 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5896 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5897 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5898 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5899 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5900 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5902 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5904 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5905 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5906 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5908 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5909 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5910 field. Put in sysinfo field unconditionally.
5911 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5912 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5913 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5914 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5916 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5917 * pthread_create.c (__pthread_create_2_1): Use
5918 THREAD_COPY_STACK_GUARD macro.
5919 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5921 * tst-stackguard1.c: New file.
5922 * tst-stackguard1-static.c: New file.
5924 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5926 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5927 Invoke CGOTSETUP and CGOTRESTORE.
5928 (CGOTSETUP, CGOTRESTORE): Define.
5930 2005-05-29 Richard Henderson <rth@redhat.com>
5932 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5933 (tf_write, tf_writev): Use it.
5934 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5937 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5939 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5940 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5941 __librt_*_asynccancel@local.
5943 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5945 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5946 all occurrences of JUMPTARGET. Instead append @local to labels.
5948 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5950 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5951 size/alignment of struct pthread rather than tcbhead_t.
5952 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5954 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5956 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5959 2005-05-19 Richard Henderson <rth@redhat.com>
5961 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5962 __sync_val_compare_and_swap, not explicit _si variant.
5963 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5965 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5968 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5970 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5972 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5973 .eh_frame section, use cfi_* directives.
5975 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5977 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5980 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5983 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5986 2005-04-27 Roland McGrath <roland@redhat.com>
5988 * Makefile (tests): Remove tst-clock2.
5990 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5991 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5992 translating to the kernel clockid_t for our own process/thread clock.
5994 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5996 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5998 * old_pthread_cond_init.c: Include <errno.h>.
5999 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6000 process shared or uses clock other than CLOCK_REALTIME.
6001 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6003 2005-04-13 David S. Miller <davem@davemloft.net>
6005 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6006 * sysdeps/sparc/sparc64/clone.S: New file.
6008 2005-04-05 Jakub Jelinek <jakub@redhat.com>
6011 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6012 __inline instead of inline.
6013 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6015 2005-03-31 Jakub Jelinek <jakub@redhat.com>
6017 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6018 functionally equivalent, but shorter instructions.
6019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6020 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6021 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6023 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6025 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6026 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6027 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6028 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6029 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6032 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6034 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6035 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6037 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
6039 * sysdeps/mips/Makefile: New file.
6040 * sysdeps/mips/nptl-sysdep.S: New file.
6041 * sysdeps/mips/tcb-offsets.sym: New file.
6042 * sysdeps/mips/pthread_spin_lock.S: New file.
6043 * sysdeps/mips/pthread_spin_trylock.S: New file.
6044 * sysdeps/mips/pthreaddef.h: New file.
6045 * sysdeps/mips/tls.h: New file.
6046 * sysdeps/mips/jmpbuf-unwind.h: New file.
6047 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6048 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6049 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6050 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6051 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6052 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6053 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6054 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6055 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6056 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6058 2005-03-23 Ulrich Drepper <drepper@redhat.com>
6061 * pthread_create.c (__pthread_create_2_1): Rename syscall error
6064 2005-03-10 Jakub Jelinek <jakub@redhat.com>
6066 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6068 2005-02-25 Roland McGrath <roland@redhat.com>
6070 * alloca_cutoff.c: Correct license text.
6071 * tst-unload.c: Likewise.
6072 * sysdeps/pthread/allocalim.h: Likewise.
6073 * sysdeps/pthread/pt-initfini.c: Likewise.
6074 * sysdeps/pthread/bits/libc-lock.h: Likewise.
6075 * sysdeps/pthread/bits/sigthread.h: Likewise.
6076 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6077 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6079 2005-02-16 Roland McGrath <roland@redhat.com>
6081 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6082 Use unsigned int * for ptr_nthreads.
6084 2005-02-14 Alan Modra <amodra@bigpond.net.au>
6087 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6090 2005-02-07 Richard Henderson <rth@redhat.com>
6093 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6096 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
6098 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6099 order of arguments in invocation of atomic_add_zero.
6101 2005-01-26 Jakub Jelinek <jakub@redhat.com>
6104 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6105 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6106 at least gotntpoff relocation and addition.
6107 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6109 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6111 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6114 2005-01-06 Ulrich Drepper <drepper@redhat.com>
6116 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6117 entry for static tls deallocation fix.
6118 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6119 also contains information whether the memory pointed to is static
6121 * sysdeps/i386/tls.h: Likewise.
6122 * sysdeps/ia64/tls.h: Likewise.
6123 * sysdeps/powerpc/tls.h: Likewise.
6124 * sysdeps/s390/tls.h: Likewise.
6125 * sysdeps/sh/tls.h: Likewise.
6126 * sysdeps/sparc/tls.h: Likewise.
6127 * sysdeps/x86_64/tls.h: Likewise.
6129 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6131 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6133 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6135 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6137 * Makefile (tests): Add tst-align2.
6138 * tst-align2.c: New test.
6139 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6140 -mpreferred-stack-boundary=4.
6142 2004-12-18 Roland McGrath <roland@redhat.com>
6144 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6145 New file removed withdrawn for the moment.
6147 2004-12-17 Richard Henderson <rth@redhat.com>
6149 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6150 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6152 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6154 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6155 Increased PTHREAD_STACK_MIN.
6157 * tst-context1.c (stacks): Use bigger stack size.
6159 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6161 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6162 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6164 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6166 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6167 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6168 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6170 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6172 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6174 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6176 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6177 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6179 * tst-getpid1.c: If child crashes, report this first. Print which
6182 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6184 * init.c (__pthread_initialize_minimal_internal): Also unblock
6187 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6189 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6190 _POSIX_THREAD_CPUTIME): Define to 0.
6191 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6192 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6193 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6194 __timer_signal_thread_tclk): Remove.
6195 (init_module): Remove their initialization.
6196 (thread_cleanup): Remove their cleanup assertions.
6197 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6198 __timer_signal_thread_tclk): Remove.
6199 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6200 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6201 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6203 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6205 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6206 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6208 * Makefile (tests): Add tst-getpid2.
6209 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6210 (do_test): Use it. Use __clone2 instead of clone on ia64.
6211 * tst-getpid2.c: New test.
6213 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6215 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6217 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6219 * Makefile (tests): Add tst-getpid1.
6220 * tst-getpid1.c: New file.
6221 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6222 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6224 2004-12-02 Roland McGrath <roland@redhat.com>
6226 * Makefile (libpthread-nonshared): Variable removed.
6227 ($(objpfx)libpthread_nonshared.a): Target removed.
6228 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6229 These are now handled by generic magic from
6230 libpthread-static-only-routines being set.
6232 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6234 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6235 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6236 _POSIX_THREAD_PRIO_PROTECT): Define.
6237 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6238 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6239 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6241 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6243 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6244 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6245 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6246 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6247 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6248 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6249 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6251 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6253 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6255 * Makefile (libpthread-routines): Add pthread_setschedprio.
6256 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6257 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6258 * pthread_setschedprio.c: New file.
6260 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6262 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6263 * pthread_cancel.c (pthread_create): Likewise.
6265 * Makefile (libpthread-routines): Add vars.
6266 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6267 * init.c (__default_stacksize, __is_smp): Remove.
6269 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6270 and define a wrapper macro.
6271 (PTHREAD_STATIC_FN_REQUIRE): Define.
6272 * allocatestack.c (__find_thread_by_id): Undefine.
6273 * pthread_create (__pthread_keys): Remove.
6274 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6275 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6276 PTHREAD_STATIC_FN_REQUIRE.
6278 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6280 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6281 parameter to REGISTER macro.
6283 2004-11-17 Roland McGrath <roland@redhat.com>
6285 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6286 Make sure SIGCANCEL is blocked as well.
6288 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6290 * sysdeps/pthread/setxid.h: New file.
6291 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6292 (struct xid_command): Add forward decl.
6293 (struct pthread_functions): Change return type of __nptl_setxid hook
6295 * pthreadP.h (__nptl_setxid): Change return type to int.
6296 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6297 calling thread, return its return value and set errno on failure.
6298 * descr.h (struct xid_command): Change id type to long array.
6300 * Makefile: Add rules to build and test tst-setuid1 and
6302 * tst-setuid1.c: New test.
6303 * tst-setuid1-static.c: New test.
6305 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6307 * Makefile (tests): Add tst-exit3.
6308 * tst-exit3.c: New test.
6310 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6312 * Makefile (tests): Add tst-exit2.
6313 * tst-exit2.c: New file.
6315 2004-11-09 Roland McGrath <roland@redhat.com>
6318 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6319 here, before calling clone.
6320 * pthread_create.c (start_thread): Don't do it here.
6322 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6324 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6326 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6328 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6329 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6332 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6334 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6335 if sched_priority is not between minprio and maxprio.
6337 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6339 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6340 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6342 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6343 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6345 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6347 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6348 not-cancelable I/O functions.
6350 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6352 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6353 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6354 make sure 2 is stored in the futex and we looked at the old value.
6355 Fix a few other problems to return the correct value.
6357 2004-10-14 Richard Henderson <rth@redhat.com>
6359 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6362 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6364 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6365 of pthread-functions.h and pthreaddef.h.
6366 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6368 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6369 Change __data.__nwaiters from int to unsigned int.
6371 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6372 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6374 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6377 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6378 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6380 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6382 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6383 test fails, remove message queue.
6384 (tf_msgsnd): Likewise.
6386 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6388 * tst-clock1.c: Change #ifdef to #if defined.
6389 * tst-clock2.c: Likewise.
6390 * tst-cond11.c: Likewise.
6392 * sysdeps/pthread/timer_create.c (timer_create): Use
6393 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6394 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6397 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6399 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6400 _POSIX_THREAD_CPUTIME): Define to 0.
6402 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6404 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6405 and _POSIX_THREAD_CPUTIME to zero.
6406 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6407 * tst-barrier2.c: Fix testing for POSIX feature.
6408 * tst-clock1.c: Likewise.
6409 * tst-clock2.c: Likewise.
6410 * tst-cond11.c: Likewise.
6411 * tst-cond4.c: Likewise.
6412 * tst-cond6.c: Likewise.
6413 * tst-flock2.c: Likewise.
6414 * tst-mutex4.c: Likewise.
6415 * tst-mutex9.c: Likewise.
6416 * tst-rwlock12.c: Likewise.
6417 * tst-rwlock4.c: Likewise.
6418 * tst-signal1.c: Likewise.
6419 * tst-spin2.c: Likewise.
6420 * sysdeps/pthread/posix-timer.h: Likewise.
6421 * sysdeps/pthread/timer_create.c: Likewise.
6422 * sysdeps/pthread/timer_routines.c: Likewise.
6424 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6426 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6427 (__lll_mutex_timedlock_wait): Address futex correctly.
6429 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6430 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6431 make sure 2 is stored in the futex and we looked at the old value.
6432 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6433 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6434 which might very well made the code not working at all before.
6437 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6439 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6440 allow SIGSETXID to be sent.
6441 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6442 for SIGSETXID to be defined.
6443 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6444 SIGSETXID cannot be blocked.
6446 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6447 Add __extension__ to long long types.
6448 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6449 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6450 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6451 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6452 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6453 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6454 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6456 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6458 * descr.h (struct pthread): Add stopped_start field.
6459 * sysdeps/pthread/createthread.c (create_thread): Set
6460 start_stopped flag in descriptor for new thread appropriately.
6461 * pthread_create.c (start_thread): Only take lock to be stopped on
6462 startup if stopped_start flag says so.
6464 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6466 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6467 is created detached and if yes, do not try to free the stack in case
6468 the thread creation failed.
6469 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6470 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6471 case there has been no error. [BZ #405]
6473 * pthread_create.c (start_thread): Don't wait for scheduler data
6474 etc to be set at the beginning of the function. The cancellation
6475 infrastructure must have been set up. And enable async
6476 cancellation before potentially going to sleep. [BZ #401]
6478 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6480 * Versions: Remove exports for pthread_set*id_np functions.
6481 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6483 * Makefile: Don't build pthread_set*id code for now.
6485 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6487 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6489 * allocatestack.c (__nptl_setxid): New function.
6490 * descr.h (struct xid_command): Define type.
6491 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6492 (sighandler_setxid): New function.
6493 (__pthread_initialize_minimal): Register sighandler_setxid for
6495 * pt-allocrtsig.c: Update comment.
6496 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6497 Declare __nptl_setxid.
6498 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6499 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6500 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6501 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6502 and pthread_setresuid_np.
6503 * pthread_setgid_np.c: New file.
6504 * pthread_setuid_np.c: New file.
6505 * pthread_setegid_np.c: New file.
6506 * pthread_seteuid_np.c: New file.
6507 * pthread_setregid_np.c: New file.
6508 * pthread_setreuid_np.c: New file.
6509 * pthread_setresgid_np.c: New file.
6510 * pthread_setresuid_np.c: New file.
6511 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6512 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6513 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6514 and pthread_setresuid_np.
6515 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6516 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6517 pthread_setregid, and pthread_setresgid.
6519 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6521 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6522 ENOMEM when out of memory.
6524 2004-09-10 Roland McGrath <roland@redhat.com>
6527 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6528 code, since we don't try to use the broken CLONE_STOPPED any more.
6529 * pthread_create.c (start_thread): Likewise.
6531 2004-09-15 Richard Henderson <rth@redhat.com>
6533 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6535 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6537 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6538 (__libc_unwind_longjmp): Delete macro and declare as function.
6539 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6540 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6542 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6543 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6544 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6546 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6548 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6550 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6551 types also for __USE_XOPEN2K.
6552 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6553 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6554 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6555 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6556 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6557 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6558 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6561 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6563 * sysdeps/pthread/pthread.h
6564 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6565 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6566 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6567 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6570 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6572 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6573 PSEUDO to be used with . prefix.
6575 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6576 Use atomic_increment instead of atomic_exchange_and_add.
6577 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6579 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6581 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6584 * allocatestack.c (allocate_stack): Use atomic_increment_val
6585 instead of atomic_exchange_and_add.
6586 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6587 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6589 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6592 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6593 the initialization function might throw.
6595 2005-09-05 Richard Henderson <rth@redhat.com>
6597 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6598 Move definition inside libpthread, libc, librt check. Provide
6599 definition for rtld.
6601 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6603 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6604 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6605 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6606 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6607 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6608 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6609 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6610 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6613 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6614 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6615 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6618 Decrement __nwaiters. If pthread_cond_destroy has been called and
6619 this is the last waiter, signal pthread_cond_destroy caller and
6620 avoid using the pthread_cond_t structure after unlock.
6621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6622 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6623 Read clock type from the least significant bits of __nwaiters instead
6625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6626 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6628 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6631 * Makefile (tests): Add tst-cond20 and tst-cond21.
6632 * tst-cond20.c: New test.
6633 * tst-cond21.c: New test.
6634 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6635 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6637 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6639 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6640 (pthread_cond_t): Likewise.
6641 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6643 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6645 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6647 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6648 (cond_nwaiters): New.
6650 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6651 if there are waiters not signalled yet.
6652 Wait until all already signalled waiters wake up.
6653 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6654 __nwaiters. If pthread_cond_destroy has been called and this is the
6655 last waiter, signal pthread_cond_destroy caller and avoid using
6656 the pthread_cond_t structure after unlock.
6657 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6658 decrement it when leaving. If pthread_cond_destroy has been called
6659 and this is the last waiter, signal pthread_cond_destroy caller.
6660 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6661 Likewise. Read clock type from the least significant bits of
6662 __nwaiters instead of __clock.
6663 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6664 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6665 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6666 clock type just from the last COND_CLOCK_BITS bits of value.
6667 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6668 instead of __clock, just from second bit of condattr's value.
6670 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6672 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6673 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6675 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6677 2004-08-15 Roland McGrath <roland@frob.com>
6679 * pthread_atfork.c: Update copyright terms including special exception
6680 for these trivial files, which are statically linked into executables
6681 that use dynamic linking for the significant library code.
6683 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6685 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6686 pthread_rwlock_rdlock.
6687 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6688 Decrease __nr_readers_queued after reacquiring lock.
6689 * sysdeps/pthread/pthread_rwlock_timedrdlock
6690 (pthread_rwlock_timedrdlock): Likewise.
6691 Reported by Bob Cook <bobcook47@hotmail.com>.
6693 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6695 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6696 before pthread_barrier_wait.
6698 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6700 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6701 Remove unnecessary exception handling data.
6703 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6706 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6707 instead of clockid_t.
6709 2004-07-21 Roland McGrath <roland@redhat.com>
6711 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6713 2004-07-19 Roland McGrath <roland@redhat.com>
6715 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6717 2004-07-02 Roland McGrath <roland@redhat.com>
6719 * configure: Don't exit.
6721 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6723 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6724 (__pthread_cond_timedwait): Check for invalid nanosecond in
6727 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6729 * Makefile: Add rules to build and run tst-fini1.
6730 * tst-fini1.c: New file.
6731 * tst-fini1mod.c: New file.
6733 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6735 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6736 if no cancellation support is needed.
6737 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6738 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6739 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6740 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6741 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6742 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6743 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6744 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6745 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6747 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6748 only if not already defined.
6750 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6752 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6753 constraint "m" instead of "0" for futex.
6755 * shlib-versions: Add powerpc64-.*-linux.*.
6757 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6759 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6760 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6762 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6763 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6766 2004-06-29 Roland McGrath <roland@redhat.com>
6768 * Banner: NPTL no longer has its own version number.
6769 * Makefile (nptl-version): Variable removed.
6770 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6771 using $(version), the glibc version number.
6773 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6775 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6776 Fix branch offset for a PLT entry.
6777 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6779 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6781 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6783 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6786 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6788 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6791 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6793 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6794 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6796 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6797 (pthread_rwlock_timedrdlock): Likewise.
6799 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6801 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6802 Set __r7 to val, not mutex.
6804 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6806 * Makefile: Add rules to build tst-rwlock14.
6807 * tst-rwlock14.c: New file.
6809 2004-06-24 Boris Hu <boris.hu@intel.com>
6811 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6813 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6815 2004-06-19 Andreas Jaeger <aj@suse.de>
6817 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6818 assembler in last patch.
6820 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6822 * sysdeps/pthread/pthread_cond_timedwait.c
6823 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6825 (__pthread_cond_timedwait): Check for invalid nanosecond in
6827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6828 * tst-cond19.c: New file.
6829 * Makefile: Add rules to build and run tst-cond19.
6831 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6833 * tst-context1.c (GUARD_PATTERN): Defined.
6834 (tst_context_t): Define struct containing ucontext_t & guard words.
6835 (ctx): Declare as an array of tst_context_t.
6836 (fct): Verify uc_link & guard words are still valid.
6837 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6839 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6841 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6842 Add __data.__futex field, reshuffle __data.__clock.
6843 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6844 (__pthread_cond_signal): Increment __futex at the same time as
6845 __wakeup_seq or __total_seq. Pass address of __futex instead of
6846 address of low 32-bits of __wakeup_seq to futex syscall.
6847 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6848 (__pthread_cond_wait): Likewise. Pass __futex value from before
6849 releasing internal lock to FUTEX_WAIT.
6850 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6851 (__pthread_cond_timedwait): Likewise.
6852 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6853 (FUTEX_CMP_REQUEUE): Define.
6854 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6855 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6856 Pass __futex value from before the unlock and __futex address instead
6857 of address of low 32-bits of __wakeup_seq to futex syscall.
6858 Fallback to FUTEX_WAKE all on any errors.
6860 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6862 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6864 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6865 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6866 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6867 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6868 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6870 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6872 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6873 Add memory clobber to inline assembly.
6874 (__lll_mutex_trylock): Likewise.
6875 (__lll_mutex_cond_trylock): Likewise.
6877 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6879 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6880 Pass val argument as 6th system call argument in %r7.
6882 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6884 * Makefile (tests): Add tst-cond16.
6885 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6886 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6887 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6888 Add __data.__futex field, reshuffle __data.__clock.
6889 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6890 (__pthread_cond_signal): Increment __futex at the same time as
6891 __wakeup_seq or __total_seq. Pass address of __futex instead of
6892 address of low 32-bits of __wakeup_seq to futex syscall.
6893 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6894 (__pthread_cond_wait): Likewise. Pass __futex value from before
6895 releasing internal lock to FUTEX_WAIT.
6896 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6897 (__pthread_cond_timedwait): Likewise.
6898 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6899 (FUTEX_CMP_REQUEUE): Define.
6900 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6901 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6902 Pass __futex value from before the unlock and __futex address instead
6903 of address of low 32-bits of __wakeup_seq to futex syscall.
6904 Fallback to FUTEX_WAKE all on any errors.
6905 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6907 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6908 internally. Return non-zero if error, zero if success.
6909 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6910 Add __data.__futex field, reshuffle __data.__clock.
6911 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6913 (lll_futex_requeue): Add val argument, return 1 unconditionally
6915 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6916 Add __data.__futex field, reshuffle __data.__clock.
6917 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6919 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6920 internally. Return non-zero if error, zero if success.
6921 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6922 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6923 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6925 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6926 internally. Return non-zero if error, zero if success.
6927 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6928 Add __data.__futex field, reshuffle __data.__clock.
6929 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6931 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6932 internally. Return non-zero if error, zero if success.
6933 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6934 Add __data.__futex field, reshuffle __data.__clock.
6935 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6936 Add __data.__futex field, reshuffle __data.__clock.
6937 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6938 Increment __futex at the same time as __wakeup_seq or __total_seq.
6939 Pass address of __futex instead of address of low 32-bits of
6940 __wakeup_seq to futex syscall.
6941 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6942 Pass __futex value from before releasing internal lock
6944 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6945 Likewise. Avoid unnecessary shadowing of variables.
6946 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6947 Set __futex to 2 * __total_seq. Pass __futex value from before the
6948 unlock and __futex address instead of address of low 32-bits of
6949 __wakeup_seq to futex_requeue macro, adjust for new return value
6951 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6952 (__pthread_cond_signal): Increment __futex at the same time as
6953 __wakeup_seq or __total_seq. Pass address of __futex instead of
6954 address of low 32-bits of __wakeup_seq to futex syscall.
6955 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6956 (__pthread_cond_wait): Likewise. Pass __futex value from before
6957 releasing internal lock to FUTEX_WAIT.
6958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6959 (__pthread_cond_timedwait): Likewise.
6960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6961 (FUTEX_CMP_REQUEUE): Define.
6962 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6963 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6964 Pass __futex value from before the unlock and __futex address instead
6965 of address of low 32-bits of __wakeup_seq to futex syscall.
6966 Fallback to FUTEX_WAKE all on any errors.
6968 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6970 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6971 Add nop to align the end of critical section.
6972 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6974 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6976 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6977 Add __broadcast_seq field.
6978 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6979 all waiters as woken with woken_seq and bump broadcast counter.
6980 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6981 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6982 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6983 Comment typo fixes. Avoid returning -ETIMEDOUT.
6985 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6988 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6989 Reported by Kaz Kojima.
6991 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6993 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6995 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6997 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6998 __broadcast_seq with bc_seq after acquiring internal lock instead of
7001 2004-05-18 Jakub Jelinek <jakub@redhat.com>
7003 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7006 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7008 (pthread_cond_t): Add __data.__broadcast_seq field.
7009 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7010 (FRAME_SIZE): Define.
7011 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
7013 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7015 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
7017 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7018 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
7021 2004-05-18 Ulrich Drepper <drepper@redhat.com>
7023 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7024 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7025 Add __broadcast_seq field.
7026 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7027 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7028 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7029 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7030 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7032 all waiters as woken with woken_seq and bump broadcast counter.
7033 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7035 __broadcast_seq field.
7036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7037 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7038 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7039 * pthread_cond_init.c: Initialize __broadcast_seq field.
7040 * Makefile (tests): Add tst-cond17 and tst-cond18.
7041 Add .NOTPARALLEL goal.
7042 * tst-cond16.c: New file. From Jakub.
7043 * tst-cond17.c: New file. From Jakub.
7044 * tst-cond18.c: New file. From Jakub.
7046 2004-05-16 Ulrich Drepper <drepper@redhat.com>
7048 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7052 Parametrize frame size. Correct some unwind info.
7053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7055 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7057 * tst-stack3.c: Note testing functionality beyond POSIX.
7059 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7061 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7062 Change conditional from ifdef to if.
7064 2004-04-23 Jakub Jelinek <jakub@redhat.com>
7066 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7067 SYSDEP_CANCEL_ERROR): Define.
7070 2004-05-01 Jakub Jelinek <jakub@redhat.com>
7072 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7074 2004-04-20 Jakub Jelinek <jakub@redhat.com>
7076 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7078 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7080 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7081 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7082 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7083 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7085 2004-04-19 Ulrich Drepper <drepper@redhat.com>
7087 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7088 thread has all signals blocked.
7090 2004-04-18 Andreas Jaeger <aj@suse.de>
7092 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7093 (SEM_VALUE_MAX): Add missing brace.
7095 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7097 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7099 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7100 * sysdeps/pthread/tst-mqueue8x.c: New test.
7101 * tst-cancel4.c: Update comment about message queues.
7103 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7104 return it_value { 0, 0 }.
7105 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7107 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7108 assertion for SIGEV_NONE.
7109 (thread_attr_compare): Compare all attributes, not just a partial
7112 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7114 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7116 2004-04-17 Ulrich Drepper <drepper@redhat.com>
7118 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7119 Just use a plain number.
7120 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7121 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7122 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7123 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7124 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7125 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7126 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7128 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7130 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7132 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7134 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7136 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7137 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7138 of calling sigwaitinfo.
7140 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7142 * allocatestack.c (allocate_stack): Set reported_guardsize
7144 * pthread_getattr_np.c (pthread_getattr_np): Use
7145 reported_guardsize instead of guardsize.
7146 * descr.h (struct pthread): Add reported_guardsize field.
7148 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7150 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7152 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7154 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7156 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7158 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7159 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7160 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7161 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7162 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7164 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7165 (_POSIX_MESSAGE_PASSING): Define.
7166 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7167 (_POSIX_MESSAGE_PASSING): Define.
7168 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7169 (_POSIX_MESSAGE_PASSING): Define.
7171 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7173 * tst-context1.c (fct): Check whether correct stack is used.
7175 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7177 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7178 matching constraints for asm mem parameters.
7180 * tst-clock2.c (tf): Don't define unless needed.
7182 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7184 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7187 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7189 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7190 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7191 * pthreadP.h: Declare __nptl_deallocate_tsd.
7192 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7195 * Makefile (tests): Add tst-tsd5.
7196 * tst-tsd5.c: New file.
7198 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7200 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7201 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7202 is SHLIB_COMPAT check.
7203 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7204 (__pthread_attr_getaffinity_old): Likewise.
7205 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7206 (__pthread_getaffinity_old): Likewise.
7207 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7208 (__pthread_setaffinity_old): Likewise.
7210 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7212 * allocatestack.c (_make_stacks_executable): Call
7213 _dl_make_stack_executable first.
7215 2004-03-24 Roland McGrath <roland@redhat.com>
7217 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7218 constraint instead of "0".
7220 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7222 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7223 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7225 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7226 code to avoid warning.
7228 2004-03-24 Andreas Jaeger <aj@suse.de>
7230 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7231 (__pthread_attr_setaffinity_old): Remove const.
7233 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7235 * sysdeps/unix/sysv/linux/smp.h: New file.
7236 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7237 * init.c: Define __is_smp.
7238 (__pthread_initialize_minimal_internal): Call is_smp_system to
7239 initialize __is_smp.
7240 * pthreadP.h: Declare __is_smp.
7241 Define MAX_ADAPTIVE_COUNT is necessary.
7242 * pthread_mutex_init.c: Add comment regarding __spins field.
7243 * pthread_mutex_lock.c: Implement adaptive mutex type.
7244 * pthread_mutex_timedlock.c: Likewise.
7245 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7246 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7248 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7249 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7250 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7251 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7252 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7253 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7254 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7255 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7256 lll_mutex_cond_trylock.
7257 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7258 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7259 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7260 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7261 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7262 Define BUSY_WAIT_NOP.
7263 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7264 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7266 * tst-mutex5.c: Add support for testing adaptive mutexes.
7267 * tst-mutex7.c: Likewise.
7268 * tst-mutex5a.c: New file.
7269 * tst-mutex7a.c: New file.
7270 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7272 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7273 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7274 vgettimeofday call might destroy the content.
7276 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7279 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7280 No need to restrict type of ret. Make it int. Add comment.
7282 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7283 Remove unnecessary setne instruction.
7285 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7287 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7288 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7289 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7290 If realloc fails, break out of the loop.
7292 2004-03-20 Andreas Jaeger <aj@suse.de>
7294 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7295 (__pthread_setaffinity_old): Fix interface.
7296 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7297 (__pthread_getaffinity_old): Likewise.
7299 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7300 (__pthread_setaffinity_new): Remove duplicate declaration.
7302 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7304 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7305 the return value to a safe register.
7306 (CDISABLE): Set the function argument correctly.
7308 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7310 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7311 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7312 Rewrite so that only one locked memory operation per round is needed.
7313 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7314 (pthread_barrier_wait): After wakeup, release lock only when the
7315 last thread stopped using the barrier object.
7316 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7317 (__pthread_cond_wait): Don't store mutex address if the current
7318 value is ~0l. Add correct cleanup support and unwind info.
7319 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7320 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7321 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7322 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7323 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7324 Add correct cleanup support and unwind info.
7325 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7326 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7327 information for syscall wrappers.
7329 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7331 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7332 cpusetsize field, remove next.
7333 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7334 parameter for size of the CPU set.
7335 (pthread_setaffinity_np): Likewise.
7336 (pthread_attr_getaffinity_np): Likewise.
7337 (pthread_attr_setaffinity_np): Likewise.
7338 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7339 interface change, keep compatibility code.
7340 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7341 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7342 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7343 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7344 __pthread_getaffinity_np.
7345 * Versions: Add version for changed interfaces.
7346 * tst-attr3.c: Adjust test for interface change.
7347 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7348 increasing buffer sizes.
7349 * pthread_attr_destroy.c: Remove unused list handling.
7350 * pthread_attr_init.c: Likewise.
7352 2004-03-17 Roland McGrath <roland@redhat.com>
7354 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7355 first argument to clock_getres so we ever enable kernel timers.
7357 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7359 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7361 2004-03-12 Richard Henderson <rth@redhat.com>
7363 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7364 oldvalue from CENABLE to CDISABLE.
7366 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7368 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7369 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7370 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7371 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7373 2004-03-11 Richard Henderson <rth@redhat.com>
7375 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7376 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7377 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7379 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7381 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7382 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7383 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7385 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7387 * forward.c (__pthread_cond_broadcast_2_0,
7388 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7389 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7390 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7392 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7394 * sysdeps/sh/tcb-offsets.sym: Add PID.
7395 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7396 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7398 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7400 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7401 include <sysdep-cancel.h>, vfork is no cancellation point.
7402 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7403 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7404 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7406 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7408 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7410 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7411 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7413 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7415 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7416 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7417 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7418 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7419 of DO_CALL_VIA_BREAK. Work around a gas problem.
7421 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7422 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7423 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7424 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7425 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7426 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7428 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7429 a local register for saving old PID. Negate PID in parent upon exit.
7431 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7433 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7434 before syscall, set to the old value in the parent afterwards.
7435 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7436 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7438 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7439 before syscall, set to the old value in the parent afterwards.
7440 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7441 * sysdeps/s390/tcb-offsets.sym: Add PID.
7443 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7444 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7445 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7446 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7447 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7448 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7450 2004-03-10 Andreas Schwab <schwab@suse.de>
7452 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7453 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7454 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7456 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7458 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7459 * tst-cancel21.c (do_one_test): Likewise.
7460 Reported by Gordon Jin <gordon.jin@intel.com>.
7462 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7464 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7465 if non-zero and set to INT_MIN if zero.
7466 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7467 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7468 (SAVE_PID, RESTORE_PID): Define.
7470 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7471 Use relative path to avoid including NPTL i386/vfork.S.
7472 (SAVE_PID, RESTORE_PID): Define.
7473 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7474 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7475 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7477 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7478 * tst-vfork1.c: New test.
7479 * tst-vfork2.c: New test.
7480 * tst-vfork1x.c: New test.
7481 * tst-vfork2x.c: New test.
7483 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7485 * sysdeps/i386/tcb-offsets.sym: Add PID.
7486 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7487 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7488 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7490 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7492 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7494 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7496 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7499 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7501 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7504 * tst-once4.c: Remove unnecessary macro definition.
7506 * tst-mutex7.c (do_test): Limit thread stack size.
7507 * tst-once2.c (do_test): Likewise.
7508 * tst-tls3.c (do_test): Likewise.
7509 * tst-tls1.c (do_test): Likewise.
7510 * tst-signal3.c (do_test): Likewise.
7511 * tst-kill6.c (do_test): Likewise.
7512 * tst-key4.c (do_test): Likewise.
7513 * tst-join4.c (do_test): Likewise.
7514 * tst-fork1.c (do_test): Likewise.
7515 * tst-context1.c (do_test): Likewise.
7516 * tst-cond2.c (do_test): Likewise.
7517 * tst-cond10.c (do_test): Likewise.
7518 * tst-clock2.c (do_test): Likewise.
7519 * tst-cancel10.c (do_test): Likewise.
7520 * tst-basic2.c (do_test): Likewise.
7521 * tst-barrier4.c (do_test): Likewise.
7523 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7525 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7527 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7530 (__pthread_cond_timedwait): Optimize wakeup test.
7531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7532 (__pthread_cond_wait): Likewise.
7533 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7534 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7537 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7539 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7540 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7541 the atomic instruction needed.
7542 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7543 (__lll_mutex_lock_wait): Likewise.
7545 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7547 * Makefile (tests): Add tst-cond14 and tst-cond15.
7548 * tst-cond14.c: New file.
7549 * tst-cond15.c: New file.
7551 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7553 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7554 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7555 needs to be implemented differently to be useful.
7557 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7559 * pthread_attr_setschedparam.c: Don't test priority against limits
7560 here. Set ATTR_FLAG_SCHED_SET flag.
7561 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7562 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7563 from parent thread to child. If attribute is used and scheduling
7564 parameters are not inherited, copy parameters from attribute or
7565 compute them. Check priority value.
7566 * pthread_getschedparam.c: If the parameters aren't known yet get
7567 them from the kernel.
7568 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7569 ATTR_FLAG_POLICY_SET flag for thread.
7570 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7571 and ATTR_FLAG_POLICY_SET.
7573 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7575 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7576 fail if stack address hasn't been set. Just return 0.
7578 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7580 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7581 libpthread for the files in this list.
7582 (CFLAGS-tst-unload): Removed.
7583 * tst-unload.c (do_test): Don't use complete path for
7586 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7589 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7591 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7592 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7593 operation per round is needed.
7594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7595 (__lll_mutex_lock_wait): Likewise.
7597 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7599 * tst-cancel9.c (cleanup): Don't print to stderr.
7601 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7603 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7605 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7607 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7608 (__syscall_error_handler2): Call CDISABLE.
7609 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7610 (__syscall_error_handler2): Call CDISABLE.
7612 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7613 Release lock before the loop, don't reacquire it.
7615 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7617 2004-02-19 Andreas Schwab <schwab@suse.de>
7619 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7622 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7624 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7625 (pthread_barrier_wait): After wakeup, release lock only when the
7626 last thread stopped using the barrier object.
7627 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7628 (pthread_barrier_wait): Likewise.
7629 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7631 * Makefile (tests): Add tst-barrier4.
7632 * tst-barrier4.c: New file.
7634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7635 (__pthread_cond_timedwait): Perform timeout test while holding
7636 internal lock to prevent wakeup race.
7637 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7638 * sysdeps/pthread/pthread_cond_timedwait.c
7639 (__pthread_cond_timedwait): Likewise.
7640 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7641 (__pthread_cond_timedwait): Likewise.
7643 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7646 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7647 * Makefile (tests): Add tst-rwlock13.
7648 * tst-rwlock13.c: New test.
7650 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7653 (__condvar_tw_cleanup): Little optimization.
7654 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7656 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7658 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7659 libpthread as "lib" parameter to SHLIB_COMPAT.
7660 (__novmx_siglongjmp): Fix typo in function name.
7661 (__novmx_longjmp): Fix typo in function name.
7663 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7665 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7668 * sysdeps/generic/pt-longjmp.c: Moved to...
7669 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7671 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7673 * Makefile (libpthread-routines): Add pt-cleanup.
7674 * pt-longjmp.c: Removed.
7675 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7676 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7677 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7678 Version longjmp, siglongjmp for GLIBC_2.3.4.
7679 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7681 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7683 * sysdeps/pthread/pthread_cond_timedwait.c
7684 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7685 Reuse code. Add __builtin_expects.
7687 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7688 (__pthread_cond_timedwait): Get internal lock in case timeout has
7689 passed before the futex syscall.
7690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7692 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7694 * allocatestack.c: Pretty printing.
7696 * sysdeps/pthread/createthread.c (create_thread): Don't add
7697 CLONE_DETACHED bit if it is not necessary.
7699 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7701 * pthread_getattr_np.c: Include ldsodefs.h.
7703 2004-01-16 Richard Henderson <rth@redhat.com>
7705 * allocatestack.c: Don't declare __libc_stack_end.
7706 * init.c (__pthread_initialize_minimal_internal): Likewise.
7707 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7709 2004-01-15 Richard Henderson <rth@redhat.com>
7711 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7712 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7713 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7714 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7715 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7716 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7717 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7718 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7720 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7722 * init.c (pthread_functions): Make array const.
7724 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7726 * allocatestack.c (__make_stacks_executable): Change interface.
7727 Check parameters. Pass parameter on to libc counterpart.
7728 * pthreadP.h: Change declaration.
7730 2004-01-13 Richard Henderson <rth@redhat.com>
7732 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7734 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7737 * sysdeps/alpha/Makefile: New file.
7738 * sysdeps/alpha/tcb-offsets.sym: New file.
7739 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7740 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7742 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7745 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7747 * Makefile (tests): Add tst-backtrace1.
7748 * tst-backtrace1.c: New test.
7750 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7752 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7753 register as second parameter to the REGISTER macro.
7754 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7755 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7756 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7757 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7758 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7759 of thread register as second parameter to REGISTER macro in 64 case.
7761 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7763 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7764 (CFLAGS-getpid.o): Defined.
7765 (CFLAGS-getpid.os): Defined.
7767 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7769 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7770 returned for main thread does not overlap with any other VMA.
7771 Patch by Jakub Jelinek.
7773 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7775 * tst-raise1.c: Include stdio.h.
7777 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7779 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7780 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7781 If pid is 0, set it to selftid.
7782 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7783 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7784 != 0, return self->tid without doing a syscall.
7785 * descr.h (struct pthread): Move pid field after tid.
7787 * Makefile (tests): Add tst-raise1.
7788 * tst-raise1.c: New file.
7790 2003-12-23 Roland McGrath <roland@redhat.com>
7792 * tst-oddstacklimit.c: New file.
7793 * Makefile (tests): Add it.
7794 (tst-oddstacklimit-ENV): New variable.
7796 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7797 value up to page size for __default_stacksize.
7799 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7801 * Makefile (tests): Add tst-eintr5.
7802 * tst-eintr5.c: New file.
7804 * eintr.c (eintr_source): Prevent sending signal to self.
7806 * tst-eintr2.c (tf1): Improve error message.
7808 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7810 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7811 * sysdeps/unix/sysv/linux/getpid.c: New file.
7812 * pthread_cancel.c: Add comment explaining use of PID field.
7813 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7814 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7815 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7816 temporarily to signal the field must not be relied on and updated
7818 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7819 temporarily negative.
7820 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7822 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7824 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7825 (eintr_source): If ARG != NULL, use pthread_kill.
7826 * tst-eintr1.c: Adjust for this change.
7827 * tst-eintr2.c: Likewise.
7828 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7829 * tst-eintr3.c: New file.
7830 * tst-eintr4.c: New file.
7832 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7834 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7835 if CANCELSTATE_BITMASK is set.
7836 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7839 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7840 (tests-reverse): Add tst-cancel23.
7841 * tst-cancel22.c: New test.
7842 * tst-cancel23.c: New test.
7844 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7846 * tst-eintr1.c: Better error messages.
7848 * Makefile (tests): Add tst-eintr2.
7849 * tst-eintr2.c: New file.
7851 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7853 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7854 (CFLAGS-tst-cancelx21.c): Set.
7855 * tst-cancel21.c: New test.
7856 * tst-cancelx21.c: New test.
7858 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7860 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7861 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7862 * pt-longjmp.c: Include jmpbuf-unwind.h.
7863 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7864 _JMPBUF_UNWINDS. Adjust compared pointers.
7865 * init.c (__pthread_initialize_minimal_internal): Initialize
7866 pd->stackblock_size.
7867 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7868 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7869 * sysdeps/i386/jmpbuf-unwind.h: New file.
7870 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7871 * sysdeps/s390/jmpbuf-unwind.h: New file.
7872 * sysdeps/sh/jmpbuf-unwind.h: New file.
7873 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7874 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7875 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7876 (_JMPBUF_CFA_UNWINDS): Remove.
7877 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7879 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7881 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7882 (CFLAGS-tst-cancelx20.c): Set.
7883 * tst-cancel20.c: New test.
7884 * tst-cancelx20.c: New test.
7886 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7888 * init.c (__pthread_initialize_minimal_internal): Don't treat
7889 architectures with separate register stack special here when
7890 computing default stack size.
7892 2003-12-17 Roland McGrath <roland@redhat.com>
7894 * Makefile (tst-cancelx7-ARGS): New variable.
7895 Reportd by Greg Schafer <gschafer@zip.com.au>.
7897 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7899 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7900 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7901 (tst-stack3-ENV): Set.
7902 ($(objpfx)tst-stack3-mem): New.
7903 * tst-stack3.c: New test.
7905 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7907 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7908 Add unwind directives. Drop unused .regstk directive.
7909 (_fini_EPILOG_BEGINS): Add unwind directives.
7911 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7913 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7914 Assume parameter is a pointer.
7915 (lll_futex_wake): Likewise.
7916 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7918 (lll_futex_wake): Likewise.
7919 Reported by Boris Hu.
7920 * sysdeps/unix/sysv/linux/unregister-atfork.c
7921 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7923 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7925 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7927 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7928 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7929 __rtld_lock_initialize for ld.so lock.
7930 Patch in part by Adam Li <adam.li@intel.com>.
7932 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7934 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7935 in $(gnulib). Also, remove stale comment.
7937 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7939 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7940 advantage of new syscall stub and optimize accordingly.
7942 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7943 from SYS_futex, to match expectations of
7944 sysdep.h:DO_INLINE_SYSCALL.
7945 (lll_futex_clobbers): Remove.
7946 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7947 (lll_futex_wake): Likewise.
7948 (lll_futex_requeue): Likewise.
7949 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7950 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7952 (__lll_mutex_lock): Likewise.
7953 (__lll_mutex_cond_lock): Likewise.
7954 (__lll_mutex_timed_lock): Likewise.
7955 (__lll_mutex_unlock): Likewise.
7956 (__lll_mutex_unlock_force): Likewise.
7958 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7959 comes before the include of <sysdep.h>.
7960 (THREAD_SELF_SYSINFO): New macro.
7961 (THREAD_SYSINFO): Likewise.
7962 (INIT_SYSINFO): New macro.
7963 (TLS_INIT_TP): Call INIT_SYSINFO.
7965 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7967 * sysdeps/pthread/createthread.c (create_thread): Use
7968 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7969 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7970 THREAD_SELF_SYSINFO instead of open code.
7971 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7972 (THREAD_SYSINFO): Likewise.
7974 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7976 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7978 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7980 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7981 instead of .init. Patch by David Mosberger.
7983 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7985 * sysdeps/pthread/configure.in: Remove broken declaration in C
7986 cleanup handling check.
7988 2003-11-30 Andreas Jaeger <aj@suse.de>
7990 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7991 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7994 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7996 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7997 * pthread_attr_destroy.c: Include shlib-compat.h.
7998 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7999 is set in iattr->flags.
8000 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8002 2003-11-21 Jakub Jelinek <jakub@redhat.com>
8004 * Makefile (distribute): Add tst-cleanup4aux.c.
8006 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
8009 2003-11-21 Ulrich Drepper <drepper@redhat.com>
8011 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8012 pthread_cond_signal.
8014 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8015 store mutex address if the current value is ~0l.
8016 * sysdeps/pthread/pthread_cond_timedwait.c
8017 (__pthread_cond_timedwait): Likewise.
8018 * sysdeps/pthread/pthread_cond_broadcast.c
8019 (__pthread_cond_broadcast): Don't use requeue for pshared
8022 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8023 (__pthread_cond_wait): Don't store mutex address if the current
8025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8026 (__pthread_cond_timedwait): Likewise.
8027 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8028 (__pthread_cond_broadcast): Don't use requeue for pshared
8031 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8032 element with ~0l for pshared condvars, with NULL otherwise.
8034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8035 (__pthread_cond_wait): Don't store mutex address if the current
8037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8038 (__pthread_cond_timedwait): Likewise.
8039 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8040 (__pthread_cond_broadcast): Don't use requeue for pshared
8043 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8044 * tst-cond12.c: New file.
8045 * tst-cond13.c: New file.
8047 2003-11-17 Ulrich Drepper <drepper@redhat.com>
8049 * sysdeps/pthread/configure.in: Make missing forced unwind support
8052 2003-11-11 Ulrich Drepper <drepper@redhat.com>
8054 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8056 2003-11-06 Ulrich Drepper <drepper@redhat.com>
8058 * Makefile: Add magic to clean up correctly.
8060 2003-11-05 Jakub Jelinek <jakub@redhat.com>
8062 * unwind.c (FRAME_LEFT): Define.
8063 (unwind_stop): Handle old style cleanups here.
8064 (__pthread_unwind): Handle old style cleanups only if
8065 !HAVE_FORCED_UNWIND.
8066 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8067 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8068 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8069 ($(objpfx)tst-cleanupx4): Likewise.
8070 * tst-cleanup4.c: New test.
8071 * tst-cleanup4aux.c: New.
8072 * tst-cleanupx4.c: New test.
8074 2003-11-04 Ulrich Drepper <drepper@redhat.com>
8076 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8077 lll_mutex_*lock macros to skip atomic operations on some archs.
8079 2003-11-03 Ulrich Drepper <drepper@redhat.com>
8081 * sysdeps/pthread/tst-timer.c (main): Initialize
8082 sigev2.sigev_value as well.
8084 2003-10-15 Roland McGrath <roland@redhat.com>
8086 * sysdeps/pthread/configure.in: Barf if visibility attribute support
8088 * sysdeps/pthread/configure: Regenerated.
8090 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8092 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8093 locking macros. No distinction between normal and mutex locking
8095 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8096 Merge bits from lowlevelmutex.S we still need.
8097 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8098 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8099 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8100 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8101 new mutex implementation.
8102 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8103 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8104 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8105 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8106 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8107 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8109 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8110 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8111 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8112 symbol for entry point to avoid cancellation.
8114 2003-10-07 Jakub Jelinek <jakub@redhat.com>
8116 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8118 (SAVE_OLDTYPE_0): Fix a typo.
8120 2003-10-03 Ulrich Drepper <drepper@redhat.com>
8122 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8123 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8125 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8127 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8130 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8132 * Makefile (tests): Add tst-cancel19.
8133 * tst-cancel19.c: New test.
8135 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8137 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8138 restoring of the old cancellation type.
8140 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8142 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8144 2003-09-27 Wolfram Gloger <wg@malloc.de>
8146 * sysdeps/pthread/malloc-machine.h: New file
8148 2003-09-24 Roland McGrath <roland@redhat.com>
8150 * allocatestack.c (__make_stacks_executable): Don't ignore return
8151 value from _dl_make_stack_executable.
8153 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8155 * allocatestack.c (__make_stacks_executable): Also change
8156 permission of the currently unused stacks.
8158 * allocatestack.c (change_stack_perm): Split out from
8159 __make_stacks_executable.
8160 (allocate_stack): If the required permission changed between the time
8161 we started preparing the stack and queueing it, change the permission.
8162 (__make_stacks_executable): Call change_stack_perm.
8164 * Makefile: Build tst-execstack-mod locally.
8165 * tst-execstack-mod.c: New file.
8167 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8169 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8171 2003-09-23 Roland McGrath <roland@redhat.com>
8173 * tst-execstack.c: New file.
8174 * Makefile (tests): Add it.
8175 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8176 (LDFLAGS-tst-execstack): New variable.
8178 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8179 whether to use PROT_EXEC for stack mmap.
8180 (__make_stacks_executable): New function.
8181 * pthreadP.h: Declare it.
8182 * init.c (__pthread_initialize_minimal_internal): Set
8183 GL(dl_make_stack_executable_hook) to that.
8185 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8188 recommendation from AMD re avoidance of lock prefix.
8190 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8192 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8193 lll_futex_timed_wait instead of lll_futex_wait.
8194 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8195 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8196 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8197 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8198 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8199 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8200 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8201 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8202 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8203 Completely revamp the locking macros. No distinction between
8204 normal and mutex locking anymore.
8205 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8206 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8207 __lll_lock_timedwait): Fix prototypes.
8208 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8209 __lll_lock_timedwait): Likewise.
8210 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8211 macros, add __builtin_expect.
8212 (lll_mutex_timedlock): Likewise. Fix return value.
8213 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8214 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8215 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8216 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8217 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8218 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8219 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8220 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8222 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8224 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8225 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8226 operation if possible.
8228 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8229 like jumping over the lock prefix.
8231 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8233 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8234 locking macros. No distinction between normal and mutex locking
8236 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8237 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8238 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8239 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8240 locking. Merge bits from lowlevelmutex.S we still need.
8241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8242 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8244 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8245 * Makefile (routines): Remove libc-lowlevelmutex.
8246 (libpthread-rountines): Remove lowlevelmutex.
8247 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8248 for new mutex implementation.
8249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8252 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8257 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8259 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8263 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8264 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8266 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8268 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8269 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8270 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8273 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8275 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8277 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8278 in parameters of asm with output parameters.
8280 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8281 type of DECR parameter to int.
8282 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8284 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8286 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8287 guardsize for each thread.
8289 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8291 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8292 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8293 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8295 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8296 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8298 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8299 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8300 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8301 (pthread_getaffinity_np): Add hidden_def.
8303 * Makefile (tests): Add tst-attr3.
8304 * tst-attr3.c: New test.
8306 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8308 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8310 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8311 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8313 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8315 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8316 * tst-align.c: Include tst-stack-align.h.
8317 (tf, do_test): Use TEST_STACK_ALIGN macro.
8319 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8321 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8324 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8326 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8327 stack-related values for the initial thread.
8329 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8331 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8333 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8335 * pthread_mutex_lock.c: Minor code rearrangements.
8337 2003-09-05 Roland McGrath <roland@redhat.com>
8339 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8340 Instead, include ../nptl_db/db_info.c to do its magic.
8341 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8342 (__pthread_pthread_key_2ndlevel_size): Likewise.
8343 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8344 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8345 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8346 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8347 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8348 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8349 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8350 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8351 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8352 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8353 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8354 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8355 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8356 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8357 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8358 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8359 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8361 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8363 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8364 of pthread_t to be compatible with LT.
8365 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8366 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8367 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8368 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8369 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8370 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8371 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8373 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8375 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8377 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8379 * unwind-forcedunwind.c: Move to...
8380 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8381 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8382 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8383 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8384 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8385 * unwind.c: Include jmpbuf-unwind.h.
8386 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8388 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8390 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8391 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8392 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8393 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8394 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8395 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8396 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8397 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8398 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8399 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8400 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8402 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8403 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8404 * Makefile (tests): Add tst-stack2.
8405 * tst-stack2.c: New test.
8406 * tst-stack1.c: Include limits.h and sys/param.h.
8407 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8409 * pthread_condattr_setpshared.c: Include errno.h.
8410 (pthread_condattr_setpshared): Return EINVAL if pshared
8411 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8413 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8414 defined symbol for entry point to avoid cancellation.
8415 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8417 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8419 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8421 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8423 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8425 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8426 __close_nocancel, __read_nocancel, __write_nocancel,
8427 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8428 libpthread.so or librt.so, define to corresponding function
8429 without _nocancel suffix.
8430 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8431 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8432 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8434 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8436 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8438 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8439 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8441 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8442 in subsections has a symbol associated with it.
8444 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8445 defined symbol for entry point to avoid cancellation.
8446 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8448 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8450 * Makefile (tests): Add tst-tls5.
8451 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8452 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8453 ($(objpfx)tst-tls5): New.
8454 ($(objpfx)tst-tls6.out): Likewise.
8455 (tests): Depend on $(objpfx)tst-tls6.out.
8456 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8457 (do_test): Check pthread_self () return value alignment.
8458 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8459 (tf): Check pthread_self () return value alignment.
8460 * tst-tls5.c: New test.
8462 * tst-tls5mod.c: New.
8463 * tst-tls5moda.c: New.
8464 * tst-tls5modb.c: New.
8465 * tst-tls5modc.c: New.
8466 * tst-tls5modd.c: New.
8467 * tst-tls5mode.c: New.
8468 * tst-tls5modf.c: New.
8469 * tst-tls6.sh: New test.
8471 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8472 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8473 * init.c (pthread_functions): Initialize them.
8474 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8475 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8476 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8477 pthread_cond_timedwait@@GLIBC_2.3.2.
8479 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8481 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8482 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8483 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8484 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8485 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8486 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8488 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8490 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8491 _POSIX_THREAD_PRIORITY_SCHEDULING.
8492 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8494 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8496 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8497 nested function, use static inline function from libio.h.
8498 Code by Richard Henderson.
8500 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8503 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8505 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8506 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8507 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8508 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8509 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8510 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8511 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8512 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8513 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8514 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8515 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8516 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8517 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8518 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8519 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8520 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8521 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8522 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8523 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8524 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8525 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8526 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8527 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8528 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8529 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8530 * sysdeps/sparc/tls.h: New file.
8531 * sysdeps/sparc/tcb-offsets.sym: New file.
8532 * sysdeps/sparc/Makefile: New file.
8533 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8534 * init.c [__sparc__] (__NR_set_tid_address): Define.
8536 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8538 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8539 _IO_release_lock): Define.
8541 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8543 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8544 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8546 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8548 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8549 (__pthread_cleanup_class): Add missing return types of member
8552 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8554 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8555 (lll_mutex_unlock_force): Add memory barrier between store and futex
8558 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8560 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8561 tempmsg in first loop.
8563 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8565 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8566 _POSIX_THREAD_PRIORITY_SCHEDULING.
8567 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8569 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8571 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8572 (__rtld_lock_default_lock_recursive,
8573 __rtld_lock_default_unlock_recursive): Define.
8574 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8575 __rtld_lock_unlock_recursive): Define using
8576 GL(_dl_rtld_*lock_recursive).
8577 * init.c (__pthread_initialize_minimal_internal): Initialize
8578 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8579 Lock GL(_dl_load_lock) the same number of times as
8580 GL(_dl_load_lock) using non-mt implementation was nested.
8582 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8583 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8585 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8587 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8590 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8592 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8594 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8596 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8597 to first syscall error check. Move syscall error check for tkill
8598 into __ASSUME_CLONE_STOPPED #ifdef.
8600 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8602 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8603 is not defined, do explicit synchronization.
8604 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8605 is not defined also unlock pd->lock for non-debugging case in case
8607 * pthread_create.c (start_thread): Always get and release pd->lock
8608 if __ASSUME_CLONE_STOPPED is not defined.
8609 (start_thread_debug): Removed. Adjust users.
8610 * allocatestack.c (allocate_stack): Always initialize lock if
8611 __ASSUME_CLONE_STOPPED is not defined.
8612 * Makefile (tests): Add tst-sched1.
8613 * tst-sched1.c: New file.
8615 * sysdeps/pthread/createthread.c (do_clone): Only use
8616 sched_setschduler and pass correct parameters.
8618 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8620 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8621 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8622 PTHREAD_STACK_MIN in comments.
8624 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8626 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8627 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8629 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8630 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8631 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8632 (__pthread_cleanup_upto): Fix prototype.
8633 (_longjmp_unwind): Adjust caller.
8634 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8635 Change second argument to const struct pointer.
8636 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8637 * tst-sem9.c (main): Likewise.
8638 * unwind.c: Include string.h for strlen prototype.
8640 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8643 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8644 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8646 Patch by Nicholas Miell <nmiell@attbi.com>.
8648 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8650 * init.c (__pthread_initialize_minimal_internal): Initialize
8651 GL(dl_init_static_tls).
8652 * pthreadP.h (__pthread_init_static_tls): New prototype.
8653 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8655 * Makefile (tests): Add tst-tls4.
8656 (modules-names): Add tst-tls4moda and tst-tls4modb.
8657 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8658 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8660 * tst-tls4.c: New file.
8661 * tst-tls4moda.c: New file.
8662 * tst-tls4modb.c: New file.
8664 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8666 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8667 before __timer_dealloc.
8668 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8669 Don't call list_unlink.
8671 2003-07-29 Roland McGrath <roland@redhat.com>
8673 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8675 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8677 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8678 Don't reuse struct aiocb A if it failed.
8679 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8680 not just one byte, as that does not block.
8682 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8684 * sysdeps/pthread/unwind-resume.c: New file.
8685 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8686 unwind-resume in csu subdir.
8687 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8689 (librt-sysdep_routines, librt-shared-only-routines): Add
8691 * sysdeps/pthread/rt-unwind-resume.c: New file.
8692 * unwind-forcedunwind.c: New file.
8693 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8694 (libpthread-shared-only-routines): Likewise.
8695 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8696 * pthreadP.h (pthread_cancel_init): New prototype.
8697 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8699 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8700 attr argument const struct pthread_attr *.
8702 * res.c (__res_state): Return __resp.
8703 * descr.h: Include resolv.h.
8704 (struct pthread): Add res field.
8705 * pthread_create.c: Include resolv.h.
8706 (start_thread): Initialize __resp.
8707 * Makefile (tests): Add tst-_res1.
8708 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8709 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8710 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8712 * tst-_res1.c: New file.
8713 * tst-_res1mod1.c: New file.
8714 * tst-_res1mod2.c: New file.
8716 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8718 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8720 * Makefile: Define various *-no-z-defs variables for test DSOs
8721 which has undefined symbols.
8723 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8725 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8726 Retry if the stwcx fails to store once_control.
8728 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8730 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8731 pthread_attr_setaffinity.
8732 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8733 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8734 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8735 * pthread_attr_destroy.c: Free cpuset element if allocated.
8736 * pthread_create.c: Pass iattr as additional parameter to
8738 * sysdeps/pthread/createthread.c: If attribute is provided and
8739 a new thread is created with affinity set or scheduling parameters,
8740 start thread with CLONE_STOPPED.
8741 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8742 pthread_attr_setaffinity.
8743 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8746 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8748 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8750 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8752 * sysdeps/pthread/configure.in: Require CFI directives also for
8755 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8757 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8760 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8762 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8764 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8765 registers as variables. Call __pthread_mutex_unlock_usercnt.
8766 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8767 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8768 not self pointer in __writer. Compare with TID to determine
8770 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8771 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8773 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8775 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8776 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8777 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8778 macros also when compiling librt.
8780 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8782 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8783 -fasynchronous-unwind-tables.
8784 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8785 (PSEUDO): Add cfi directives.
8786 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8788 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8791 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8793 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8794 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8795 * unwind.c (__pthread_unwind_next): Add hidden_def.
8796 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8798 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8799 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8800 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8802 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8803 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8805 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8806 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8807 __pthread_unregister_cancel and __pthread_unwind_next.
8809 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8811 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8812 different symbol for the cancellation syscall wrapper and
8813 non-cancellation syscall wrapper.
8814 (PSEUDO_END): Define.
8816 2003-07-05 Richard Henderson <rth@redhat.com>
8818 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8819 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8820 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8821 return actual return value from the syscall, not 0.
8823 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8825 * descr.h (struct pthread): Add pid field.
8826 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8827 (__reclaim_stacks): Likewise.
8828 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8829 also check for PID of the signal source.
8830 (__pthread_initialize_minimal_internal): Also initialize pid field
8831 of initial thread's descriptor.
8832 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8833 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8834 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8835 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8836 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8838 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8840 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8841 Fix use of parameter.
8842 (__libc_cleanup_pop): Likewise.
8844 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8846 * init.c (sigcancel_handler): Change parameters to match handler
8847 for SA_SIGACTION. Check signal number and code to recognize
8848 invalid invocations.
8850 2003-07-03 Roland McGrath <roland@redhat.com>
8852 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8853 Apply sizeof (struct pthread) bias to r13 value.
8855 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8857 * sysdeps/pthread/configure.in: Require CFI directives.
8859 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8861 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8862 libpthread compilation.
8863 * unwind.c (__pthread_unwind): Add hidden_def.
8864 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8866 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8868 * libc-cancellation.c (__libc_cleanup_routine): Define.
8869 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8870 (__pthread_cleanup_pop): Define.
8872 2003-07-01 Richard Henderson <rth@redhat.com>
8874 * sysdeps/alpha/elf/pt-initfini.c: New file.
8875 * sysdeps/alpha/pthread_spin_lock.S: New file.
8876 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8877 * sysdeps/alpha/pthreaddef.h: New file.
8878 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8879 * sysdeps/alpha/tls.h: New file.
8880 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8881 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8882 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8883 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8884 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8885 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8886 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8887 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8888 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8889 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8891 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8893 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8894 cleanup support and unwind info.
8896 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8898 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8899 Use correct cleanup handler registration. Add unwind info.
8900 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8901 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8902 * tst-once3.c: Add cleanup handler and check it is called.
8903 * tst-once4.c: Likewise.
8904 * tst-oncex3.c: New file.
8905 * tst-oncex4.c: New file.
8906 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8908 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8910 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8912 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8914 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8915 (tf_msgsnd): Likewise.
8917 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8918 premature returns a bit more.
8920 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8922 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8923 definition to the front.
8925 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8926 the cleanup functions to make the names unique. Fix dwarf opcode
8928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8929 functions to make the names unique. Fix CFA offset for two blocks.
8931 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8933 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8934 missing closing braces.
8935 Patch by Christophe Saout <christophe@saout.de>.
8937 2003-06-24 Roland McGrath <roland@redhat.com>
8939 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8941 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8943 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8944 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8946 * pthreadP.h: Declare __find_thread_by_id.
8947 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8948 * pthread_clock_gettime.c: Allow using other thread's clock.
8949 * pthread_clock_settime.c: Likewise.
8950 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8951 * Makefile: Add rules to build and run tst-clock2.
8952 * tst-clock2.c: New file.
8954 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8957 to use exception-based cleanup handler.
8958 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8960 * tst-cond8.c (ch): Announce that we are done.
8962 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8964 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8965 Also test aio_suspend with timeout value.
8967 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8969 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8970 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8973 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8974 (__pthread_mutex_lock_internal): Likewise.
8975 (__pthread_mutex_unlock_internal): Likewise.
8976 (__pthread_mutex_unlock_usercnt): Declare.
8977 * pthread_mutex_destroy.c: Always fail if used in any way.
8978 * pthread_mutex_init.c: Update comment.
8979 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8980 * pthread_mutex_timedlock.c: Adjust __nusers.
8981 * pthread_mutex_trylock.c: Adjust __nusers.
8982 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8983 and public interfaces are wrapper with pass additional parameter.
8984 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8986 * tst-mutex8.c: New file.
8987 * Makefile (tests): Add tst-mutex8.
8988 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8989 __pthread_mutex_unlock_usercnt.
8990 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8993 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8994 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8995 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8996 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8998 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8999 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9000 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9001 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9002 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9004 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9005 * pthread_mutex_timedlock.c: Likewise.
9006 * pthread_mutex_trylock.c: Adjust __nusers.
9007 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9008 * tst-mutex9.c: New file.
9009 * Makefile (tests): Add tst-mutex9.
9010 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9011 * sysdeps/ia64/tls.h: Likewise.
9012 * sysdeps/powerpc/tls.h: Likewise.
9013 * sysdeps/s390/tls.h: Likewise.
9014 * sysdeps/sh/tls.h: Likewise.
9015 * sysdeps/x86_64/tls.h: Likewise.
9016 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9017 Change type of __owner.
9018 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9019 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9020 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9021 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9022 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9024 2003-06-19 Jakub Jelinek <jakub@redhat.com>
9026 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9027 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9029 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9030 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
9031 instead of nr to lll_futex_wake. Only set errno and return -1
9034 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9035 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9036 return actual return value from the syscall, not 0.
9038 2003-06-18 Ulrich Drepper <drepper@redhat.com>
9040 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9041 find a random value.
9042 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
9045 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9046 compat_timer_settime.
9047 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9048 compat_timer_gettime.
9049 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9050 compat_timer_getoverrun.
9051 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9052 compat_timer_delete.
9054 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9055 error-checking mutex detect busy mutexes.
9057 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9059 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9060 Add ax to clobber list.
9061 (lll_mutex_cond_lock): Likewise.
9062 (lll_mutex_unlock): Likewise.
9063 (lll_lock): Likewise.
9064 (lll_unlock): Likewise.
9066 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9067 * tst-cancel18.c: New file.
9068 * tst-cancelx18.c: New file.
9070 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9073 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9074 * tst-cancel17.c: New file.
9075 * tst-cancelx17.c: New file.
9077 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9078 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9079 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9081 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9083 2003-06-16 Jakub Jelinek <jakub@redhat.com>
9085 * sysdeps/pthread/createthread.c (create_thread): Set
9086 header.multiple_threads unconditionally.
9087 * allocatestack.c (allocate_stack): Likewise.
9088 * descr.h (struct pthread): Add header.multiple_threads
9090 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9091 Define for librt. #error if neither libpthread, libc nor librt.
9092 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9094 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9095 CDISABLE): Likewise.
9096 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9097 CDISABLE): Likewise.
9098 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9099 CDISABLE): Likewise.
9100 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9101 CDISABLE): Likewise. Access header.multiple_threads outside of
9102 libc and libpthread.
9103 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9105 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9106 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9108 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9110 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9111 Also test early cancellation before the thread reaches the cancellation
9114 * Makefile: Compile forward.c with exceptions.
9116 * sysdeps/unix/sysv/linux/sleep.c: New file.
9118 2003-06-16 Ulrich Drepper <drepper@redhat.com>
9120 * Makefile: Add CFLAGS definition to compile function wrappers
9121 duplicated from libc with exceptions.
9122 * tst-cancel4.c: Also check cancellation handlers.
9124 * Makefile: Add rules to build and run tst-cancel16 and
9125 tst-cancelx16. Add missing CFLAGS definitions.
9126 * tst-cancel16.c: New file.
9127 * tst-cancelx16.c: New file.
9129 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9131 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9132 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9133 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9134 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9136 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9137 (LIBC_CANCEL_RESET): Likewise.
9138 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9139 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9141 (CFLAGS-libcrt-cancellation.c): Define.
9142 * sysdeps/pthread/librt-cancellation.c: New file.
9143 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9144 macros also when compiling librt.
9145 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9146 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9147 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9148 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9149 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9150 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9151 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9153 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9154 compat_timer_create.
9156 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9158 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9160 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9162 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9163 Add libc_hidden_def.
9165 2003-06-13 Roland McGrath <roland@redhat.com>
9167 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9168 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9170 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9172 * allocatestack.c (queue_stack): Always inline.
9173 * ptreadhP.h (__do_cancel): Likewise.
9175 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9177 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9180 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9183 (__pthread_cond_signal): Remove incorrect second addition for
9186 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9189 (__pthread_cond_signal): Use correct futex pointer in
9190 __lll_mutex_lock_wait call.
9192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9193 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9195 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9197 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9199 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9202 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9203 hand-written CFI generation code. Since ENTRY/END also initiated
9204 CFI frames this caused two CFI sets to be generated.
9206 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9208 * cleanup_routine.c: New file.
9209 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9210 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9212 * Makefile (libpthread-routines): Add cleanup_routine.
9213 Add more CFLAGS variables to compile with exceptions. Add comments
9214 why which file needs unwind tables.
9215 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9217 * tst-cancelx1.c: New file.
9218 * tst-cancelx2.c: New file.
9219 * tst-cancelx3.c: New file.
9220 * tst-cancelx4.c: New file.
9221 * tst-cancelx5.c: New file.
9222 * tst-cancelx6.c: New file.
9223 * tst-cancelx7.c: New file.
9224 * tst-cancelx8.c: New file.
9225 * tst-cancelx9.c: New file.
9226 * tst-cancelx10.c: New file.
9227 * tst-cancelx11.c: New file.
9228 * tst-cancelx12.c: New file.
9229 * tst-cancelx13.c: New file.
9230 * tst-cancelx14.c: New file.
9231 * tst-cancelx15.c: New file.
9232 * tst-cleanupx0.c: New file.
9233 * tst-cleanupx0.expect: New file.
9234 * tst-cleanupx1.c: New file.
9235 * tst-cleanupx2.c: New file.
9236 * tst-cleanupx3.c: New file.
9238 * tst-cleanup0.c: Make standard compliant.
9239 * tst-cleanup1.c: Likewise.
9241 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9242 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9243 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9244 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9245 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9246 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9247 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9249 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9250 * tst-cancel12.c: New file.
9251 * tst-cancel13.c: New file.
9252 * tst-cancel14.c: New file.
9253 * tst-cancel15.c: New file.
9254 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9257 * tst-cancel1.c: Add some comments.
9259 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9262 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9264 * Makefile (CFLAGS-pthread_cancel.c): Define.
9266 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9268 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9269 Change type of __writer element to int.
9270 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9271 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9272 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9273 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9274 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9275 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9276 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9277 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9278 Compare with TID to determine deadlocks.
9279 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9280 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9281 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9282 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9283 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9284 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9286 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9289 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9290 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9294 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9295 * Makefile (tests): Add tst-rwlock12.
9296 * tst-rwlock12.c: New file.
9298 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9300 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9301 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9302 Remove bogus hidden_proto.
9303 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9305 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9306 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9307 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9308 ___lll_mutex_timedlock): Likewise.
9310 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9313 (__pthread_cond_signal): Add some code to eventually handle
9316 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9318 * Makefile (tests): Add tst-exec4.
9319 (tst-exec4-ARGS): Define.
9320 * tst-exec4.c: New file.
9322 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9324 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9325 Also fail if tv_nsec < 0.
9326 (__lll_timedwait_tid): Likewise.
9327 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9330 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9332 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9334 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9336 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9338 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9341 * Makefile (tests): Add tst-sem8 and tst-sem9.
9342 * tst-sem8.c: New file.
9343 * tst-sem9.c: New file.
9344 * sem_open.c: Fix creation of in_use record if the file exists but
9347 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9350 * sysdeps/pthread/timer_create.c (timer_create): In case
9351 evp==NULL, assign timer ID to sival_ptr.
9353 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9354 struct pthread_unwind_buf *.
9355 (struct pthread): Likewise for cleanup_jmp_buf element.
9357 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9358 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9359 * unwind.c (__pthread_unwind_next): Likewise.
9361 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9363 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9364 (lll_futex_timed_wait): Use int for futex value parameter.
9365 (lll_futex_wake): Likewise.
9366 (lll_futex_requeue): Likewise.
9368 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9369 Replace one memory operation with one register operation.
9371 * tst-join4.c (do_test): Fix error message.
9373 * tst-rwlock6.c (do_test): Use correct format specifier.
9375 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9376 (__lll_mutex_lock_wait): Replace one memory operation with one
9378 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9379 (__lll_mutex_lock_wait): Likewise.
9381 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9382 (__lll_mutex_cond_lock): Add one to value parameter of
9383 __lll_lock_wait to reflect reality in the futex syscall.
9384 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9385 (lll_mutex_cond_lock): Likewise.
9387 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9389 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9391 (lll_mutex_cond_lock): Define.
9393 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9395 * Makefile (tests): Add tst-signal6.
9396 * tst-signal6.c: New file.
9398 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9399 (__lll_mutex_unlock_force): New function
9400 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9402 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9403 (__lll_mutex_unlock_force): New function.
9404 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9406 * tst-rwlock7.c (do_test): Use correct format specifier.
9408 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9409 Find break parameter in correct asm argument.
9411 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9413 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9415 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9417 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9419 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9420 lll_futex_requeue, lll_mutex_unlock_force): Define.
9422 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9424 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9425 (pthread_cond_t): Add __mutex.
9426 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9427 lll_futex_requeue, lll_mutex_unlock_force): Define.
9429 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9431 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9432 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9434 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9436 (lll_futex_wait, lll_futex_wake): Define.
9437 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9438 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9439 FUTEX_REQUEUE instead of FUTEX_WAIT.
9440 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9441 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9442 mutex which was used in condvar structure. Call
9443 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9444 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9446 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9447 include tcb-offsets.h. Read wakeup value in locked region.
9448 Use the value of gbr register as THREAD_ID.
9449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9450 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9451 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9453 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9456 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9458 * sysdeps/pthread/pthread_cond_broadcast.c
9459 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9461 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9464 typo in register name.
9465 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9466 correctly. Actually use requeue. Little optimization.
9467 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9468 mutex address early. Handle cancellation state as 32-bit value.
9469 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9470 Remove unnecessary label.
9472 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9474 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9475 instead of FUTEX_WAIT.
9476 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9481 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9482 used in condvar structure. Call __pthread_mutex_cond_lock instead
9483 of __pthread_mutex_lock_internal.
9484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9485 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9486 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9487 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9489 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9490 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9491 Add pthread_mutex_cond_lock.
9492 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9493 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9495 lll_mutex_cond_lock.
9496 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9497 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9498 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9500 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9501 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9503 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9504 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9506 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9507 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9508 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9509 macro don't define aliases.
9511 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9512 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9513 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9514 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9515 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9517 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9521 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9523 * sem_open.c: Fix one endless loop. Implement correct semantics
9524 wrt opening the same semaphore more then once.
9525 * sem_close.c: Adjust for sem_open change.
9526 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9527 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9528 * Makefile (tests): Add tst-sem7.
9529 * tst-sem7.c: New file.
9531 2003-05-16 Roland McGrath <roland@redhat.com>
9533 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9534 uninitialized variable braino.
9536 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9538 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9539 test for syscall availability.
9541 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9542 __no_posix_timers to -1 if the syscalls don't exist.
9544 * pthread_join.c (pthread_join): Set tid field of the joined
9545 thread to -1. This isn't necessary but helps to recognize some
9546 error conditions with almost no cost.
9548 * allocatestack.c (FREE_P): Also negative values indicate an
9551 * unwind.c: Include <unistd.h>.
9553 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9555 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9557 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9559 * Makefile (crti-objs, crtn-objs): New variables.
9560 (omit-deps, extra-objs): Add crtn.
9561 ($(objpfx)libpthread.so): Depend on both crti and crtn
9562 and links to them in multidir.
9563 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9565 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9567 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9568 (lll_mutex_unlock): Use atomic_exchange_rel.
9570 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9572 * cond-perf.c (cons): Add missing locking around setting of alldone.
9574 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9576 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9578 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9580 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9582 * tst-sem6.c: New file.
9583 * Makefile (tests): Add tst-sem6.
9585 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9586 Use atomic_exchange_rel instead of atomic_exchange.
9587 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9590 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9591 code for lll_futex_wait and lll_futex_wake in static apps. Use
9592 vsyscall is possible.
9594 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9595 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9596 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9597 pthread_setaffinity_np.
9598 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9599 and pthread_setaffinity_np.
9600 * Makefile (libpthread-routines): Add pthread_getaffinity and
9601 pthread_setaffinity.
9603 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9604 use it in case mmap to allocate the stack fails.
9605 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9606 ARCH_MAP_FLAGS here.
9607 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9610 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9612 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9613 handler implementation. It is now lockless in fork().
9614 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9615 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9616 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9617 declare the __fork_*_lists.
9618 (struct fork_handler): Include pointers to all three functions.
9619 Add next, refcntr and need_signal elements.
9620 (__fork_handlers): New declaration.
9621 (__register_atfork_malloc): Remove declaration.
9622 (HAVE_register_atfork_malloc): Remove definition.
9623 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9624 __pthread_child_handler variable.
9625 (__libc_pthread_init): Use __register_atfork instead of explicitly
9627 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9629 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9631 * unwind.c (unwind_cleanup): Print error message and then abort. This
9632 function must never be reached.
9634 * cond-perf.c: New file.
9636 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9638 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9640 2003-05-04 Roland McGrath <roland@redhat.com>
9642 * Makefile ($(objpfx)../libc.so): New target.
9644 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9646 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9647 (pthread_condattr_t): Size is only an int, don't use long for
9649 (pthread_mutexattr_t): Likewise.
9650 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9651 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9652 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9654 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9656 * sysdeps/i386/tls.h: Define THREAD_ID.
9657 * sysdeps/ia64/tls.h: Likewise.
9658 * sysdeps/powerpc/tls.h: Likewise.
9659 * sysdeps/s390/tls.h: Likewise.
9660 * sysdeps/sh/tls.h: Likewise.
9661 * sysdeps/x86_64/tls.h: Likewise.
9662 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9664 * pthread_mutex_timedlock.c: Likewise.
9665 * pthread_mutex_trylock.c: Likewise.
9666 * pthread_mutex_unlock.c: Likewise.
9667 * pthread_rwlock_trywrlock.c: Likewise.
9668 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9669 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9670 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9671 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9673 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9676 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9678 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9679 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9680 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9681 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9682 Make __align long long instead of long.
9683 (pthread_rwlock_t): Formatting.
9684 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9685 (pthread_rwlock_t): Formatting.
9686 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9687 (pthread_cond_t): Make __align long long instead of long.
9688 (pthread_rwlock_t): Move __flags field to the same position as in
9691 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9693 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9694 * tst-rwlock7.c (do_test): Likewise.
9696 2003-04-26 Roland McGrath <roland@redhat.com>
9698 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9700 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9702 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9703 sizeof (struct pthread).
9704 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9706 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9708 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9710 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9712 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9714 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9716 (NO_TLS_OFFSET): Define.
9717 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9718 add TLS_TCB_SIZE unnecessarily.
9720 2003-04-22 Roland McGrath <roland@redhat.com>
9722 * Makeconfig (shared-thread-library): Reverse link order to work
9725 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9727 * semaphore.h: Fix typo in comment.
9729 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9731 * sysdeps/pthread/sigfillset.c: New file.
9733 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9734 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9735 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9736 * sysdeps/pthread/sigaction.c: Likewise.
9737 * sysdeps/pthread/sigprocmask.c: New file.
9738 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9740 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9741 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9744 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9746 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9747 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9749 * sysdeps/unix/sysv/linux/unregister-atfork.c
9750 (__unregister_atfork): Don't free memory not allocated dynamically.
9752 * semaphore.h: Remove __THROW marker from cancellation points.
9753 * nptl/sysdeps/pthread/pthread.h: Likewise.
9755 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9757 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9758 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9761 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9763 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9765 2003-04-15 Roland McGrath <roland@redhat.com>
9767 * forward.c (__pthread_unwind): Tweak to avoid warning.
9769 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9771 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9773 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9775 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9776 overflow CFA advance instructions.
9777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9779 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9781 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9782 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9783 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9787 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9789 DW_CFA_advance_loc for .Laddl-.Lsubl.
9791 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9793 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9794 position-independent unwind data for static libraries.
9795 Add missing unwind info. Add comments.
9797 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9802 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9804 * Makefile: Make sure all cancellation points are compiled with
9805 exception and asynchronous unwind tables.
9807 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9808 which mishandles loading of global object addresses in PIC.
9809 (THREAD_SETMEM_NC): Likewise.
9811 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9813 * pthread.h: Define new data structure for cleanup buffer. Declare
9814 new cleanup handler interfaces.
9815 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9816 (struct pthread): Add cleanup_jmp_buf pointer. Define
9817 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9818 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9819 it. Declare old cleanup handler installation functions.
9820 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9822 * cleanup_defer.c: Likewise.
9823 * cleanup_compat.c: New file. Old cleanup code.
9824 * cleanup_def_compat.c: New file. Old cleanup code.
9825 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9826 if own thread descriptor.
9827 * unwind.c: New file.
9828 * forward.c: Add __pthread_unwind.
9829 * init.c (pthread_functions): Add __pthread_unwind.
9830 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9831 Add ptr___pthread_unwind.
9832 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9833 and unwind function.
9834 * Makefile (libpthread-routines): Add cleanup_compat,
9835 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9836 table generation if necessary.
9837 * version.c: Record whether unwind support is compiled in.
9838 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9839 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9841 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9842 complication to generate unwind information for syscall wrappers.
9843 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9844 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9845 __cleanup_fct_attribute.
9847 * Makefile: Add rules to build and run tst-cleanup0.
9848 * tst-cleanup0.c: New file.
9849 * tst-cleanup0.expect: New file.
9851 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9852 caller. Optimize to avoid often unecessary local variable.
9854 2003-04-11 Roland McGrath <roland@redhat.com>
9856 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9857 sets variable `multidir'; include that.
9858 (generated): Add it.
9859 ($(objpfx)$(multidir)/crti.o): New target.
9860 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9862 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9864 * tst-attr2.c (do_test): Add cast to avoid warning.
9865 * tst-mutex4.c (do_test): Likewise.
9867 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9869 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9872 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9874 * Makefile (tests): Add tst-detach1.
9875 * tst-detach1.c: New file.
9877 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9879 * sysdeps/pthread/pthread.h: Remove duplicate
9880 pthread_cleanup_{push,pop} definitions.
9882 * tst-barrier2.c: Eliminate warnings.
9883 * tst-cancel4.c: Likewise.
9884 * tst-cond4.c: Likewise.
9885 * tst-cond6.c: Likewise.
9886 * tst-detach1.c: Likewise.
9887 * tst-rwlock4.c: Likewise.
9888 * tst-rwlock6.c: Likewise.
9889 * tst-rwlock7.c: Likewise.
9890 * tst-sem3.c: Likewise.
9891 * tst-spin2.c: Likewise.
9892 * tst-umask1.c: Likewise.
9894 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9896 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9898 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9900 * descr.h (struct pthread): Move cancelhandling member to the front.
9902 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9904 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9905 malloc_parent, and malloc_child statically.
9906 (__register_atfork_malloc): New function.
9907 (free_mem): Don't free any of the malloc_* variables on the list.
9908 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9909 Define HAVE_register_atfork_malloc.
9911 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9913 * sysdeps/pthread/createthread.c (create_thread): Add some more
9914 comments explaining when to set multiple_threads and when not.
9916 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9917 THREAD_ATOMIC_BIT_SET if not already defined.
9918 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9919 THREAD_ATOMIC_BIT_SET:
9920 * sysdeps/x86_64/tls.h: Likewise.
9921 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9922 THREAD_ATOMIC_CMPXCHG_VAL.
9923 (_pthread_cleanup_pop_restore): Likewise.
9924 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9925 (__pthread_enable_asynccancel_2): Likewise.
9926 (__pthread_disable_asynccancel): Likewise.
9927 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9928 (__libc_disable_asynccancel): Likewise.
9929 * init.c (sigcancel_handler): Likewise.
9930 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9931 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9933 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9935 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9936 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9937 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9938 * Makefile (tests): Add tst-cancel11.
9939 * tst-cancel11.c: New file.
9941 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9943 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9944 round, not the first. Use specific_used flag instead of local
9945 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9946 (__free_tcb): Don't call deallocate_tsd here.
9947 (start_thread): Call deallocate_tsd here.
9948 * pthread_setspecific.c: Set specific_used flag really only when
9950 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9951 * tst-tsd3.c: New file.
9952 * tst-tsd4.c: New file.
9954 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9956 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9957 Use atomic_exchange_and_add instead of __lll_add.
9958 (__lll_mutex_timedlock): Likewise.
9959 Patch by Ian Wienand.
9961 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9963 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9964 (SINGLE_THREAD_P): Fix typo.
9965 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9967 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9969 * Makefile (tests): Add tst-align.
9970 * tst-align.c: New file.
9971 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9973 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9976 * tst-tsd2.c: Add casts to avoid warnings.
9978 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9980 * descr.h (struct pthread): Move most often used elements to the front.
9982 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9984 * Makefile (libpthread-routines): Add pthread_atfork.
9985 (libpthread-static-only-routines): Add pthread_atfork.
9987 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9989 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9991 (INSTALL_DTV): Add parens.
9992 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9993 Use passed descr instead of THREAD_SELF.
9994 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9995 (__lll_mutex_timedlock_wait): Correct expected value after
9997 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9998 Release lock before waking up the waiters.
9999 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10000 criteria. Reorderstruct passed to cleanup handler. Fix
10001 handling of cancellation and failung pthread_mutex_unlock call.
10002 Use __pthread_enable_asynccancel_2 instead of
10003 __pthread_enable_asynccancel.
10004 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10005 Return result of lock re-get if it fails.
10006 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10007 for __pthread_cleanup_push.
10008 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10009 completely broken rwlock implementation.
10010 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10011 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10012 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10013 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10014 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10015 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
10016 versioned_symbol macro.
10017 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10018 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10020 2003-03-27 Ulrich Drepper <drepper@redhat.com>
10022 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10023 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
10025 (struct timer): Remove th and bar field.
10026 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10027 debugging code. Create only one helper thread.
10028 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10030 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10031 Renamed. Define statically. Use thread info from siginfo.
10032 (__helper_once): New variable.
10033 (__helper_tid): New variable.
10034 (__reset_helper_control): New function.
10035 (__start_helper_thread): New function.
10037 * pthread_create.c (start_thread): Don't use setjmp inside
10038 __builtin_expect to work around gcc bug.
10040 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10041 timer_delete syscall fails, but not with ENOSYS, set
10044 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10045 (timer_settime): Fix typo.
10046 * sysdeps/unix/sysv/linux/timer_getoverr.c
10047 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10049 2003-03-27 Jakub Jelinek <jakub@redhat.com>
10051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10052 offset of cleanupbuf.__prev.
10054 2003-03-26 Jakub Jelinek <jakub@redhat.com>
10056 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10059 2003-03-26 Ulrich Drepper <drepper@redhat.com>
10061 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10062 NULL provide default definition to syscall.
10064 2003-03-25 Roland McGrath <roland@redhat.com>
10066 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10067 (timer_id2ptr): Fix typo.
10069 2003-03-25 Ulrich Drepper <drepper@redhat.com>
10071 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10072 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10073 * sysdeps/ia64/pthreaddef.h: Likewise.
10074 * sysdeps/powerpc/pthreaddef.h: Likewise.
10075 * sysdeps/s390/pthreaddef.h: Likewise.
10076 * sysdeps/sh/pthreaddef.h: Likewise.
10077 * sysdeps/x86_64/pthreaddef.h: Likewise.
10078 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10079 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10081 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10082 SIGTIMER is not unblocked.
10083 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10085 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10087 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10088 pass pointer through as ID.
10089 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10090 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10091 * sysdeps/unix/sysv/linux/timer_create.c: New file.
10092 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10093 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10094 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10095 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10096 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10097 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10098 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10099 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10100 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10101 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10102 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10103 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10104 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10105 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10106 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10107 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10108 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10109 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10110 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10111 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10112 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10113 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10114 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10115 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10116 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10117 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10118 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10119 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10120 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10121 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10123 * pthreadP.h: Remove FRAME_LEFT definition.
10124 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10125 already left frame. Programs which have this problem are not POSIX
10127 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10129 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10131 * sysdeps/pthread/tst-timer.c: Check return values of the
10134 2003-03-23 Roland McGrath <roland@redhat.com>
10136 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10137 * tst-tls3mod.c: Likewise.
10138 * tst-tls1.c: Likewise.
10139 * tst-tls2.c: Likewise.
10141 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10142 undefined behavior.
10144 * tst-join5.c (tf1, tf2): Add a cast.
10146 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10148 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10149 Don't test anything.
10150 * tst-cond4.c: Likewise.
10151 * tst-cond6.c: Likewise.
10152 * tst-flock2.c: Likewise.
10153 * tst-mutex4.c: Likewise.
10154 * tst-rwlock4.c: Likewise.
10155 * tst-signal1.c: Likewise.
10156 * tst-spin2.c: Likewise.
10157 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10159 * tst-mutex4.c: Use test-skeleton.c.
10160 * tst-spin2.c: Likewise.
10161 * tst-sysconf.c: Likewise.
10162 * tst-barrier2.c: Likewise.
10163 * tst-cond4.c: Likewise.
10164 * tst-cond6.c: Likewise.
10165 * tst-rwlock4.c: Likewise.
10166 * tst-unload.c: Likewise.
10167 * tst-flock2.c (do_test): Use return instead of exit.
10169 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10171 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10173 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10175 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10176 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10177 instead of __lll_compare_and_swap.
10178 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10180 Removed definition if __lll_compare_and_swap.
10182 * cancellation.c: Adjust for new form of compare&exchange macros.
10183 * cleanup_defer.c: Likewise.
10184 * init.c: Likewise.
10185 * libc-cancellation.c: Likewise.
10186 * old_pthread_cond_broadcast.c: Likewise.
10187 * old_pthread_cond_signal.c: Likewise.
10188 * old_pthread_cond_timedwait.c: Likewise.
10189 * old_pthread_cond_wait.c: Likewise.
10190 * pthread_cancel.c: Likewise.
10191 * pthread_create.c: Likewise.
10192 * pthread_detach.c: Likewise.
10193 * pthread_join.c: Likewise.
10194 * pthread_key_delete.c: Likewise.
10195 * pthread_setcancelstate.c: Likewise.
10196 * pthread_setcanceltype.c: Likewise.
10197 * pthread_timedjoin.c: Likewise.
10198 * pthread_tryjoin.c: Likewise.
10199 * sysdeps/pthread/createthread.c: Likewise.
10201 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10203 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10204 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10205 definitions. Replace uses with calls to atomic_* functions.
10206 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10207 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10208 __lll_test_and_set calls with atomic_exchange_and_add and
10209 atomic_exchange calls respectively.
10210 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10211 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10212 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10213 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10214 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10215 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10216 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10218 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10219 returns the old value.
10221 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10223 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10224 int for variable OLDVAL and correct inline assembler contraint.
10225 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10226 type int for variable OLD.
10228 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10230 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10231 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10232 instead of multiple_threads field in the TCB.
10234 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10236 * sysdeps/i386/i686/bits/atomic.h: Removed.
10237 * sysdeps/i386/i586/bits/atomic.h: Removed.
10238 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10239 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10240 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10241 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10242 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10243 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10244 * atomic.h: Removed. Moved to glibc.
10246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10247 support for clock selection.
10249 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10250 signalling waiters.
10252 2003-03-18 Roland McGrath <roland@redhat.com>
10254 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10255 Add __lll_rel_instr first. Add memory clobber.
10256 (lll_mutex_unlock): Use __lll_test_and_set.
10257 From Paul Mackerras <paulus@samba.org>.
10259 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10261 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10262 (SINGLE_THREAD_P): Add `header.' prefix.
10263 From Paul Mackerras <paulus@samba.org>.
10265 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10266 pthread_timedjoin_np to ...
10267 (libpthread: GLIBC_2.3.3): ... here.
10268 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10270 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10271 Avoid shadowing VAL variable.
10273 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10276 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10278 * Makefile (tests): Add tst-cond11.
10279 * tst-cond11.c: New file.
10281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10282 struct passed to cleanup handler to eliminate one more
10284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10286 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10287 (pthrad_cond_t): Replace __unused field with __clock.
10289 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10290 waken all waiters in cleanup handler.
10291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10294 * pthread_condattr_getclock.c: New file.
10295 * pthread_condattr_setclock.c: New file.
10296 * sysdeps/pthread/pthread.h: Declare these new functions.
10297 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10298 * Makefile (libpthread-routines): Add the new functions.
10299 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10300 Renamed field to value. Document use of the bits.
10301 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10303 * pthread_condattr_setpshared.c: Likewise.
10304 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10305 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10306 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10308 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10309 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10310 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10311 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10313 Implement clock selection.
10314 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10315 * pthread-errnos.sym: Add ENOSYS.
10316 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10317 _POSIX_CLOCK_SELECTION.
10318 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10321 invalid .size directive.
10323 2003-03-17 Roland McGrath <roland@redhat.com>
10325 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10328 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10330 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10331 Use __lll_add instead of spelling it out. Use protected symbol names.
10332 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10335 Renamed from lll_compare_and_swap. Use new name where necessary.
10336 (__lll_add): Defined.
10337 (__lll_dec_if_positive): Defined.
10338 (__lll_test_and_set): Defined.
10339 * sysdeps/ia64/pthread_spin_init.c: Removed.
10340 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10341 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10342 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10343 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10344 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10345 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10346 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10347 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10348 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10349 __sync_lock_release_si.
10350 Patch by Jakub Jelinek.
10352 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10353 Fix timeout handling.
10354 (__lll_timedwait_tid): Likewise.
10355 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10356 Patch by Jakub Jelinek.
10358 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10360 2003-03-17 Roland McGrath <roland@redhat.com>
10362 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10363 * sysdeps/pthread/pthread_spin_init.c: New file.
10364 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10365 * sysdeps/powerpc/Makefile: New file.
10366 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10367 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10368 * sysdeps/powerpc/pthreaddef.h: New file.
10369 * sysdeps/powerpc/tcb-offsets.sym: New file.
10370 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10371 * sysdeps/powerpc/tls.h: New file.
10372 * sysdeps/powerpc/bits/atomic.h: New file.
10373 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10374 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10375 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10377 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10378 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10379 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10380 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10381 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10382 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10383 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10384 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10385 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10386 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10387 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10388 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10389 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10390 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10391 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10395 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10396 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10397 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10398 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10399 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10401 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10403 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10404 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10407 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10409 2003-03-16 Roland McGrath <roland@redhat.com>
10411 * tst-fork4.c: Include <string.h>.
10412 * tst-signal2.c: Likewise.
10413 * tst-mutex5.c (do_test): exit -> return.
10414 * tst-mutex2.c: Include <stdlib.h>.
10416 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10418 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10419 (__lll_mutex_timedlock_wait): Correct expected value after
10420 spurious wakeup. Otherwise we would never wait again.
10422 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10423 zone versus inline asm stupidity. Use correct instructions.
10425 * tst-rwlock6.c: Add some more status output.
10427 2003-03-15 Roland McGrath <roland@redhat.com>
10429 * sysdeps/pthread/configure.in: New file.
10430 * sysdeps/pthread/configure: New file (generated).
10432 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10434 * allocatestack.c (allocate_stack): Store the exact stack size of
10435 user allocated stacks.
10437 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10439 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10440 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10441 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10442 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10443 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10444 Use `header.' prefix.
10445 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10447 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10449 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10450 __builtin_frame_address, use stack pointer.
10452 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10453 instead of __builtin_frame_pointer.
10455 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10457 * tst-basic1.c (do_test): Add cast to avoid warning.
10458 * tst-basic2.c (do_test): Likewise.
10460 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10461 amount of stack correction.
10463 * tst-fork4.c: Use test-skeleton.c.
10465 2003-03-14 Roland McGrath <roland@redhat.com>
10467 * init.c: Fix typo "#eli" for "#else".
10469 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10471 * allocatestack.c (__stack_user): Use hidden_data_def.
10472 * pthread_create.c (__pthread_keys): Likewise.
10474 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10476 2003-03-14 Roland McGrath <roland@redhat.com>
10478 * tst-fork4.c: New file.
10479 * Makefile (tests): Add it.
10481 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10482 we always define the padding space.
10483 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10484 stopped supporting its own extensions fully.
10485 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10486 struct also called `header', so `header.multiple_threads' is the field
10487 name to use on all machines.
10488 * allocatestack.c (allocate_stack): Use `header.' prefix.
10489 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10490 * pthread_create.c (__pthread_create_2_1): Likewise.
10491 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10492 (THREAD_SELF): Likewise.
10493 * sysdeps/x86_64/tls.h: Likewise.
10494 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10495 (SINGLE_THREAD_P): Likewise.
10496 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10497 (SINGLE_THREAD_P): Likewise.
10498 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10499 (SINGLE_THREAD_P): Likewise.
10501 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10504 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10506 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10507 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10509 * pthread_create.c (start_thread): setjmp is expected to return 0.
10511 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10512 (THREAD_GETMEM_NC): Likewise.
10514 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10516 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10517 and the size of the stack which must be allocated is a multiple,
10518 allocate one more page.
10519 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10520 MULTI_PAGE_ALIASING.
10522 2003-03-13 Roland McGrath <roland@redhat.com>
10524 * pthread_create.c (start_thread): Set EXITING_BIT after the
10525 event-reporting (and destructors), not before.
10527 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10530 lll_futex_wake): Declare register variables as long int instead of
10531 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10532 Make syscall arguments clobbered by the syscall.
10533 (lll_futex_wait): Define using lll_futex_timed_wait.
10535 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10538 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10539 PPID if [! NDEBUG].
10541 * allocatestack.c (nptl_ncreated): Only declare if
10542 COLORING_INCREMENT != 0.
10544 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10545 (__libc_enable_asynccancel_2): Remove prototype.
10547 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10548 ctid to match kernel.
10550 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10552 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10553 libc_multiple_threads.
10554 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10555 __libc_multiple_threads to...
10556 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10558 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10560 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10561 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10563 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10564 (__pthread_once_internal): Define.
10566 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10567 macros instead of .symver directly.
10568 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10569 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10571 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10572 * sysdeps/x86_64/tcb-offsets.sym: New file.
10573 * sysdeps/x86_64/Makefile: New file.
10575 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10576 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10577 to access own pthread_t in TCB.
10578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10582 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10584 2003-03-12 Roland McGrath <roland@redhat.com>
10586 * pthread-errnos.sym: New file.
10587 * Makefile (gen-as-const-headers): New variable, list that file.
10588 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10589 header <pthread-errnos.h> instead of defining errno values here.
10590 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10591 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10592 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10594 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10599 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10600 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10601 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10602 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10603 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10604 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10605 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10607 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10609 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10610 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10611 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10612 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10613 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10614 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10615 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10616 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10617 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10618 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10619 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10620 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10621 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10622 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10623 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10626 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10627 CLONE_CHILD_SETTID worked.
10629 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10631 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10633 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10636 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10637 (pthread_cond_t): Add padding.
10639 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10640 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10641 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10643 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10644 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10646 (__pthread_rwlock_timedrdlock): Likewise.
10647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10648 (__pthread_rwlock_wrlock): Likewise.
10649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10650 (__pthread_rwlock_rdlock): Likewise.
10652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10655 result of lock re-get if it fails.
10657 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10660 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10661 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10663 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10664 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10665 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10666 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10667 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10668 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10670 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10671 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10673 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10674 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10675 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10676 (create_thread): Likewise.
10677 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10678 * init.c (__pthread_initialize_minimal_internal): Initialize
10679 __libc_multiple_threads_ptr if necessary.
10680 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10681 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10682 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10683 __libc_multiple_threads.
10684 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10687 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10688 (THREAD_SETMEM_NC): Likewise.
10690 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10691 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10692 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10693 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10695 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10696 Eliminate one entire instruction.
10698 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10699 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10700 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10701 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10702 instead of __pthread_enable_asynccancel.
10703 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10704 (__pthread_cond_wait): Likewise.
10705 * sysdeps/pthread/pthread_cond_timedwait.c
10706 (__pthread_cond_timedwait): Likewise.
10707 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10709 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10710 (__condvar_cleanup): Wake up all waiters in case we got signaled
10711 after being woken up but before disabling asynchronous
10713 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10715 (__condvar_cleanup): Likewise.
10717 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10718 Make it an error if architecture has no #if case. Add x86-64.
10720 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10721 pt-initfini.s generation.
10723 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10724 (TLS_INIT_TP): Fix typo.
10726 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10728 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10729 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10731 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10732 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10733 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10734 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10735 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10736 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10737 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10738 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10740 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10742 * sysdeps/pthread/pthread_cond_timedwait.c
10743 (__pthread_cond_timedwait): Return the result of the final
10744 locking. If it succeeds, the regular function return value.
10746 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10747 Return result of the final locking.
10748 * version.c (__nptl_main): Work around problems with the strange
10749 INTERNAL_SYSCALL macro on ppc32.
10750 * init.c (__pthread_initialize_minimal_internal): Unblock
10751 SIGCANCEL in case the parent blocked it.
10752 Reported by Paul Mackerras <paulus@samba.org>.
10754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10756 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10758 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10760 * sysdeps/pthread/pthread_cond_timedwait.c
10761 (__pthread_cond_timedwait): Unlock and fail if
10762 __pthread_mutex_unlock_internal failed.
10764 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10765 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10767 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10768 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10769 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10770 ALLOCATE_STACK): New macros.
10771 (TLS_TPADJ): New macro.
10772 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10773 (allocate_stack): Handle TLS_DTV_AT_TP and
10774 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10775 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10776 Don't set PD->self.
10777 * init.c [__ia64__] (__NR_set_tid_address): Define.
10779 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10780 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10781 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10782 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10783 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10784 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10785 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10786 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10787 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10788 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10789 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10790 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10791 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10792 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10793 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10794 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10795 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10796 * sysdeps/ia64/bits/atomic.h: New file.
10797 * sysdeps/ia64/Makefile: New file.
10798 * sysdeps/ia64/pthread_spin_init.c: New file.
10799 * sysdeps/ia64/pthread_spin_lock.c: New file.
10800 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10801 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10802 * sysdeps/ia64/pthreaddef.h: New file.
10803 * sysdeps/ia64/tcb-offsets.sym: New file.
10804 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10805 * sysdeps/ia64/tls.h: New file.
10807 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10808 to syscall instead of no arguments.
10810 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10812 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10813 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10814 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10815 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10817 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10820 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10822 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10823 lowlevelbarrier.sym.
10824 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10825 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10826 Include lowlevelbarrier.h and don't define offsets locally.
10827 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10829 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10830 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10831 (__lll_mutex_timedlock_wait): Likewise.
10832 (lll_mutex_lock): Adjust asm for that.
10833 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10834 (lll_lock): Adjust asm for operand order change.
10835 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10836 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10838 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10839 Reverse order of parameters.
10840 (__lll_timedwait_tid): Remove regparms attribute.
10841 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10842 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10844 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10845 (__lll_timedwait_tid): Remove one unnecessary instruction.
10847 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10848 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10849 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10852 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10853 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10855 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10858 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10859 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10861 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10862 define LOCK here (if UP is not defined). The actual code is in
10865 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10866 LOCK is already defined. Don't define lll_unlock_wake_cb and
10867 __lll_timedwait_tid for libc.so.
10868 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10869 define LOCK here (if UP is not defined). The actual code is in
10872 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10873 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10874 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10875 instead of lowlevelsem.h.
10876 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10877 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10878 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10880 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10881 lowlevelrwlock.sym.
10882 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10883 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10884 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10889 last changed. D'oh.
10891 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10893 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10894 of __libc_locking_needed.
10895 (lll_trylock): Initialize %eax to zero.
10897 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10898 pthread_cond_t definition.
10900 2003-03-10 Roland McGrath <roland@redhat.com>
10902 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10903 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10904 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10905 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10906 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10908 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10909 Instead of setting PD->multiple_threads, set globals
10910 __pthread_multiple_threads and __libc_multiple_threads.
10911 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10912 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10913 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10915 * descr.h (struct pthread): Conditionalize first member on
10916 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10917 containing an anonymous tcbhead_t. Move `list' member out.
10918 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10919 * allocatestack.c: Remove use of `header.data.' prefix.
10920 * pthread_create.c: Likewise.
10921 * init.c (__pthread_initialize_minimal_internal): Likewise.
10922 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10923 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10924 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10925 * sysdeps/x86_64/tls.h: Likewise.
10926 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10927 (SINGLE_THREAD_P): Likewise.
10928 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10929 (SINGLE_THREAD_P): Likewise.
10930 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10931 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10933 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10935 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10937 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10938 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10940 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10941 leftovers from the ia32 code.
10943 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10945 (clear_once_control): Don't load %esi.
10947 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10950 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10952 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10953 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10955 * Makefile (tests): Add tst-cond10.
10956 * tst-cond10.c: New file.
10958 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10960 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10961 * tst-signal3.c (do_test): Likewise.
10962 * tst-sem5.c (do_test): Likewise.
10963 * tst-kill6.c (do_test): Likewise.
10964 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10966 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10968 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10969 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10970 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10971 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10973 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10981 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10983 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10984 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10985 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10987 * allocatestack.c (allocate_stack): If mprotect() fails free the
10990 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10992 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10994 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10995 lll_wake_tid. This was used only to work around kernel limits in
10997 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10998 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10999 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11000 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11002 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11003 (__pthread_initialize_minimal_internal): Change initialization of
11004 __static_tls_align_m1 appropriately.
11005 * pthreadP.h (__static_tls_align_m1): Renamed from
11006 __static_tls_align.
11007 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11008 instead of __static_tls_align-1.
11010 2003-03-04 Ulrich Drepper <drepper@redhat.com>
11012 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11014 * pthread_create.c: Define __pthread_keys using nocommon
11015 attribute, not by placing it explicitly in bss.
11016 Remove DEFINE_DEALLOC definition. Not needed anymore.
11018 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11019 Use it in mmap call to allocate stacks.
11021 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11023 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11024 result of the thread function.
11026 2003-03-03 Ulrich Drepper <drepper@redhat.com>
11028 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
11029 version is just fine.
11031 * sysdeps/unix/sysv/linux/libc_pthread_init.c
11032 (__pthread_child_handler): Renamed from pthread_child_handler,
11033 exported, and marked hidden. Change all users.
11034 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11035 free __pthread_child_handler from child list.
11037 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
11039 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11041 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11042 Fix handling of cancellation and failing pthread_mutex_unlock call.
11043 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11044 (__pthread_cond_wait): Likewise.
11046 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11047 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11048 lll_futex_timed_wait call.
11049 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11050 (pthread_rwlock_timedwrlock): Likewise.
11052 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11053 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11054 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11056 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11057 check of lll_futex_wake return value.
11059 2003-03-03 Roland McGrath <roland@redhat.com>
11061 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11063 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11064 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11065 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11067 2003-03-02 Ulrich Drepper <drepper@redhat.com>
11069 * sysdeps/pthread/timer_create.c (timer_create): Return correct
11070 error for CPU clocks.
11072 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11073 _POSIX_MONOTONIC_CLOCK.
11074 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11076 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11079 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11081 * descr.h (struct pthread): Move cleanup field to the front.
11083 2003-03-01 Roland McGrath <roland@redhat.com>
11085 * sem_open.c (sem_open): Braino fix.
11087 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11089 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11091 __pthread_cleanup_pop functionality.
11092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11094 * descr.h (struct pthread): Move tid field to the front now that
11097 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11098 (__lll_mutex_timedlock_wait): Remove.
11099 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11101 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11102 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11103 (lll_unlock_wake_cb): Don't save and restore %esi.
11104 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11106 (__lll_timedwait_tid): Add alignment.
11107 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11108 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11110 (__lll_timedwait_tid): Removed.
11111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11112 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11113 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11114 (pthread_barrier_wait): Don't save, load, and restore %esi for
11116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11117 (__pthread_cond_signal): Don't save, load, and restore %esi.
11118 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11119 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11120 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11121 Don't save, load, and restore %esi.
11123 2003-02-27 Ulrich Drepper <drepper@redhat.com>
11125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11126 Release lock before waking up the waiters.
11128 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11130 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11131 (reader_thread): Likewise.
11133 * sysdeps/pthread/pthread_rwlock_unlock.c
11134 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11135 to wake up readers if there are none.
11137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11138 Release internal lock before wake threads.
11140 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11142 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11143 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11145 * tst-rwlock9.c: Likewise.
11146 * tst-rwlock10.c: New file.
11147 * tst-rwlock11.c: New file.
11149 * Makefile (tests): Add tst-dlsym1.
11150 * tst-dlsym1.c: New file.
11152 * init.c (__pthread_initialize_minimal_internal): Set
11153 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11154 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11156 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11158 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11160 * tst-cond2.c: Fix sychronization with child.
11162 * tst-rwlock8.c (reader_thread): Remove unused variable.
11164 * Makefile: Add rules to build and run tst-tls3.
11165 * tst-tls3.c: New file.
11166 * tst-tls3mod.c: New file.
11168 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11169 * tst-rwlock8.c: New file.
11170 * tst-rwlock9.c: New file.
11171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11172 complete broken rwlock implementation.
11173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11177 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11179 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11180 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11181 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11182 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11183 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11185 2003-02-23 Roland McGrath <roland@redhat.com>
11187 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11189 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11191 * Makefile (tests): Add tst-context1.
11192 * tst-context1.c: New file.
11194 * Makefile (tests): Add tst-tls1 and tst-tls2.
11195 * tst-tls1.c: New file.
11196 * tst-tls2.c: New file.
11198 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11199 for failed cmpxchg.
11201 * pthread_create.c (start_thread): Set EXITING_BIT early.
11203 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11204 (THREAD_GETMEM_NC): Likewise.
11206 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11208 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11209 off 3 more bytes by using offset-less instructions when possible.
11211 * Makefile: Add dependency for $(objpfx)version.d.
11213 * eintr.c (eintr_source): Add unnecessary return but the compiler
11216 * tst-kill3.c: Include <unistd.h>.
11218 2003-02-21 Roland McGrath <roland@redhat.com>
11220 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11222 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11224 * Makefile (tests): Add tst-eintr1.
11225 (distribute): Add eintr.c.
11226 * tst-eintr1.c: New file.
11227 * eintr.c: New file.
11229 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11231 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11232 Disallow sending SIGCANCEL.
11234 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11235 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11236 * tst-kill1.c: New file.
11237 * tst-kill2.c: New file.
11238 * tst-kill3.c: New file.
11239 * tst-kill5.c: New file.
11240 * tst-kill6.c: New file.
11241 * tst-basic7.c: Renamed to...
11242 * tst-kill4.c: ...this.
11244 2003-02-21 Roland McGrath <roland@redhat.com>
11246 * Makefile (install-lib-ldscripts): New variable.
11248 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11250 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11251 * pthread_cancel.c: Use INVALID_TD_P.
11252 * pthread_detach.c: Likewise.
11253 * pthread_getschedparam.c: Likewise.
11254 * pthread_setschedparam.c: Likewise.
11255 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11256 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11257 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11258 * pthread_timedjoin.c: Likewise.
11260 * tst-basic7.c: Include <signal.h>.
11262 * pthread_join.c (pthread_join): Limited checking for invalid
11264 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11266 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11268 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11269 beginning of the loop. Clear the entire first block of TSD.
11270 * Makefile (tests): Add tst-key4.
11271 * tst-key4.c: New file.
11273 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11275 * Makefile (tests): Add tst-basic7.
11276 * tst-basic7.c: New file.
11278 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11279 Add some more __builtin_expect.
11281 * pthreadP.h: Define dummy version of DEBUGGING_P.
11283 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11285 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11286 _POSIX_THREAD_PRIORITY_SCHEDULING.
11287 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11288 _XOPEN_REALTIME_THREADS.
11289 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11291 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11292 kernel returns EINVAL for PID <= 0, work around it.
11294 * Makefile (tests): Add tst-signal5.
11295 * tst-signal5.c: New file.
11297 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11298 and LOGIN_NAME_MAX.
11300 * tst-cancel1.c (tf): Block all signals.
11302 * Makefile (tests): Add tst-basic6.
11303 * tst-basic6.c: New file.
11305 * tst-basic1.c: Add test for process ID.
11307 * Makefile (tests): Add tst-cancel10.
11308 * tst-cancel10.c: New file.
11310 * Makefile (tests): Add tst-signal4.
11311 * tst-signal4.c: New file.
11313 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11314 __sigismember instead of sigismember. Add __builtin_expect.
11316 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11318 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11319 pthread_setcancelstate, and pthread_rwlock_setpshared.
11321 * tst-cancel7.c (do_test): Make sure the pid file exists before
11322 canceling the thread.
11324 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11325 pthread_rwlock_timedrdlock tests.
11326 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11327 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11328 Check for invalid tv_nsec field.
11329 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11332 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11333 recursive mutex of overflow.
11335 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11337 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11338 going into an endless loop.
11339 * Makefile (tests): Add tst-cancel9.
11340 * tst-cancel9.c: New file.
11342 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11344 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11346 * tst-mutex5.c (do_test): Add more timedlock tests.
11348 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11349 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11351 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11352 use INLINE_SYSCALL. Error number is returned, not -1.
11354 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11355 and __deallocate_stack with internal_function.
11356 * pthread_create.c: Adjust definitions appropriately.
11357 * allocatestack.c: Likewise.
11359 * pthread_join.c: Add one more __builtin_expect.
11360 * pthread_timedjoin.c: Likewise.
11362 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11363 not data of sequence number does not match.
11364 Add one __builtin_expect.
11366 * Makefile (tests): Add tst-clock1.
11367 * tst-clock1.c: New file.
11369 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11370 negative arguments.
11371 * Makefile (tests): Add tst-basic5.
11372 * tst-basic5.c: New file.
11374 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11376 * Makefile (tests): Add tst-basic4.
11377 * tst-basic4.c: New file.
11379 * pthreadP.h: Add declaraction for __nptl_nthreads.
11380 * pthread_create.c: Define __nptl_nthreads
11381 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11382 after thread is done. If then zero, call exit(0).
11383 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11384 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11385 * init.c (pthread_functions): Initialize ptr_nthreads.
11386 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11387 (__reclaim_stacks): Decrement __nptl_nthreads.
11388 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11390 * Makefile (tests): Add tst-basic3.
11391 * tst-basic3.c: New file.
11393 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11394 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11395 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11396 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11397 if asynchronous canceling is enabled.
11398 * pthread_join.c (pthread_join): When recognizing circular joins,
11399 take into account the other thread might be already canceled.
11400 * Makefile (tests): Add tst-join5.
11401 * tst-join5.c: New file.
11403 * Makefile (tests): Add tst-join4.
11404 * tst-join4.c: New file.
11406 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11408 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11410 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11412 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11413 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11414 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11416 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11418 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11419 error if lll_futex_wake failed.
11421 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11424 handling of cancellation and failung pthread_mutex_unlock call.
11425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11426 * Makefile (tests): Add tst-cond8 and tst-cond9.
11427 * tst-cond8.c: New file.
11428 * tst-cond9.c: New file.
11430 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11432 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11433 non-standard initializers with __USE_GNU.
11435 * Makefile (tests): Add tst-cleanup3.
11436 * tst-cleanup3.c: New file.
11438 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11440 * Makefile (tests): Add tst-attr1 and tst-attr2.
11441 * tst-attr1.c: New file.
11442 * tst-attr2.c: New file.
11444 * Makefile: Add rules to build and run tst-atfork2 test.
11445 * tst-atfork2.c: New file.
11446 * tst-atfork2mod.c: New file.
11448 * sysdeps/unix/sysv/linux/unregister-atfork.c
11449 (__unregister_atfork): Free the memory allocated for the handlers
11450 after removing them from the lists.
11452 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11455 * tst-atfork1.c (do_test): Wait for the child we forked.
11456 Report error in child.
11458 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11460 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11462 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11464 * Makefile (tests): Add tst-cancel8.
11465 * tst-cancel8.c: New file.
11467 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11468 clearing of control variable.
11469 * Makefile (tests): Add tst-once3 and tst-once4.
11470 * tst-once3.c: New file.
11471 * tst-once4.c: New file.
11473 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11475 * sysdeps/sh/Makefile: New file.
11476 * sysdeps/sh/bits/atomic.h: New file.
11477 * sysdeps/sh/pthread_spin_init.c: New file.
11478 * sysdeps/sh/pthread_spin_lock.c: New file.
11479 * sysdeps/sh/pthread_spin_trylock.S: New file.
11480 * sysdeps/sh/pthread_spin_unlock.S: New file.
11481 * sysdeps/sh/pthreaddef.h: New file.
11482 * sysdeps/sh/tcb-offsets.sym: New file.
11483 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11484 * sysdeps/sh/tls.h: New file.
11485 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11486 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11487 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11488 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11489 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11490 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11491 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11492 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11493 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11494 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11495 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11496 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11497 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11498 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11499 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11500 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11501 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11502 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11503 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11504 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11505 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11509 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11510 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11511 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11512 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11513 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11514 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11516 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11518 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11519 according to POSIX.
11521 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11523 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11525 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11526 (TLS_GET_FS): New #define.
11527 (TLS_SET_FS): New #define.
11528 Correct value of __NR_set_thread_area.
11530 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11532 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11534 * Makefile (tests): Add tst-popen1.
11535 * tst-popen1.c: New file.
11537 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11538 but inactive generalization.
11539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11541 Minor optimization, remove one instruction.
11542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11544 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11546 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11548 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11550 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11551 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11552 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11553 * sysdeps/pthread/pthread_cond_signal.c: New file.
11554 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11555 * sysdeps/pthread/pthread_cond_wait.c: New file.
11556 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11557 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11558 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11559 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11560 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11561 * sysdeps/s390/Makefile: New file.
11562 * sysdeps/s390/bits/atomic.h: New file.
11563 * sysdeps/s390/pthread_spin_init.c: New file.
11564 * sysdeps/s390/pthread_spin_lock.c: New file.
11565 * sysdeps/s390/pthread_spin_trylock.c: New file.
11566 * sysdeps/s390/pthread_spin_unlock.c: New file.
11567 * sysdeps/s390/pthreaddef.h: New file.
11568 * sysdeps/s390/tcb-offsets.sym: New file.
11569 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11570 * sysdeps/s390/tls.h: New file.
11571 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11572 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11573 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11574 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11575 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11576 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11577 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11578 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11579 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11580 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11581 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11582 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11583 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11584 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11585 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11586 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11587 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11588 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11589 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11590 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11591 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11592 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11593 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11595 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11597 * atomic.h: Add a couple more default implementations.
11598 (atomic_compare_and_exchange_acq): Use
11599 __arch_compare_and_exchange_32_acq in return value definition. It
11601 (atomic_bit_set): Renamed from atomic_set_bit.
11602 Add missing atomic_ prefixes.
11604 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11605 thread library is available, use correct value to mark initialized
11608 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11610 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11611 __sysconf to determine pagesize.
11613 * pthread_create.c: Include <atomic.h>.
11614 * allocatestack.c (allocate_stack): Implement coloring of the
11615 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11616 size minus one. Adjust users.
11617 * sysdeps/i386/i686/Makefile: New file.
11619 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11621 * allocatestack.c: Improve comment throughout the file.
11623 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11624 (__lll_lock_wait): Add branch prediction.
11625 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11626 (__lll_lock_wait): Likewise.
11627 (lll_unlock_wake_cb): Removed.
11629 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11631 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11632 _POSIX_THREAD_PRIORITY_SCHEDULING.
11634 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11636 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11637 Fix return type of ptr___pthread_getspecific.
11639 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11641 * Makefile (tests): Add tst-umask1.
11642 (tst-umask1-ARGS): Define.
11643 * tst-umask1.c: New file.
11645 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11647 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11648 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11649 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11650 pthread_rwlock_unlock.
11651 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11652 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11653 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11654 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11655 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11657 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11661 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11662 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11664 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11665 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11667 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11668 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11669 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11671 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11672 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11674 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11676 * Makefile (libpthread-routines): Remove lowlevelcond and
11677 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11678 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11679 and pthread_cond_broadcast.
11680 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11681 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11682 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11683 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11684 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11685 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11686 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11687 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11688 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11689 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11694 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11695 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11696 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11697 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11698 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11699 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11700 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11701 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11702 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11703 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11704 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11705 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11706 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11707 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11708 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11709 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11710 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11712 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11713 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11714 of the code is moved to ...
11715 * sysdeps/pthread/createthread.c: ...here. New file.
11717 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11719 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11720 (__new_sem_post): Clear %eax before returning.
11721 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11723 * Makefile (tests): Add tst-cleanup2.
11724 * tst-cleanup2.c: New file.
11726 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11727 Interpret first parameter correctly.
11729 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11731 * Makefile (headers): Add bits/semaphore.h.
11733 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11735 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11738 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11740 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11741 must be used and mapping failed.
11742 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11744 * Makefile (CFLAGS-pthread_self.os): Define this, not
11745 CFLAGS-pthread_self.c.
11747 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11749 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11750 lll_unlock_wake_cb.
11752 * Makefile (libpthread-routines): Add version. Add rules to build
11753 version.os and banner.h.
11754 * version.c: New file.
11756 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11758 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11759 the alias unconditional.
11760 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11762 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11764 * Makefile (CFLAGS-pthread_self.c): New definition.
11766 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11768 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11769 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11770 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11771 * init.c (__pthread_initialize_minimal_internal): Likewise.
11773 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11775 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11777 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11778 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11779 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11780 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11781 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11782 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11784 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11786 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11787 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11788 * tst-cancel-wrappers.sh: Remove all exceptions.
11790 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11792 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11793 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11795 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11796 Use __libc_pthread_functions array if SHARED.
11798 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11799 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11801 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11802 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11803 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11804 __libc_ptf_call instead of __libc_maybe_call.
11805 (PTF): New #define.
11806 (__libc_cleanup_region_start): Wrap function name with PTF call.
11807 (__libc_cleanup_region_end): Likewise.
11808 (__libc_cleanup_end): Likewise.
11810 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11811 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11812 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11813 * pthreadP.h: Add prototypes.
11815 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11816 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11817 __pthread_rwlock_unlock aliases.
11818 * pthreadP.h: Add prototypes for new aliases.
11820 * pthreadP.h (struct pthead_functions): Moved to...
11821 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11822 * init.c (pthread_functions): Add initializers for new elements.
11824 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11825 __pthread_cleanup_pop_restore aliases.
11826 * pthreadP.h: Add prototypes.
11828 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11829 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11830 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11831 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11832 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11833 * pthreadP.h: Adjust prototypes and callers.
11835 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11837 * Makefile (tests): Add tst-cancel7.
11838 (tst-cancel7-ARGS): New variable.
11839 * tst-cancel7.c: New file.
11841 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11842 around gcc defficiencies.
11843 * old_pthread_cond_signal.c: Likewise.
11844 * old_pthread_cond_timedwait.c: Likewise.
11845 * old_pthread_cond_wait.c: Likewise.
11847 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11849 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11851 * Makefile (tests): Add tst-cond7.
11852 * tst-cond7.c: New file.
11854 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11855 (condvar_cleanup): Get condvar address from the right place.
11857 * atomic.h: Correct definitions of atomic_full_barrier,
11858 atomic_read_barrier, atomic_write_barrier.
11860 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11862 * old_pthread_cond_signal.c: Likewise.
11863 * old_pthread_cond_timedwait.c: Likewise.
11864 * old_pthread_cond_wait.c: Likewise.
11866 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11868 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11870 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11872 * pthreadP.h (pthread_cond_2_0_t): New type.
11873 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11874 Use new type for the 2.0 condvar function prototypes.
11875 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11876 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11878 * old_pthread_cond_destroy.c: Likewise.
11879 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11880 * old_pthread_cond_signal.c: Likewise.
11881 * old_pthread_cond_timedwait.c: Likewise.
11882 * old_pthread_cond_wait.c: Likewise.
11884 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11885 (__pthread_cond_wait): Don't save cancellation mode and seq value
11888 * herrno.c (__h_errno_location): Don't define as weak.
11890 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11892 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11893 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11894 and pthread_cond_wait.
11895 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11897 (__pthread_cond_broadcast_2_0): ... this.
11898 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11900 (__pthread_cond_destroy_2_0): ... this.
11901 * old_pthread_cond_init.c (__old_pthread_cond_init):
11903 (__pthread_cond_init_2_0): ... this.
11904 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11906 (__pthread_cond_signal_2_0): ... this.
11907 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11909 (__pthread_cond_wait_2_0): ... this.
11910 * pthread_cond_destroy.c: Include shlib-compat.h.
11911 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11912 * pthread_cond_init.c: Include shlib-compat.h.
11913 (pthread_cond_init): Change strong_alias into versioned_symbol.
11914 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11915 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11917 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11918 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11919 __pthread_cond_wait_2_0): New prototypes.
11920 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11921 __old_pthread_cond_init, __old_pthread_cond_signal,
11922 __old_pthread_cond_wait): Removed.
11923 * init.c: Include shlib-compat.h.
11924 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11925 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11926 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11927 ptr___pthread_cond_*_2_0 fields.
11928 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11929 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11931 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11932 LIBC_SIGACTION was not yet defined.
11933 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11934 [!defined LIBC_SIGACTION] (__sigaction): New function and
11936 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11937 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11939 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11941 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11943 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11945 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11946 New, larger type definition.
11947 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11949 * Versions [libpthread]: Add definitions for new pthread_cond_*
11950 interfaces for version GLIBC_2.3.2.
11951 * pthread_cond_init.c: Update initialization for new type definition.
11952 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11953 pthread_cond_timedwait, pthread_cond_signal, and
11954 pthread_cond_broadcast. Add old_pthread_cond_init,
11955 old_pthread_cond_destroy, old_pthread_cond_wait,
11956 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11957 old_pthread_cond_broadcast.
11958 * old_pthread_cond_broadcast.c: New file.
11959 * old_pthread_cond_destroy.c: New file.
11960 * old_pthread_cond_init.c: New file.
11961 * old_pthread_cond_signal.c: New file.
11962 * old_pthread_cond_timedwait.c: New file.
11963 * old_pthread_cond_wait.c: New file.
11964 * pthreadP.h: Add prototypes for the compatibility interfaces.
11966 * pthread_cond_destroy.c: Don't include <errno.h>.
11968 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11970 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11971 unnecessary zero offset when addressing MUTEX.
11973 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11975 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11977 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11978 for __register_atfork.
11980 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11982 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11983 instead of ASSEMBLER test macro.
11985 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11986 __libc_current_sigrtmax): Add libc_hidden_def.
11988 * sysdeps/pthread/list.h: Remove assert.h include.
11990 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11992 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11993 __pthread_initialize_minimal_internal not
11994 __pthread_initialize_minimal.
11996 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11998 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11999 __pthread_initialize_minimal as hidden.
12001 * init.c (__pthread_initialize_minimal_internal): Don't mark as
12004 2002-12-31 Jakub Jelinek <jakub@redhat.com>
12006 * Makefile ($(inst_libdir)/libpthread.so): Depend on
12007 $(common-objpfx)format.lds, include that into the output script.
12009 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12011 2002-12-28 Andreas Jaeger <aj@suse.de>
12013 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12014 nsec resolution changes.
12015 (xstat64_conv): Likewise.
12016 (xstat32_conv): Likewise.
12017 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12018 struct kernel_stat.
12019 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12020 structs stat and stat64.
12021 * time/time.h (__timespec_defined): Define for __USE_MISC.
12022 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12024 2002-12-30 Jakub Jelinek <jakub@redhat.com>
12026 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
12028 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12029 (pthread_exit): Use strong_alias to avoid warnings.
12030 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12031 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12032 ptr___pthread_attr_init_2_*.
12033 * init.c (pthread_functions): Adjust.
12035 2002-12-29 Ulrich Drepper <drepper@redhat.com>
12037 * forward.c: Make all functions available by default again. It
12038 caused too much trouble.
12040 * pt-siglongjmp.c: Removed.
12042 2002-12-28 Jakub Jelinek <jakub@redhat.com>
12044 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12045 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12046 * sysdeps/i386/Makefile: New file.
12047 * sysdeps/i386/tcb-offsets.sym: New file.
12048 * sysdeps/pthread/tcb-offsets.h: New file.
12049 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12050 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12052 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12053 __register_atfork...
12054 (GLIBC_2.3.2): ...here.
12056 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12058 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12059 pthread_attr_setstackaddr with __attribute_deprecated__.
12061 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12063 * pt-system.c (system): Remove cancellation handling.
12064 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12065 cancellation routines.
12067 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12069 * descr.h: Include <dl-sysdep.h>.
12070 (struct pthread): Move header.data.list to the back of the struct.
12071 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12072 (MULTIPLE_THREADS_OFFSET): Adjust offset.
12073 (SYSINFO_OFFSEET): Likewise.
12075 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12077 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12079 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12080 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12081 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12082 (USE_DL_SYSINFO): Undef.
12084 2002-12-22 Jakub Jelinek <jakub@redhat.com>
12086 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12087 $(common-objpfx)libc.so.
12088 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12089 it is bigger than pipe buffer size even on arches with bigger
12091 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12093 2002-12-25 Ulrich Drepper <drepper@redhat.com>
12095 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12096 correct errno access for case that USE___THREAD is not defined.
12098 2002-12-24 Ulrich Drepper <drepper@redhat.com>
12100 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12101 Patch by Marijn Ros <marijn@mad.scientist.com>.
12103 2002-12-22 Roland McGrath <roland@redhat.com>
12105 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12107 2002-12-20 Ulrich Drepper <drepper@redhat.com>
12109 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12111 2002-12-19 Ulrich Drepper <drepper@redhat.com>
12113 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12114 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12115 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12117 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12119 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12120 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12121 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12122 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12123 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12124 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12125 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12126 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12128 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12130 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12132 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12134 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12136 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12137 that sysinfo is properly initialized.
12138 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12139 to 1 only for ld.so.
12141 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12142 RTLD_CORRECT_DYNAMIC_WEAK.
12144 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12146 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12147 Use return 0 as 6th argument to FORWARD4.
12148 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12150 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12152 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12153 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12154 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12155 (INIT_SYSINFO): New #define.
12156 (TLS_TP_INIT): Use INIT_SYSINFO.
12157 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12158 At test to make sure SYSINFO_OFFSET value is correct.
12159 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12161 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12163 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12164 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12165 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12166 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12167 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12168 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12169 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12171 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12173 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12174 macro instead of using int $0x80 directly.
12176 * sysdeps/pthread/bits/stdio-lock.h: New file.
12177 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12178 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12179 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12180 * Makefile (routines): Add libc-lowlevelmutex.
12182 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12183 __i686.get_pc_thunk.dx.
12185 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12187 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12188 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12189 ($(objpfx)tst-cancel-wrappers.out): New rule.
12190 * tst-cancel-wrappers.sh: New test.
12191 * tst-locale1.c: Include signal.h.
12192 (uselocale): Test static linking of __libc_current_sigrt*.
12194 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12196 * Makefile (tests): Add tst-cancel6.
12197 * tst-cancel6.c: New file
12199 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12201 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12202 Define meaningfully for assembler as well.
12203 * pthreadP.h (struct pthread_functions): Remove
12204 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12205 and ptr_pthread_attr_init_2_1 fields.
12206 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12207 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12208 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12209 (FORWARD3): Define using FORWARD4.
12210 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12212 * pt-system.c: Remove duplicate stdlib.h include.
12214 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12216 * sem_init.c: Define sem_init@GLIBC_2.0.
12217 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12218 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12220 * flockfile.c: Moved to...
12221 * sysdeps/pthread/flockfile.c: ...here. New file.
12222 * funlockfile.c: Moved to...
12223 * sysdeps/pthread/funlockfile.c: ...here. New file.
12224 * ftrylockfile.c: Moved to...
12225 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12227 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12229 * libc-cancellation.c: Guard both function with
12230 #if !defined NOT_IN_libc.
12231 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12232 automatically provided pthread wrappers.
12233 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12234 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12236 * pt-open.c: Removed.
12237 * pt-fcntl.c: Removed.
12238 * pt-fsync.c: Removed.
12239 * pt-lseek.c: Removed.
12240 * pt-msgrcv.c: Removed.
12241 * pt-msgsnd.c: Removed.
12242 * pt-msync.c: Removed.
12243 * pt-nanosleep.c: Removed.
12244 * pt-open64.c: Removed.
12245 * pt-pause.c: Removed.
12246 * pt-pread.c: Removed.
12247 * pt-pread64.c: Removed.
12248 * pt-pwrite.c: Removed.
12249 * pt-pwrite64.c: Removed.
12250 * pt-read.c: Removed.
12251 * pt-recv.c: Removed.
12252 * pt-recvfrom.c: Removed.
12253 * pt-recvmsg.c: Removed.
12254 * pt-send.c: Removed.
12255 * pt-sendto.c: Removed.
12256 * pt-sigtimedwait.c: Removed.
12257 * pt-sigwait.c: Removed.
12258 * pt-wait.c: Removed.
12259 * pt-waitpid.c: Removed.
12260 * pt-write.c: Removed.
12261 * pt-accept.c: Removed.
12262 * pt-close.c: Removed.
12263 * pt-connect.c: Removed.
12264 * pt-lseek64.c: Removed.
12265 * pt-sendmsg.c: Removed.
12266 * pt-tcdrain.c: Removed.
12268 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12270 * init.c (__pthread_initialize_minimal_internal): Renamed from
12271 __pthread_initialize_minimal. Make old name an alias. This
12272 converts a normal relocation into a relative relocation.
12274 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12276 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12277 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12278 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12279 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12280 pt-sigwaitinfo, pt-waitid, and pt-writev.
12281 * pt-creat.c: Removed.
12282 * pt-poll.c: Removed.
12283 * pt-pselect.c: Removed.
12284 * pt-readv.c: Removed.
12285 * pt-select.c: Removed.
12286 * pt-sigpause.c: Removed.
12287 * pt-sigsuspend.c: Removed.
12288 * pt-sigwaitinfo.c: Removed.
12289 * pt-waitid.c: Removed.
12290 * pt-writev.c: Removed.
12292 * init.c (pthread_functions): New variable.
12293 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12294 (or NULL) to __libc_pthread_init.
12295 * forward.c: Rewrite to use __libc:pthread_functions array to get
12296 function addresses.
12297 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12299 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12300 Take new parameter. Copy content of variable pointed to by it
12301 to __libc_pthread_init.
12303 * pthreadP.h (struct pthread_functions): New type.
12304 (__libc_pthread_init): Declare.
12306 * pthread_attr_destroy.c: Add namespace protected alias.
12307 * pthread_attr_getdetachstate.c: Likewise.
12308 * pthread_attr_getinheritsched.c: Likewise.
12309 * pthread_attr_getschedparam.c: Likewise.
12310 * pthread_attr_getschedpolicy.c: Likewise.
12311 * pthread_attr_getscope.c: Likewise.
12312 * pthread_attr_setdetachstate.c: Likewise.
12313 * pthread_attr_setinheritsched.c: Likewise.
12314 * pthread_attr_setschedparam.c: Likewise.
12315 * pthread_attr_setschedpolicy.c: Likewise.
12316 * pthread_attr_setscope.c: Likewise.
12317 * pthread_cond_broadcast.c: Likewise.
12318 * pthread_cond_destroy.c: Likewise.
12319 * pthread_cond_init.c: Likewise.
12320 * pthread_cond_signal.c: Likewise.
12321 * pthread_cond_wait.c: Likewise.
12322 * pthread_condattr_destroy.c: Likewise.
12323 * pthread_condattr_init.c: Likewise.
12324 * pthread_equal.c: Likewise.
12325 * pthread_exit.c: Likewise.
12326 * pthread_getschedparam.c: Likewise.
12327 * pthread_self.c: Likewise.
12328 * pthread_setcancelstate.c: Likewise.
12329 * pthread_setschedparam.c: Likewise.
12330 * pthread_mutex_destroy.c: Likewise.
12331 * pthread_mutex_init.c: Likewise.
12332 * pthreadP.h: Add prototypes for the aliases.
12334 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12335 multiple_threads member in correct TCB to 1.
12337 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12338 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12339 member of thread decriptor, otherwise return unconditionally 1.
12341 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12343 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12344 regular Linux version. Remove file.
12345 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12346 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12347 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12348 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12349 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12350 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12351 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12352 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12353 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12354 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12355 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12356 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12357 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12358 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12359 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12360 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12361 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12362 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12363 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12364 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12365 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12366 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12367 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12368 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12369 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12370 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12371 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12372 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12373 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12374 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12376 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12378 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12379 * sysdeps/unix/sysv/linux/open.c: Removed.
12380 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12381 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12382 * sysdeps/unix/sysv/linux/msync.c: Removed.
12383 * sysdeps/unix/sysv/linux/read.c: Removed.
12384 * sysdeps/unix/sysv/linux/close.c: Removed.
12385 * sysdeps/unix/sysv/linux/creat.c: Removed.
12386 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12387 * sysdeps/unix/sysv/linux/pause.c: Removed.
12388 * sysdeps/unix/sysv/linux/select.c: Removed.
12389 * sysdeps/unix/sysv/linux/write.c: Removed.
12391 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12393 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12394 element in TCB to see whether locking is needed.
12396 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12397 MULTIPLE_THREADS_OFFSET value is correct.
12399 * sysdeps/unix/sysv/linux/close.c: New file.
12400 * sysdeps/unix/sysv/linux/connect.S: New file.
12401 * sysdeps/unix/sysv/linux/creat.c: New file.
12402 * sysdeps/unix/sysv/linux/fsync.c: New file.
12403 * sysdeps/unix/sysv/linux/llseek.c: New file.
12404 * sysdeps/unix/sysv/linux/lseek.c: New file.
12405 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12406 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12407 * sysdeps/unix/sysv/linux/msync.c: New file.
12408 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12409 * sysdeps/unix/sysv/linux/open.c: New file.
12410 * sysdeps/unix/sysv/linux/open64.c: New file.
12411 * sysdeps/unix/sysv/linux/pause.c: New file.
12412 * sysdeps/unix/sysv/linux/poll.c: New file.
12413 * sysdeps/unix/sysv/linux/pread.c: New file.
12414 * sysdeps/unix/sysv/linux/pread64.c: New file.
12415 * sysdeps/unix/sysv/linux/pselect.c: New file.
12416 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12417 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12418 * sysdeps/unix/sysv/linux/readv.c: New file.
12419 * sysdeps/unix/sysv/linux/recv.S: New file.
12420 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12421 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12422 * sysdeps/unix/sysv/linux/select.c: New file.
12423 * sysdeps/unix/sysv/linux/send.S: New file.
12424 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12425 * sysdeps/unix/sysv/linux/sendto.S: New file.
12426 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12427 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12428 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12429 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12430 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12431 * sysdeps/unix/sysv/linux/system.c: New file.
12432 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12433 * sysdeps/unix/sysv/linux/wait.c: New file.
12434 * sysdeps/unix/sysv/linux/waitid.c: New file.
12435 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12436 * sysdeps/unix/sysv/linux/writev.c: New file.
12437 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12439 * pt-readv.c: Fix comment.
12441 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12443 * tst-cleanup1.c: Include stdlib.h.
12445 * tst-cancel5.c: New test.
12446 * Makefile (tests): Add tst-cancel5.
12447 (tst-cancel5): Link against libc.so libpthread.so in that order.
12449 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12451 * forward.c (test_loaded): Prevent recursive calls.
12453 * Makefile (routines): Add libc-cancellation.
12454 * libc-cancellation.c: New file.
12455 * descr.h (struct pthread): Add multiple_threads field.
12456 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12457 new thread descriptor to 1.
12458 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12459 Initialize multiple_thread field after successful thread creation.
12460 * cancellation.c (__do_cancel): Move to pthreadP.h.
12461 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12462 (__pthread_disable_asynccancel): Add internal_function attribute.
12463 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12464 * pthread_setcancelstate.c: Likewise.
12465 * pthread_setcanceltype.c: Likewise.
12466 * pthread_exit.c: Likewise.
12467 * pthreadP.h (CANCELLATION_P): Likewise.
12468 (__do_cancel): Define as static inline.
12469 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12470 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12472 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12473 fields. Define MULTIPLE_THREADS_OFFSET.
12474 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12476 * sysdeps/unix/sysv/linux/accept.S: New file.
12477 * sysdeps/unix/sysv/linux/read.c: New file.
12478 * sysdeps/unix/sysv/linux/write.c: New file.
12479 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12480 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12481 initialization of __libc_locking_needed.
12482 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12483 __libc_locking_needed, use multiple_threads field in TCB.
12484 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12486 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12488 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12490 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12492 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12493 access to __libc_locking_needed for PIC.
12495 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12497 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12498 declare for libc.so.
12499 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12501 (__libc_lock_lock): Put into statement expression.
12502 (__libc_lock_unlock): Remove trailing semicolon.
12503 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12505 2002-12-12 Roland McGrath <roland@redhat.com>
12507 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12508 "m" constraint to refer to __libc_locking_needed. Declare it here.
12510 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12512 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12513 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12514 Initialize __libc_locking_needed.
12515 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12516 instead of __register_pthread_fork_handler.
12517 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12518 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12519 fork-gen with libc_pthread_init.
12520 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12521 of __register_pthread_fork_handler.
12522 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12523 of __register_pthread_fork_handler.
12524 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12525 __libc_locking_needed to determine whether lock prefix can be avoided.
12526 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12528 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12530 * Makefile (tests): Add tst-cleanup1.
12531 * tst-cleanup1.c: New file.
12532 * cancellation.c (__cleanup_thread): Removed.
12533 (__do_cancel): Remove call to __cleanup_thread.
12534 * pthreadP.h: Remove __cleanup_thread prorotype.
12536 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12537 Remember function and argument even if cancellation handler
12538 function is not available.
12539 (__libc_cleanup_region_end): Execute registered function directly if
12540 pthread functions are not available.
12541 (__libc_cleanup_end): Likewise.
12543 * init.c (__pthread_initialize_minimal): Fix initialization in
12544 static lib by preventing gcc from being too clever.
12546 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12548 * init.c (__pthread_initialize_minimal): Remove unneccesary
12551 * Makefile (tests): We can run tst-locale2 now.
12553 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12555 * Versions: Remove duplicated sigwait entry.
12557 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12559 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12562 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12564 * pthreadP.h: Declare __pthread_enable_asynccancel and
12565 __pthread_disable_asynccancel.
12566 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12567 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12568 * cancellation.c (__pthread_enable_asynccancel): New function.
12569 (__pthread_disable_asynccancel): New function.
12570 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12571 * pt-close.c: Likewise.
12572 * pt-connect.c: Likewise.
12573 * pt-creat.c: Likewise.
12574 * pt-fcntl.c: Likewise.
12575 * pt-fsync.c: Likewise.
12576 * pt-lseek.c: Likewise.
12577 * pt-lseek64.c: Likewise.
12578 * pt-msgrcv.c: Likewise.
12579 * pt-msgsnd.c: Likewise.
12580 * pt-msync.c: Likewise.
12581 * pt-nanosleep.c: Likewise.
12582 * pt-open.c: Likewise.
12583 * pt-open64.c: Likewise.
12584 * pt-pause.c: Likewise.
12585 * pt-poll.c: Likewise.
12586 * pt-pread.c: Likewise.
12587 * pt-pread64.c: Likewise.
12588 * pt-pselect.c: Likewise.
12589 * pt-pwrite.c: Likewise.
12590 * pt-pwrite64.c: Likewise.
12591 * pt-read.c: Likewise.
12592 * pt-readv.c: Likewise.
12593 * pt-recv.c: Likewise.
12594 * pt-recvfrom.c: Likewise.
12595 * pt-recvmsg.c: Likewise.
12596 * pt-select.c: Likewise.
12597 * pt-send.c: Likewise.
12598 * pt-sendmsg.c: Likewise.
12599 * pt-sendto.c: Likewise.
12600 * pt-sigpause.c: Likewise.
12601 * pt-sigsuspend.c: Likewise.
12602 * pt-sigtimedwait.c: Likewise.
12603 * pt-sigwait.c: Likewise.
12604 * pt-sigwaitinfo.c: Likewise.
12605 * pt-system.c: Likewise.
12606 * pt-tcdrain.c: Likewise.
12607 * pt-wait.c: Likewise.
12608 * pt-waitid.c: Likewise.
12609 * pt-waitpid.c: Likewise.
12610 * pt-write.c: Likewise.
12611 * pt-writev.c: Likewise.
12612 * pthread_join.c: Likewise.
12613 * pthread_timedjoin.c: Likewise.
12615 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12616 (__xpg_sigpause): New function.
12617 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12619 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12621 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12623 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12624 _GI_pthread_cleanup_pop to pthreadP.h.
12626 * ftrylockfile.c: Use _IO_lock_trylock instead of
12627 pthread_mutex_trylock.
12629 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12630 (CANCEL_RESET): Likewise.
12631 (__pthread_setcanceltype_): Declare.
12632 (__pthread_mutex_lock_internal): Declare.
12633 (__pthread_mutex_unlock_internal): Declare.
12634 (__pthread_once_internal): Declare.
12635 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12636 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12638 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12639 and pthread_mutex_unlock.
12640 * pthread_cond_wait.c: Likewise.
12641 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12642 * pthread_mutex_unlock.c: Likewise.
12644 * pthread_setcanceltype.c: Add additional alias
12645 __pthread_setcanceltype.
12647 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12648 * sem_open.c (sem_open): Likewise.
12649 Use __libc_open, __libc_write, and __libc_close instead of
12650 open, write, and close respectively.
12652 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12653 Rewrite as statement expression since it must return a value.
12655 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12656 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12659 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12660 alias __pthread_once_internal.
12662 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12664 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12666 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12667 * tst-stdio1.c: New file.
12668 * tst-stdio2.c: New file.
12670 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12672 * Makefile (tests): Comment out tst-locale2 for now.
12673 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12675 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12677 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12678 Use _IO_lock_init instead of explicit assignment.
12680 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12681 Define __libc_lock_* and __libc_lock_recursive macros with
12682 lowlevellock macros, not pthread mutexes.
12684 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12685 of pthread_mutex_lock.
12686 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12687 instead of pthread_mutex_unlock.
12689 2002-12-06 Roland McGrath <roland@redhat.com>
12691 * allocatestack.c (__stack_user): Use uninitialized defn.
12692 * init.c (__pthread_initialize_minimal): Initialize it here.
12694 2002-12-05 Roland McGrath <roland@redhat.com>
12696 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12698 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12700 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12701 missing & here too.
12703 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12705 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12707 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12708 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12709 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12710 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12711 for __libc_lock_* macros.
12712 * Makefile (routines): Add libc-lowlevellock.
12714 2002-10-09 Roland McGrath <roland@redhat.com>
12716 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12717 Under [__PIC__], call the function via the pointer fetched for
12718 comparison rather than a call by name that uses the PLT.
12719 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12720 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12721 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12722 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12723 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12725 2002-12-04 Roland McGrath <roland@redhat.com>
12727 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12729 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12730 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12732 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12734 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12736 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12737 a completely opaque, non-integer type.
12738 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12740 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12742 * sysdeps/i386/tls.h: Include stdlib.h.
12743 * sysdeps/x86_64/tls.h: Likewise.
12745 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12747 * Makefile (tests): Add tst-locale2.
12748 (tests-static): Likewise.
12749 * tst-locale2.c: New file.
12751 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12752 volatile and add memory clobbers to lock operations.
12754 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12756 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12757 * sysdeps/i386/i486/bits/atomic.h: New file.
12758 * sysdeps/i386/i586/bits/atomic.h: New file.
12759 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12760 include i486 version.
12761 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12762 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12763 Patch by Marijn Ros <marijn@mad.scientist.com>.
12765 * allocatestack.c (get_cached_stack): Don't crash if we first
12766 found a stack with a larger size then needed.
12767 Reported by Hui Huang <hui.huang@sun.com>.
12769 * Makefile (tests): Add tst-sysconf.
12770 * tst-sysconf.c: New file.
12772 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12773 PTHREAD_THREADS_MAX.
12775 2002-12-02 Roland McGrath <roland@redhat.com>
12777 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12778 Declare using hidden_proto instead of attribute_hidden, so there are
12779 non-.hidden static symbols for gdb to find.
12780 (__pthread_keys): Likewise.
12781 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12782 * allocatestack.c (__stack_user): Likewise.
12783 * pthread_create.c (__pthread_keys): Likewise.
12784 (__nptl_threads_events, __nptl_last_event): Make these static instead
12786 * pthread_key_create.c (__pthread_pthread_keys_max,
12787 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12789 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12791 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12793 * tst-locale1.c: New file.
12795 * pthread_cond_timedwait.c: Include <stdlib.h>.
12797 * Makefile (tests): Add tst-fork2 and tst-fork3.
12798 * tst-fork2.c: New file.
12799 * tst-fork3.c: New file.
12801 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12803 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12805 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12806 require it to 200112L.
12808 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12809 instruction only if HAVE_CMOV is defined.
12810 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12812 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12814 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12816 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12818 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12820 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12822 * sysdeps/x86_64/bits/atomic.h: New file.
12824 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12827 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12828 possible since gettid cannot fail.
12830 * sysdeps/x86_64/pthreaddef.h: New file.
12832 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12834 * sysdeps/x86_64/pthread_spin_init.c: New file.
12835 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12836 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12837 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12839 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12840 Add missing lock prefix. Minute optimization.
12842 * tst-spin2.c (main): Also check successful trylock call.
12844 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12845 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12847 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12848 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12850 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12851 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12852 value in case of an error. Add support for INTERNAL_SYSCALL.
12854 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12855 value in case of an error.
12857 * sysdeps/x86_64/tls.h: New file.
12859 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12861 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12862 takes the array member name and the index as parameters.
12863 (THREAD_SETMEM_NC): Likewise.
12864 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12865 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12868 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12869 to decide which code to use.
12870 (THREAD_SETMEM_NC): Likewise.
12872 * allocatestack.c (queue_stack): Don't remove stack from list here.
12873 Do it in the caller. Correct condition to prematurely terminate
12874 loop to free stacks.
12875 (__deallocate_stack): Remove stack from list here.
12877 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12879 * Makefile (tests): Add tst-stack1.
12880 * tst-stack1.c: New file.
12882 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12885 * pthread_attr_getstack.c: Return bottom of the thread area.
12887 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12889 * Makefile (libpthread-routines): Add pt-allocrtsig and
12890 pthread_kill_other_threads.
12891 * pt-allocrtsig.c: New file.
12892 * pthread_kill_other_threads.c: New file.
12893 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12894 all three functions.
12895 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12897 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12898 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12899 and __libc_allocate_rtsig_private.
12900 * Versions (libpthread): Export pthread_kill_other_threads_np,
12901 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12903 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12905 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12906 the end of the stack. Adjust computations.
12907 When mprotect call fails dequeue stack and free it.
12908 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12910 * pthread_getattr_np.c: Likewise.
12912 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12915 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12917 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12918 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12920 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12922 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12923 * pthread_setspecific.c: Likewise.
12925 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12927 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12928 definitions. Get them from the official place.
12929 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12931 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12932 Use new CLONE_ flags in clone() calls.
12934 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12935 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12937 * Versions: Add pthread_* functions for libc.
12938 * forward.c: New file.
12940 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12942 * herrno.c: New file.
12945 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12946 sem_trywait, and sem_timedwait. Add herrno and res.
12947 * sem_init.c: Don't initialize lock and waiters members.
12948 * sem_open.c: Likewise.
12949 * sem_post.c: Removed.
12950 * sem_wait.c: Removed.
12951 * sem_trywait.c: Removed.
12952 * sem_timedwait.c: Removed.
12953 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12954 Includes full implementations of sem_post, sem_wait, sem_trywait,
12956 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12957 for new implementation.
12958 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12959 and waiters fields.
12961 * tst-sem3.c: Improve error message.
12962 * tst-signal3.c: Likewise.
12964 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12965 to tell the kernel about the termination futex and to initialize tid
12966 member. Don't initialize main_thread.
12967 * descr.h (struct pthread): Remove main_thread member.
12968 * cancelllation.c (__do_cancel): Remove code handling main thread.
12969 The main thread is not special anymore.
12971 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12972 size of the stacks to stack_cache_actsize.
12974 * pt-readv.c: Add missing "defined".
12975 * pt-sigwait.c: Likewise.
12976 * pt-writev.c: Likewise.
12978 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12980 * Versions: Export __connect from libpthread.
12981 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12983 * Makefile (libpthread-routines): Add pt-raise.
12984 * sysdeps/unix/sysv/linux/raise.c: New file.
12985 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12986 * sysdeps/generic/pt-raise.c: New file.
12988 * pthread_cond_init.c: Initialize all data elements of the condvar
12989 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12991 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12992 * pthread_create.c: Likewise.
12994 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12995 * tst-key1.c: New file.
12996 * tst-key2.c: New file.
12997 * tst-key3.c: New file.
12999 * Versions: Export pthread_detach for version GLIBC_2.0.
13000 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13002 2002-11-08 Ulrich Drepper <drepper@redhat.com>
13004 * pthread_key_create.c: Terminate search after an unused key was found.
13005 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13007 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13008 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13010 2002-10-10 Ulrich Drepper <drepper@redhat.com>
13012 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13013 dynamic lookup for errno in PIC.
13015 * allocatestack.c (get_cached_stack): Rearrange code slightly to
13016 release the stack lock as soon as possible.
13017 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13018 the static TLS block.
13019 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13021 * cancellation.c: Renamed from cancelation.c.
13022 * Makefile: Adjust accordingly.
13023 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13024 * cleanup_defer.c: Use CANCELLATION_P.
13025 * pthread_testcancel.c: Likewise.
13026 * descr.h: Fix spelling in comments.
13027 * init.c: Likewise.
13028 * pthread_getattr_np.c: Likewise.
13029 * pthread_getschedparam.c: Likewise.
13030 * pthread_setschedparam.c: Likewise.
13031 * Versions: Likewise.
13033 * pt-pselect.c: New file.
13034 * Makefile (libpthread-routines): Add pt-pselect.
13035 * Versions: Add pselect.
13037 * tst-cancel4.c: New file.
13038 * Makefile (tests): Add tst-cancel4.
13040 2002-10-09 Ulrich Drepper <drepper@redhat.com>
13042 * pthread_mutex_lock.c: Always record lock ownership.
13043 * pthread_mutex_timedlock.c: Likewise.
13044 * pthread_mutex_trylock.c: Likewise.
13046 * pt-readv.c: New file.
13047 * pt-writev.c: New file.
13048 * pt-creat.c: New file.
13049 * pt-msgrcv.c: New file.
13050 * pt-msgsnd.c: New file.
13051 * pt-poll.c: New file.
13052 * pt-select.c: New file.
13053 * pt-sigpause.c: New file.
13054 * pt-sigsuspend.c: New file.
13055 * pt-sigwait.c: New file.
13056 * pt-sigwaitinfo.c: New file.
13057 * pt-waitid.c: New file.
13058 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13059 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13060 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13061 * Versions: Add all the new functions.
13063 * tst-exit1.c: New file.
13064 * Makefile (tests): Add tst-exit1.
13066 * sem_timedwait.c: Minor optimization for more optimal fastpath.
13068 2002-10-08 Ulrich Drepper <drepper@redhat.com>
13070 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13072 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13073 call. pthread_join is an official cancellation point.
13074 * pthread_timedjoin.c: Likewise.
13076 * pthread_cond_wait.c: Revert order in which internal lock are dropped
13077 and the condvar's mutex are retrieved.
13078 * pthread_cond_timedwait.c: Likewise.
13079 Reported by dice@saros.East.Sun.COM.
13081 2002-10-07 Ulrich Drepper <drepper@redhat.com>
13083 * pthreadP.h: Cut out all type definitions and move them...
13084 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
13085 * pthreadP.h: Include <internaltypes.h>.
13087 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13088 performance tweaks.
13090 * sem_trywait.c: Shuffle #includes around to get right order.
13091 * sem_timedwait.c: Likewise.
13092 * sem_post.c: Likewise.
13093 * sem_wait.c: Likewise.
13095 * nptl 0.3 released.
13097 * Makefile (tests): Add tst-signal3.
13098 * tst-signal3.c: New file.
13100 2002-10-05 Ulrich Drepper <drepper@redhat.com>
13102 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13103 the asms modify the sem object.
13104 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13106 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13107 the actual members.
13108 * pthreadP.h (struct sem): New type. Actual semaphore type.
13109 * semaphoreP.h: Include pthreadP.h.
13110 * sem_getvalue.c: Adjust to sem_t change.
13111 * sem_init.c: Likewise.
13112 * sem_open.c: Likewise.
13113 * sem_post.c: Likewise.
13114 * sem_timedwait.c: Likewise.
13115 * sem_trywait.c: Likewise.
13116 * sem_wait.c: Likewise.
13118 2002-10-04 Ulrich Drepper <drepper@redhat.com>
13120 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13121 * tst-basic2.c: New file.
13122 * tst-exec1.c: New file.
13123 * tst-exec2.c: New file.
13124 * tst-exec3.c: New file.
13126 * tst-fork1.c: Remove extra */.
13128 * nptl 0.2 released. The API for IA-32 is complete.