1 2014-02-14 Joseph Myers <joseph@codesourcery.com>
3 * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
4 [$(run-built-tests) = yes] (tests): Depend on
5 $(objpfx)tst-cleanup0-cmp.out.
6 ($(objpfx)tst-cleanup0-cmp.out): New rule.
8 2014-02-10 Ondřej Bílka <neleai@seznam.cz>
10 * allocatestack.c (queue_stack, allocate_stack,
11 __deallocate_stack, __reclaim_stacks): Use glibc_likely instead
13 * cancellation.c (__pthread_enable_asynccancel,
14 __pthread_disable_asynccancel): Likewise.
15 * cleanup_defer.c (__pthread_register_cancel_defer,
16 __pthread_unregister_cancel_restore): Likewise.
17 * cleanup_defer_compat.c (_pthread_cleanup_push_defer,
18 _pthread_cleanup_pop_restore): Likewise.
19 * cond-perf.c (main): Likewise.
20 * nptl-init.c (sigcancel_handler, sighandler_setxid): Likewise.
21 * perf.c (get_clockfreq): Likewise.
22 * pthread_barrier_destroy.c (pthread_barrier_destroy): Likewise.
23 * pthread_barrier_init.c (pthread_barrier_init): Likewise.
24 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
25 * pthread_cond_wait.c (__pthread_cond_wait): Likewise.
26 * pthread_create.c (__free_tcb, start_thread, __pthread_create_2_1):
28 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
29 * pthread_getspecific.c (__pthread_getspecific): Likewise.
30 * pthread_join.c (pthread_join): Likewise.
31 * pthread_key_delete.c (pthread_key_delete): Likewise.
32 * pthread_mutex_init.c (__pthread_mutex_init): Likewise.
33 * pthread_mutex_lock.c (__pthread_mutex_lock,
34 __pthread_mutex_lock_full): Likewise.
35 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
36 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
37 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
38 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
39 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
40 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
41 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
42 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
43 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
44 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
45 * pthread_setspecific.c (__pthread_setspecific): Likewise.
46 * sem_init.c (__new_sem_init): Likewise.
47 * sem_open.c (__where_is_shmfs): Likewise.
48 * sigaction.c: Likewise.
49 * sockperf.c (get_clockfreq): Likewise.
50 * sysdeps/pthread/createthread.c (do_clone, create_thread): Likewise.
51 * sysdeps/pthread/setxid.h: Likewise.
52 * sysdeps/pthread/timer_create.c (timer_create): Likewise.
53 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init,
54 __unwind_freeres, _Unwind_Resume, __gcc_personality_v0,
55 _Unwind_ForcedUnwind): Likewise.
56 * sysdeps/unix/sysv/linux/getpid.c (__getpid): Likewise.
57 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
58 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
59 * sysdeps/unix/sysv/linux/mq_notify.c (mq_notify): Likewise.
60 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
61 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
62 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
63 (__pthread_setaffinity_new): Likewise.
64 * sysdeps/unix/sysv/linux/pthread_sigqueue.c (pthread_sigqueue):
66 * sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
67 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
68 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_robust_trylock,
69 __lll_robust_lock, __lll_cond_lock, __lll_robust_timedlock): Likewise.
70 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (__lll_lock,
71 __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Likewise.
72 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
73 (pthread_barrier_destroy): Likewise.
74 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
75 (pthread_barrier_init): Likewise.
76 * sysdeps/unix/sysv/linux/sparc/sem_init.c (__new_sem_init): Likewise.
77 * sysdeps/unix/sysv/linux/x86_64/timer_create.c (__timer_create_old):
79 * unwind.c (unwind_stop): Likewise.
81 2014-02-08 Mike Frysinger <vapier@gentoo.org>
83 * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
85 2014-02-05 Carlos O'Donell <carlos@redhat.com>
87 * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
88 test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
91 2014-01-23 Stefan Liebler <stli@linux.vnet.ibm.com>
93 * tst-tls7.c: Adjust testcase timeout
95 2014-01-18 H.J. Lu <hongjiu.lu@intel.com>
98 * tst-cancel-wrappers.sh: Remove system.
100 2014-01-11 Paul Pluzhnikov <ppluzhnikov@google.com>
102 * tst-tls7.c (action): New function.
104 * tst-tls7mod.c (action): Move sem_post to caller.
106 2011-12-12 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
108 * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
109 * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
111 2013-12-09 Carlos O'Donell <carlos@redhat.com>
113 * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
114 * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
116 2013-12-09 Andreas Schwab <schwab@suse.de>
119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
120 (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
121 before __condvar_tw_cleanup2 label.
123 2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
125 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
126 (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
127 into our own stack frame instead of the caller's.
128 (PSEUDO): Use them. Use symbolic stack frame offsets.
129 (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
130 (DOCARGS_2, UNDOCARGS_2): Likewise.
131 (DOCARGS_3, UNDOCARGS_3): Likewise.
132 (DOCARGS_4, UNDOCARGS_4): Likewise.
133 (DOCARGS_5, UNDOCARGS_5): Likewise.
134 (DOCARGS_6, UNDOCARGS_6): Likewise.
136 2013-11-26 Ondřej Bílka <neleai@seznam.cz>
138 * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
139 * sysdeps/x86_64/tls.h: Likewise.
141 2013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
144 * Makefile (tst-getpid2-ENV): New variable.
146 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com>
148 * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
150 2013-10-30 Mike Frysinger <vapier@gentoo.org>
152 * sysdeps/pthread/configure.in: Moved to ...
153 * sysdeps/pthread/configure.ac: ... here.
154 * sysdeps/x86_64/configure.in: Moved to ...
155 * sysdeps/x86_64/configure.ac: ... here.
156 * sysdeps/pthread/configure: Regenerated.
157 * sysdeps/x86_64/configure: Likewise.
159 2013-10-04 Maciej W. Rozycki <macro@codesourcery.com>
161 * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
162 from pthread_mutex_init.
164 2013-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
167 * pthread_cond_broadcast.c (__pthread_cond_broadcast)
168 [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
170 * pthread_cond_signal.c (__pthread_cond_signal)
171 [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
173 2013-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
175 * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
176 IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
177 member of the argument.
178 (__libc_lock_trylock_recursive): Likewise.
179 (__libc_lock_unlock_recursive): Likewise.
181 2013-09-04 Joseph Myers <joseph@codesourcery.com>
183 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
184 [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
185 [SHARED && !NO_HIDDEN].
187 2013-09-03 Siddhesh Poyarekar <siddhesh@redhat.com>
190 * tst-cleanup2.c (do_test): New volatile variable RET to
193 2013-08-30 Ondřej Bílka <neleai@seznam.cz>
195 * sysdeps/pthread/pthread.h: Fix typos.
196 * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
197 * tst-cancel4.c: Likewise.
199 2013-08-21 Ondřej Bílka <neleai@seznam.cz>
201 * pthread_getschedparam.c: Fix typos.
202 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
204 2013-07-23 David S. Miller <davem@davemloft.net>
206 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
208 2013-07-22 David S. Miller <davem@davemloft.net>
210 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
212 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
214 * pthread_mutex_lock.c: Fix whitespace.
215 * pthread_mutex_trylock.c: Likewise.
216 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
217 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
218 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
219 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
220 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
221 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
222 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
223 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
224 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
225 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
226 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
227 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
229 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
230 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
231 (elision_init): Don't set __rwlock_rtm_enabled.
232 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
233 Remove __rwlock_rtm_enabled.
235 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
237 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
238 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
240 2013-07-02 Andi Kleen <ak@linux.intel.com>
242 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
243 Check ENABLE_LOCK_ELISION.
245 2013-07-02 Andi Kleen <ak@linux.intel.com>
247 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
248 Disable elision for PTHREAD_MUTEX_DEFAULT.
250 2013-07-02 Andi Kleen <ak@linux.intel.com>
251 Hongjiu Lu <hongjiu.lu@intel.com>
253 * pthread_mutex_lock.c
254 (__pthread_mutex_lock): Add lock elision support.
255 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
256 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
257 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
258 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
259 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
260 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
261 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
262 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
263 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
264 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
265 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
266 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
268 2013-07-02 Andi Kleen <ak@linux.intel.com>
270 * tst-mutex5.c: Include config.h.
271 (do_test): Add checks for ENABLE_LOCK_ELISION.
272 * tst-mutex8.c: Include config.h
273 (tf): Add checks for ENABLE_LOCK_ELISION.
274 (check_type): Likewise.
276 2013-07-02 Andi Kleen <ak@linux.intel.com>
278 * pthreadP.h: Add elision types.
279 (PTHREAD_MUTEX_TYPE_ELISION): Add.
280 * sysdeps/pthread/pthread.h: Add elision initializers.
281 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
282 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
283 (__PTHREAD_SPINS): Add.
285 2013-07-02 Andi Kleen <ak@linux.intel.com>
286 Hongjiu Lu <hongjiu.lu@intel.com>
288 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
289 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
290 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
291 lll_trylock_elision): Add.
292 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
293 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
294 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
295 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
296 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
297 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
298 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
299 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
300 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
301 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
302 lll_trylock_elision): Add.
303 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
304 * elision-conf.h: New file.
306 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
309 * pthread_exit.c: Add reference to pthread_create.
311 2013-06-22 Joseph Myers <joseph@codesourcery.com>
313 * pthread_getattr_default_np.c: Include <string.h>.
315 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
317 * Versions (libpthread): Add GLIBC_2.18.
318 (GLIBC_2.18): Add pthread_setattr_default_np and
319 pthread_getattr_default_np.
320 * allocatestack.c (allocate_stack): Synchronize read from
321 __default_pthread_attr.
322 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
323 * nptl-init.c (__pthread_initialize_minimal_internal):
324 Synchronize write to __default_pthread_attr.
325 * pthreadP.h (__default_pthread_attr_lock): Declare.
326 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
327 Synchronize read from __default_pthread_attr.
328 * pthread_create.c (__pthread_create_2_1): Make a local copy of
329 __default_pthread_attr. Check value of flags in IATTR even if
331 * pthread_getattr_default_np.c: New file.
332 * pthread_setattr_default_np.c: New file.
333 * sysdeps/pthread/pthread.h [__USE_GNU]
334 (pthread_getattr_default_np, pthread_setattr_default_np):
336 * tst-default-attr.c: New test case.
337 * Makefile (libpthread-routines): Add
338 pthread_setattr_default_np and pthread_getattr_default_np.
339 (tests): Add tst-default-attr.
340 * vars.c (__default_pthread_attr_lock): Declare and initialize.
342 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
343 Carlos O'Donell <carlos@redhat.com>
346 * tst-pthread-attr-affinity: New test case.
347 * Makefile (tests): Add it.
348 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
349 (__pthread_attr_getaffinity_new): Copy minimum of source and
350 destination sizes to avoid a buffer overrun.
352 2013-06-10 Carlos O'Donell <carlos@redhat.com>
354 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
355 (lll_futex_wake): Return syscall error.
356 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
357 (lll_futex_wake): Return syscall error.
359 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
361 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
363 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
365 * tst-cond22.c: Fix leading whitespaces.
366 * tst-umask1.c: Likewise.
368 2013-06-06 Joseph Myers <joseph@codesourcery.com>
370 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
372 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
373 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
374 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
375 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
376 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
377 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
378 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
379 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
380 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
381 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
382 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
383 * tst-mutexpp10.c: Likewise.
384 * tst-stackguard1.c: Likewise.
386 2013-05-31 Joseph Myers <joseph@codesourcery.com>
388 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
391 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
393 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
395 * sysdeps/pthread/createthread.c: Likewise.
397 2013-05-14 Andreas Jaeger <aj@suse.de>
400 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
401 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
403 2013-05-09 Andi Kleen <ak@linux.intel.com>
405 * tst-mutex8.c (do_test): Check for ENABLE_PI.
407 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
409 * pthreadP.h (check_sched_policy_attr): New inline function.
410 (check_sched_priority_attr): Likewise.
411 (check_stacksize_attr): Likewise.
412 (__kernel_cpumask_size, __determine_cpumask_size): Declare
414 (check_cpuset_attr): New inline function.
415 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
416 Use check_sched_priority_attr.
417 * pthread_attr_setschedpolicy.c
418 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
419 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
420 check_stacksize_attr.
421 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
423 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
424 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
426 2013-04-11 Andreas Schwab <schwab@suse.de>
428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
429 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
430 directly use absolute timeout.
432 2013-04-07 Carlos O'Donell <carlos@redhat.com>
434 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
436 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
439 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
441 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
442 __pthread_unwind hidden.
444 2013-03-28 Roland McGrath <roland@hack.frob.com>
446 * pthread_create.c (start_thread) [!SHARED]:
447 Call __call_tls_dtors only if it's not NULL.
449 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
451 * allocatestack.c (allocate_stack): Use __default_pthread_attr
452 instead of __default_stacksize.
453 * nptl-init.c (__pthread_initialize_minimal_internal):
454 Likewise. Initialize guardsize.
455 * pthreadP.h (__default_pthread_attr): Declare.
456 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
457 Use __default_pthread_attr instead of __default_stacksize.
458 * pthread_create.c (default_attr): Remove.
459 (__pthread_create_2_1): Use __default_pthread_attr instead of
461 * vars.c (__default_stacksize): Remove.
462 (__default_pthread_attr): New static variable to store
463 default thread attributes.
465 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
467 * pthread_barrier_init.c (default_attr): Rename to
469 (pthread_barrier_init): Adjust for the rename.
470 * pthread_mutex_init.c (default_attr): Rename to
472 (__pthread_mutex_init): Adjust for the rename.
473 * pthread_rwlock_init.c (default_attr): Rebane to
475 (__pthread_rwlock_init): Adjust for the rename.
477 2013-03-12 Carlos O'Donell <carlos@redhat.com>
479 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
481 2013-03-04 Roland McGrath <roland@hack.frob.com>
483 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
484 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
486 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
487 (RTLD_PRIVATE_ERRNO): Likewise.
488 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
489 Move macros and associated declaration to ...
490 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
491 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
494 2013-03-01 Carlos O'Donell <carlos@redhat.com>
496 * Makefile (tests): Revert last change.
497 (tst-pthread-stack-env-ENV): Likewise.
498 * nptl-init.c (set_default_stacksize): Likewise.
499 (__pthread_initialize_minimal_internal): Likewise.
500 * tst-pthread-stack-env.c: Likewise.
502 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
504 * tst-oddstacklimit.c: Include stdlib.h.
506 * Makefile (tests): Add tst-pthread-stack-env.
507 (tst-pthread-stack-env-ENV): Set environment for test.
508 * nptl-init.c (set_default_stacksize): New function.
509 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
510 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
511 * tst-pthread-stack-env.c: New test case.
513 2013-02-21 David S. Miller <davem@davemloft.net>
515 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
516 (FUTEX_WAIT_REQUEUE_PI): Define.
517 (FUTEX_CMP_REQUEUE_PI): Likewise.
518 (lll_futex_wait_requeue_pi): Likewise.
519 (lll_futex_timed_wait_requeue_pi): Likewise.
520 (lll_futex_cmp_requeue_pi): Likewise.
522 2013-02-21 Carlos O'Donell <carlos@redhat.com>
524 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
526 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
528 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
530 * tst-barrier4.c: Likewise.
531 * tst-robust7.c: Likewise.
534 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
536 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
537 PI-aware futex operations if available and mutex is PI-aware.
538 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
539 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
541 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
542 cancellation occurred just after futex returned successfully
543 from a PI operation with the mutex held.
544 (__pthread_cond_wait): Use PI-aware futex operations if
545 available and mutex is PI-aware.
546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
547 (FUTEX_WAIT_REQUEUE_PI): Define.
548 (FUTEX_CMP_REQUEUE_PI): Likewise.
549 (lll_futex_wait_requeue_pi): Likewise.
550 (lll_futex_timed_wait_requeue_pi): Likewise.
551 (lll_futex_cmp_requeue_pi): Likewise.
552 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
553 (FUTEX_WAIT_REQUEUE_PI): Define.
554 (FUTEX_CMP_REQUEUE_PI): Likewise.
555 (lll_futex_wait_requeue_pi): Likewise.
556 (lll_futex_timed_wait_requeue_pi): Likewise.
557 (lll_futex_cmp_requeue_pi): Likewise.
558 * sysdeps/unix/sysv/linux/kernel-features.h: Define
559 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
561 2013-02-04 Andreas Schwab <schwab@suse.de>
564 * tst-cancel14.c: Include <sys/time.h>.
565 * tst-cancel15.c: Likewise.
566 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
567 * tst-stackguard1.c: Include <tls.h>
569 2013-01-16 Andreas Schwab <schwab@suse.de>
572 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
574 2013-01-11 Carlos O'Donell <codonell@redhat.com>
576 * allocatestack.c (allocate_stack): Add comment. Remove assert
579 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
581 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
582 with $(host-test-program-cmd).
583 (tst-exec4-ARGS): Likewise.
584 (tst-stackguard1-ARGS): Likewise.
585 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
586 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
587 * tst-tls6.sh (elf_objpfx): Removed.
588 (rtld_installed_name): Renamed to ...
589 (test_via_rtld_prefix): This.
590 (tst_tls5): Prepend ${test_via_rtld_prefix}.
592 2013-01-02 Joseph Myers <joseph@codesourcery.com>
594 * All files with FSF copyright notices: Update copyright dates
595 using scripts/update-copyrights.
597 2013-01-01 Joseph Myers <joseph@codesourcery.com>
599 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
602 2012-12-28 Andi Kleen <ak@linux.intel.com>
604 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
606 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
609 2012-12-27 David S. Miller <davem@davemloft.net>
611 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
612 (lll_futex_timed_wait_bitset): New macro.
614 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
616 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
618 (lll_futex_timed_wait): Replace assembly code with
620 (lll_futex_timed_wait_bitset): Likewise.
621 (lll_futex_wake): Likewise.
622 (lll_futex_requeue): Likewise.
623 (lll_futex_wake_unlock): Likewise.
625 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
627 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
628 Declare LOCAL_VAR as char.
630 2012-12-04 Joseph Myers <joseph@codesourcery.com>
632 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
633 Cast result of atomic_increment_val to (void) instead of storing
634 in otherwise-unused variable.
636 2012-12-03 Allan McRae <allan@archlinux.org>
638 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
640 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
642 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
644 * sysdeps/i386/tls.h: Include <libc-internal.h>.
645 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
646 (THREAD_SETMEM_NC): Likewise.
647 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
648 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
649 (THREAD_SETMEM_NC): Likewise.
651 2012-11-21 Joseph Myers <joseph@codesourcery.com>
653 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
654 of atomic_increment_val to (void) instead of storing in
655 otherwise-unused variable.
657 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
658 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
659 instead of storing in otherwise-unused variable.
661 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
663 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
664 (CFLAGS-recv.c, CFLAGS-send.c): Define.
666 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
668 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
669 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
671 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
673 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
674 if absolute timeout is negative.
675 [__ASSUME_FUTEX_CLOCK_REALTIME &&
676 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
677 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
679 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
681 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
682 (__lll_robust_timedlock_wait): Likewise.
683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
684 (lll_futex_timed_wait_bitset): New macro.
685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
686 (lll_futex_timed_wait_bitset): Likewise.
688 2012-11-03 David S. Miller <davem@davemloft.net>
690 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
692 (__cpu_relax): Likewise.
694 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
696 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
697 (__128bits): New struct typedef.
698 (tcbhead_t): Replace __m128 with __128bits.
700 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
701 Joseph Myers <joseph@codesourcery.com>
703 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
705 2012-10-28 David S. Miller <davem@davemloft.net>
707 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
708 Define when we have v9 instructions available.
709 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
710 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
712 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
714 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
715 to libpthread-routines.
717 2012-10-25 Roland McGrath <roland@hack.frob.com>
719 * tst-cond-except.c (TEST_FUNCTION): New macro.
721 2012-10-25 Joseph Myers <joseph@codesourcery.com>
723 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
725 * tst-tls6.sh: Use /bin/bash not /bin/sh.
727 2012-10-25 Roland McGrath <roland@hack.frob.com>
729 * tst-basic2.c (do_test): Return RESULT, not always zero.
731 * tst-cond25.c: Include <stdint.h>
732 (waiter): Add casts to uintptr_t between casting integer<->pointer.
733 (timed_waiter): Likewise.
734 (do_test_wait): Likewise.
735 * tst-cond-except.c (thr): Likewise.
736 (do_test): Use prototype definition.
738 2012-10-24 Joseph Myers <joseph@codesourcery.com>
739 Jim Blandy <jimb@codesourcery.com>
741 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
743 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
744 programs with LD_PRELOAD set.
746 2012-10-24 Roland McGrath <roland@hack.frob.com>
748 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
749 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
750 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
751 ($(objpfx)tst-rwlock14): Likewise.
753 2012-10-24 Joseph Myers <joseph@codesourcery.com>
755 * Makefile (tests): Remove tst-oddstacklimit.
756 (test-srcs): New variable.
757 (tst-oddstacklimit-ENV): Remove.
758 [$(run-built-tests) = yes] (tests): Depend on
759 $(objpfx)tst-oddstacklimit.out.
760 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
762 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
763 setrlimit before executing tst-basic1 test passed to --command.
765 2012-10-23 Joseph Myers <joseph@codesourcery.com>
767 * Makefile [$(cross-compiling) = no]: Change condition to
768 [$(run-built-tests) = yes].
770 2012-10-23 Jim Blandy <jimb@codesourcery.com>
771 Joseph Myers <joseph@codesourcery.com>
773 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
774 (tst-exec4-ARGS): Likewise.
775 (tst-stackguard1-ARGS): Likewise.
777 2012-10-21 Jim Blandy <jimb@codesourcery.com>
778 Joseph Myers <joseph@codesourcery.com>
780 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
781 tst-cancel-wrappers.sh.
782 * tst-cancel-wrappers.sh: Use nm program given as first argument,
785 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
787 * tst-cond25.c (do_test_wait): Don't check for return value from
790 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
793 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
794 (__condvar_tw_cleanup): Adjust the mutex data structure if it
795 was locked by FUTEX_WAIT_REQUEUE_PI.
796 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
797 (__condvar_w_cleanup): Likewise.
798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
799 (__condvar_cleanup2): Likewise.
800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
801 (__condvar_cleanup1): Likewise.
803 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
805 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
806 defined __EXCEPTIONS) && defined __USE_GNU]
807 (pthread_cleanup_push_defer_np): Fix formatting.
809 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
812 * Makefile (tests): New test case tst-cond25.
813 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
814 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
815 (__condvar_tw_cleanup): Lock mutex only if we don't already
817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
818 (__condvar_w_cleanup): Likewise.
819 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
821 (__condvar_cleanup2): Lock mutex only if we don't already
823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
824 (__condvar_cleanup1): Likewise.
825 * tst-cond25.c: New test case.
827 2012-10-09 Roland McGrath <roland@hack.frob.com>
829 * sysdeps/pthread/configure: Regenerated.
830 * sysdeps/x86_64/configure: Regenerated.
832 2012-10-05 David S. Miller <davem@davemloft.net>
835 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
836 (DB_THREAD_SELF): Use constants for the register offsets. Correct
837 the case of a 64-bit debugger with a 32-bit inferior.
839 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
842 * Makefile (tests-static): Add tst-cancel24-static,
843 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
844 tst-sem11-static and tst-sem12-static.
846 (LDLIBS-tst-cancel24-static): New macro.
847 * tst-cancel24-static.cc: New file.
848 * tst-cond8-static.c: Likewise.
849 * tst-mutex8-static.c: Likewise.
850 * tst-mutexpi8-static.c: Likewise.
851 * tst-sem11-static.c: Likewise.
852 * tst-sem12-static.c: Likewise.
854 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
857 * Makefile (tests): New test case tst-cond24.
858 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
860 (__pthread_cond_timedwait): Unlock mutex before going back to
862 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
863 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
864 return from futex_wait.
865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
866 (__pthread_cond_timedwait): Unlock mutex before going back to
867 wait in PI case. Set requeue_pi flag only if wait returned 0.
868 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
869 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
870 return from futex_wait.
871 * tst-cond24.c: New test case.
873 2012-10-04 Roland McGrath <roland@hack.frob.com>
875 * pthread_create.c (start_thread): Use __madvise, not madvise.
877 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
879 * sysdeps/i386/tls.h: Update copyright years.
881 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
883 * pthread_create.c (start_thread): Fix clone flag name in
884 comment to CLONE_CHILD_CLEARTID.
885 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
886 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
887 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
888 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
889 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
890 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
892 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
895 * Makefile (tests): Add tst-cond-except.
896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
897 (__pthread_cond_timedwait): Mark instructions where %ebx is
898 incremented in PI case.
899 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
900 for the marked PI case instructions.
901 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
902 (__pthread_cond_wait): Mark instructions where %ebx is
903 incremented in PI case.
904 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
905 for the marked PI case instructions.
906 * tst-cond-except.c: New test case.
908 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
910 * tst-tls6.sh: Add "set -e".
911 * Makefile: Do not specify -e option when running testsuite
914 * tst-tls6.sh: Add copyright header.
916 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
918 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
919 to uint64_t for 64-bit store.
920 (THREAD_SETMEM_NC): Likewise.
922 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
924 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
926 (THREAD_SETMEM_NC): Likewise.
928 2012-09-14 Jeff Law <law@redhat.com>
931 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
933 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
936 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
939 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
941 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
942 (LDLIBS-tst-cancel24): This.
944 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
947 * Makefile (tests-static): Add tst-cancel21-static.
949 * tst-cancel21-static.c: New file.
951 2012-09-01 Joseph Myers <joseph@codesourcery.com>
953 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
954 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
955 [__NR_clock_getres]: Make code unconditional.
956 (pthread_getcpuclockid): Remove code left unreachable by removal
959 2012-08-31 Joseph Myers <joseph@codesourcery.com>
962 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
963 atomic_compare_and_exchange_bool_rel.
964 * tst-sem14.c: New file.
965 * Makefile (tests): Add tst-sem14.
967 2012-08-15 Roland McGrath <roland@hack.frob.com>
969 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
971 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
972 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
974 2012-08-16 Joseph Myers <joseph@codesourcery.com>
976 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
977 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
978 * pthread_condattr_setclock.c (pthread_condattr_setclock)
979 [!__ASSUME_POSIX_TIMERS]: Likewise.
980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
981 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
982 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
983 [!__ASSUME_POSIX_TIMERS]: Likewise.
984 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
985 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
986 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
988 [!__NR-timer_create]: Remove conditional code.
989 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
990 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
992 [!__NR_timer_delete]: Remove conditional code.
993 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
994 * sysdeps/unix/sysv/linux/timer_getoverr.c
995 [__NR_timer_getoverrun]: Make code unconditional.
996 [!__NR_timer_getoverrun]: Remove conditional code.
997 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
998 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
999 Make code unconditional.
1000 [!__NR_timer_gettime]: Remove conditional code.
1001 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1002 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
1003 Make code unconditional.
1004 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
1005 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
1006 Make code unconditional.
1007 [!__NR_timer_settime]: Remove conditional code.
1008 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1009 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1010 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
1013 2012-08-15 Tom de Vries <vries@codesourcery.com>
1014 Maxim Kuvyrkov <maxim@codesourcery.com>
1016 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
1017 (__libc_lock_trylock): Allow pre-existing definitions.
1019 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
1021 * pthread_spin_lock.c: New file.
1022 * pthread_spin_trylock.c: New file.
1024 2012-08-08 Joseph Myers <joseph@codesourcery.com>
1026 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
1028 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
1029 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
1031 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
1032 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
1033 Make code unconditional.
1034 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
1035 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
1036 __NR_tgkill]: Make code unconditional.
1037 (raise) [__ASSUME_TGKILL]: Likewise.
1038 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1039 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
1040 [__ASSUME_TGKILL]: Make code unconditional.
1041 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
1042 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
1043 __NR_tgkill]: Make code unconditional.
1044 (raise) [__ASSUME_TGKILL]: Likewise.
1045 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1047 2012-08-07 Joseph Myers <joseph@codesourcery.com>
1049 * sysdeps/pthread/createthread.c (create_thread)
1050 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
1052 2012-08-03 Joseph Myers <joseph@codesourcery.com>
1054 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
1056 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
1058 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
1060 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
1061 (pagesize): New static variable.
1062 (allocate_and_test): Return MEM. Rename parameter to TARGET.
1063 (check_stack_top): New local variables MEM and PAGEMASK. Cap
1064 stack size to MAX_STACK_SIZE. Call allocate_and_test for
1065 halfway up the stack top page. Verify that the top page was
1067 (do_test): Get pagesize using sysconf.
1069 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
1071 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
1073 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
1074 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
1077 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
1079 * tst-pthread-getattr.c: Revert last change.
1081 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1083 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1086 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
1088 (check_stack_top): Read valued written into STACKADDR in
1089 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
1091 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
1093 * nptl-init.c (sighandler_setxid): Fix the comment that
1096 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
1098 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1099 (__lll_robust_timedlock_wait): Simplify CFI directives.
1101 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1104 * Makefile (tests): Add test case.
1105 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1106 the __libc_stack_end page from stacksize. Truncate stacksize to
1107 make it page aligned when it is computed from RLIMIT_STACK.
1108 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1111 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
1114 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1117 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
1118 Jakub Jelinek <jakub@redhat.com>
1121 * sysdeps/pthread/pthread.h
1122 [!(defined __GNUC__ && defined __EXCEPTIONS)]
1123 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1124 __libc_unlikely instead of __builtin_expect.
1126 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
1129 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1130 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1131 * sysdeps/unix/sysv/linux/i386/Implies: New file.
1132 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1133 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1135 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1136 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1138 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1140 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
1143 * nptl-init.c (pthread_functions): Remove use of INTUSE and
1145 (__pthread_initialize_minimal_internal): Likewise.
1146 * sem_open.c: Likewise.
1147 * sem_unlink.c: Likewise.
1148 * pthreadP.h: Replace _internal aliases by hidden_proto
1150 * pthread_getspecific.c: Replace _internal alias by hidden_def.
1151 * pthread_key_create.c: Likewise.
1152 * pthread_mutex_destroy.c: Likewise.
1153 * pthread_mutex_init.c: Likewise.
1154 * pthread_mutex_lock.c: Likewise.
1155 * pthread_mutex_unlock.c: Likewise.
1156 * pthread_once.c: Likewise.
1157 * pthread_rwlock_rdlock.c: Likewise.
1158 * pthread_rwlock_unlock.c: Likewise.
1159 * pthread_rwlock_wrlock.c: Likewise.
1160 * pthread_setspecific.c: Likewise.
1161 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1163 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1165 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1167 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1168 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1169 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1170 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1171 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1172 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1173 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1174 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1175 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1176 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1178 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1180 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1183 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
1185 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1186 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1188 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1189 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1191 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1192 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1193 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1194 (pthread_barrier_wait): Likewise.
1195 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1196 (__pthread_cond_broadcast): Likewise.
1197 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1198 (__pthread_cond_signal): Likewise.
1199 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1200 (__pthread_cond_timedwait): Likewise.
1201 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1204 (__pthread_rwlock_rdlock): Likewise.
1205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1206 (pthread_rwlock_timedrdlock): Likewise.
1207 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1208 (pthread_rwlock_timedwrlock): Likewise.
1209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1210 (__pthread_rwlock_unlock): Likewise.
1211 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1212 (__pthread_rwlock_wrlock): Likewise.
1213 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1214 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1215 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1217 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1219 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1222 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1223 __libc_stack_end rounded to the end of containing page as the
1226 2012-05-25 Rayson Ho <rho@redhat.com>
1228 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1230 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1231 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1236 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1237 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1239 2012-05-25 Rayson Ho <rho@redhat.com>
1240 Roland McGrath <roland@hack.frob.com>
1242 * DESIGN-systemtap-probes.txt: New file.
1243 * pthread_cond_broadcast.c: SystemTap probes.
1244 * pthread_cond_init.c: Likewise.
1245 * pthread_cond_signal.c: Likewise.
1246 * pthread_cond_wait.c: Likewise.
1247 * pthread_cond_destroy.c: Likewise.
1248 * pthread_create.c: Likewise.
1249 * pthread_join.c: Likewise.
1250 * pthread_mutex_destroy.c: Likewise.
1251 * pthread_mutex_init.c: Likewise.
1252 * pthread_mutex_lock.c: Likewise.
1253 * pthread_mutex_timedlock.c: Likewise.
1254 * pthread_mutex_unlock.c: Likewise.
1255 * pthread_rwlock_destroy.c: Likewise.
1256 * pthread_rwlock_rdlock.c: Likewise.
1257 * pthread_rwlock_unlock.c: Likewise.
1258 * pthread_rwlock_wrlock.c: Likewise.
1259 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1260 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1265 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1266 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1268 2012-05-24 Roland McGrath <roland@hack.frob.com>
1270 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1272 2012-05-17 Andreas Jaeger <aj@suse.de>
1274 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1275 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1276 only for older kernels.
1278 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1280 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1283 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1285 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1286 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1287 (lll_robust_lock): Likewise.
1288 (lll_cond_lock): Likewise.
1289 (lll_robust_cond_lock): Likewise.
1290 (lll_timedlock): Likewise.
1291 (lll_robust_timedlock): Likewise.
1292 (lll_unlock): Likewise.
1293 (lll_robust_unlock): Likewise.
1295 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1298 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1300 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1302 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1304 (__gcc_personality_v0): Replace 8-byte data alignment with
1305 LP_SIZE alignment and .quad with ASM_ADDR.
1307 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1309 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1311 (__gcc_personality_v0): Replace 8-byte data alignment with
1312 LP_SIZE alignment and .quad with ASM_ADDR.
1314 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1316 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1317 NWAITERS, which is unsigned long int.
1319 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1321 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1322 (__gcc_personality_v0): Replace 8-byte data alignment with
1323 LP_SIZE alignment and .quad with ASM_ADDR.
1325 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1328 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1329 __vdso_clock_gettime pointer into RAX_LP.
1330 (__gcc_personality_v0): Replace 8-byte data alignment with
1331 LP_SIZE alignment and .quad with ASM_ADDR.
1333 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1336 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1337 __vdso_clock_gettime pointer into RAX_LP.
1338 (__gcc_personality_v0): Replace 8-byte data alignment with
1339 LP_SIZE alignment and .quad with ASM_ADDR.
1341 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1344 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1346 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1348 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1349 to update pointer in memory. Load pointer into RDI_LP.
1351 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1354 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1356 (LLL_STUB_UNWIND_INFO_END): Likewise.
1357 (lll_timedlock): Load timeout pointer into RDX_LP.
1358 (lll_robust_timedlock): Likewise.
1360 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1361 Jakub Jelinek <jakub@redhat.com>
1364 * Makefile (tests): Add test cases.
1365 * descr.h (struct pthread): Add a comment describing multiple_threads.
1366 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1367 single-process case.
1368 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1369 before setting cancelstate of the thread.
1370 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1371 (__libc_multiple_threads): Add explanatory comment.
1372 * tst-cancel-self-cancelstate.c: New test case.
1373 * tst-cancel-self-canceltype.c: Likewise.
1374 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1375 * tst-cancel-self-testcancel.c: New test case.
1376 * tst-cancel-self.c: Likewise.
1377 * vars.c: Expand comment to include single-process case.
1379 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1381 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1382 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1385 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1387 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1389 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1390 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1392 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1394 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1395 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1396 * sysdeps/x86_64/x32/shlib-versions: New file.
1398 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1400 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1401 __SIZEOF_PTHREAD_XXX_T.
1402 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1403 (pthread_mutex_t): Likewise.
1404 (pthread_rwlock_t): Likewise.
1405 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1408 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1410 * sysdeps/x86_64/x32/tls.h: New file.
1412 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1414 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1416 (THREAD_SETMEM_NC): Likewise.
1418 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1420 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1423 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1425 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1426 (__cleanup_fct_attribute): Check __x86_64__ instead of
1429 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1431 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1432 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1433 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1434 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1435 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1437 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1439 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1440 instead of __WORDSIZE.
1442 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1445 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1447 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1449 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1450 (__pthread_cond_timedwait): Use CFI directives.
1451 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1452 (__pthread_cond_wait): Likewise.
1453 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1454 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1456 2012-05-03 David S. Miller <davem@davemloft.net>
1458 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1459 always have to return 0, especially for the pthread_spin_init
1461 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1463 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1464 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1466 2012-05-02 David S. Miller <davem@davemloft.net>
1468 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1469 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1470 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1471 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1472 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1473 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1474 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1475 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1476 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1477 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1478 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1479 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1480 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1481 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1482 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1483 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1484 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1485 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1487 2012-05-02 Allan McRae <allan@archlinux.org>
1489 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1490 (LDFLAGS-tst-cancel24): Likewise.
1492 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1494 * sysdeps/i386/pthread_spin_lock.S: New.
1495 * sysdeps/i386/pthread_spin_lock.c: Delete.
1496 * sysdeps/x86_64/pthread_spin_lock.S: New.
1497 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1499 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1501 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1502 run when cross-compiling.
1504 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1506 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1507 instead of libgcc_s.h.
1509 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1511 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1513 2012-03-27 David S. Miller <davem@davemloft.net>
1515 * tst-cond16.c (do_test): Use a thread stack size which is either
1516 PTHREAD_STACK_MIN or the page size, whichever is larger.
1517 * tst-cond18.c (do_test): Likewise.
1519 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1521 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1522 register char * __asm__("rsp") to get stack frame.
1524 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1526 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1527 __NR_futex directly.
1529 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1531 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1534 2012-03-16 David S. Miller <davem@davemloft.net>
1537 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1539 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1542 2012-03-15 David S. Miller <davem@davemloft.net>
1545 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1547 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1550 * pt-crti.S: Replace FSF snail mail address with URL.
1552 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1554 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1555 Do not define before including <time.h>.
1557 2012-03-08 David S. Miller <davem@davemloft.net>
1559 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1561 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1563 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1564 Check for timestamp before the Epoch.
1566 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1569 * tst-sem13.c (do_test): Add another test case.
1570 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1571 Fix updating nwaiters.
1573 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1576 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1577 link test to a compile test.
1578 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1580 * sysdeps/pthread/configure: Regenerated.
1582 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1584 * Makefile (distribute): Remove variable.
1586 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1588 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1589 superfluous assignment.
1590 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1592 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1593 (sem_timedwait): Likewise.
1595 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1597 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1598 installed headers to...
1599 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1601 2012-03-06 David S. Miller <davem@davemloft.net>
1603 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1604 atomic_increment and remove unused local variable.
1605 (__old_sem_post): Likewise.
1607 2012-02-27 David S. Miller <davem@davemloft.net>
1609 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1610 non-existing __pthread_attr.
1611 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1612 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1613 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1614 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1615 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1617 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1619 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1621 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1623 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1625 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1626 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1627 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1628 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1629 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1631 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1634 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1636 [crti.S not in sysdirs] (omit-deps): Do not append.
1637 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1638 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1639 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1640 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1641 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1642 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1643 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1644 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1645 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1647 * sysdeps/pthread/pt-initfini.c: Remove file.
1649 2012-02-16 Richard Henderson <rth@twiddle.net>
1651 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1652 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1654 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1656 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1658 2012-02-16 David S. Miller <davem@davemloft.net>
1660 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1662 2012-02-15 Marek Polacek <polacek@redhat.com>
1664 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1666 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1668 Replace FSF snail mail address with URLs, as per GNU coding standards.
1670 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1672 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1674 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1676 Support crti.S and crtn.S provided directly by architectures.
1677 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1678 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1679 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1680 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1681 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1682 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1683 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1684 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1685 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1686 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1687 * pt-crti.S: New file.
1688 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1690 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1693 macros for PIC register setup.
1694 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1695 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1696 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1697 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1698 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1700 2012-01-11 Marek Polacek <polacek@redhat.com>
1702 * forward.c (FORWARD_NORETURN): Define macro.
1703 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1704 (__pthread_exit): Likewise.
1706 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1708 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1710 * pthreadP.h: Add noreturn to __pthread_exit.
1711 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1713 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1715 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1716 Call pthread_attr_setstacksize() with result of
1717 __pthread_get_minstack() to account for application TLS usage.
1719 2012-01-08 Marek Polacek <polacek@redhat.com>
1721 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1723 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1726 * pthreadP.h: Use const instead of __const.
1727 * semaphore.h: Likewise.
1728 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1729 * sysdeps/pthread/bits/sigthread.h: Likewise.
1730 * sysdeps/pthread/pthread.h: Likewise.
1732 * Makefile: Remove elf=yes test, only ELF is supported.
1734 * shlib-versions: Remove entries for ports architectures.
1736 In case anyone cares, the IA-64 architecture could move to ports.
1737 * sysdeps/ia64/*: Removed.
1738 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1740 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1742 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1743 __pthread_get_minstack.
1744 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1747 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1748 through __pthread_get_minstack.
1749 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1750 directly from _rtld_global_ro.
1751 (__pthread_get_minstack): New function.
1752 * pthreadP.h: Declare __pthread_get_minstack.
1753 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1755 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1758 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1759 Correct reading name from file.
1761 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1763 * allocatestack.c (allocate_stack): Return errno on failure.
1765 2011-12-14 Jeff Law <law@redhat.com>
1768 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1770 2011-11-28 Andreas Schwab <schwab@redhat.com>
1772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1773 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1776 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1778 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1781 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1785 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1786 path for kernels with FUTEX_CLOCK_REALTIME.
1787 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1789 2011-10-27 Andreas Schwab <schwab@redhat.com>
1792 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1793 for memory synchronization functions.
1794 * semaphore.h: Likewise.
1796 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1798 * tst-cancel7.c: Avoid warning.
1799 * tst-mutex6.c: Likewise.
1800 * tst-mutex9.c: Likewise.
1801 * tst-mutexpi6.c: Likewise.
1803 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1805 * sysdeps/i386/tls.h: Remove #include <list.h>.
1807 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1809 * pthread_create.c (start_thread): Call __ctype_init.
1811 2011-09-15 Andreas Schwab <schwab@redhat.com>
1813 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1815 (list_add): Add atomic_write_barrier.
1816 * descr.h: Define __need_list_t before including <list.h>.
1817 * nptl-init.c: Include <list.h>
1818 * allocatestack.c: Likewise.
1820 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1822 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1823 * sysdeps/ia64/tls.h: Likewise.
1824 * sysdeps/powerpc/tls.h: Likewise.
1825 * sysdeps/s390/tls.h: Likewise.
1826 * sysdeps/sh/tls.h: Likewise.
1827 * sysdeps/sparc/tls.h: Likewise.
1828 * sysdeps/x86_64/tls.h: Likewise.
1830 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1832 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1834 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1836 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1837 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1838 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1839 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1840 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1841 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1842 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1843 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1844 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1845 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1846 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1847 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1849 * tst-tls1.c: Support for __thread is now mandatory.
1850 * tst-tls2.c: Likewise.
1851 * tst-tls3.c: Likewise.
1852 * tst-tls3mod.c: Likewise.
1853 * tst-tls4.c: Likewise.
1854 * tst-tls4moda.c: Likewise.
1855 * tst-tls4modb.c: Likewise.
1856 * tst-tls5.h: Likewise.
1858 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1861 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1862 (pthread_rwlock_timedwrlock): Use correct macro in test.
1863 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1865 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1867 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1868 use gettimeofday vsyscall, just call gettimeofday.
1869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1870 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1871 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1873 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1876 Simplify __vdso_clock_gettime use.
1878 2011-09-05 David S. Miller <davem@davemloft.net>
1880 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1882 (sem_timedwait): Call it to force an exception region around
1883 the async cancel enable and the futex operation.
1884 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1885 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1886 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1887 (__new_sem_wait): Call it to force an exception region around
1888 the async cancel enable and the futex operation.
1889 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1890 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1892 2011-08-31 Andreas Schwab <schwab@redhat.com>
1894 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1897 2011-08-20 David S. Miller <davem@davemloft.net>
1899 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1901 2011-08-14 Roland McGrath <roland@hack.frob.com>
1903 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1904 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1906 2011-08-08 Andreas Schwab <schwab@redhat.com>
1908 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1913 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1915 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1917 (__gcc_personality_v0): Likewise.
1918 (_Unwind_ForcedUnwind): Likewise.
1919 (_Unwind_GetCFA): Likewise.
1921 2011-07-14 Roland McGrath <roland@hack.frob.com>
1923 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1926 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1928 * nptl-init.c (__nptl_set_robust): New function.
1929 (pthread_functions): Add reference.
1930 * npthreadP.h: Declare __nptl_set_robust.
1931 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1932 ptr_set_robust member.
1933 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1934 child if threads are used.
1936 2011-06-14 Andreas Jaeger <aj@suse.de>
1938 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1940 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1943 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1945 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1948 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1950 Patch partly by Robert Rex <robert.rex@exasol.com>.
1952 2011-01-19 Roland McGrath <roland@redhat.com>
1954 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1955 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1956 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1957 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1958 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1959 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1961 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1963 * Makefile (test-extras): Add tst-cleanup4aux.
1965 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1968 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1969 (__SETXID_2): Likewise.
1970 (__SETXID_3): Likewise.
1972 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1975 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1976 * alloca_cutoff.c: Add libc_hidden_def.
1978 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1981 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1982 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1983 of "struct pthread".
1985 2010-09-21 Andreas Schwab <schwab@redhat.com>
1987 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1988 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1989 (pthread_cleanup_push_defer_np): Likewise.
1991 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1993 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1996 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1997 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
2000 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
2002 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
2004 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
2006 2010-05-01 Alan Modra <amodra@gmail.com>
2008 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2009 (PSEUDO): Use correct cr save. Don't use wrong parm save area
2010 to save temps. Correct cfi for possible later frame manipulation.
2011 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
2012 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
2013 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
2014 (DOCARGS_6, UNDOCARGS_6): Likewise.
2015 (CENABLE, CDISABLE): Add nops for non-shared calls.
2017 2010-07-06 Andreas Schwab <schwab@redhat.com>
2019 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
2022 2010-07-03 Ulrich Drepper <drepper@redhat.com>
2024 * tst-abstime.c (do_test): Some more cleanups
2026 2010-07-02 Ulrich Drepper <drepper@redhat.com>
2028 * tst-abstime.c: Correct testing and add test for sem_timedwait.
2030 2010-07-01 Andreas Schwab <schwab@redhat.com>
2031 Ulrich Drepper <drepper@redhat.com>
2033 * Makefile (tests): Add tst-abstime.
2034 * tst-abstime.c: New file.
2035 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2036 (__lll_timedlock_wait): Check for timestamp before the Epoch.
2037 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2038 (__lll_timedlock_wait): Likewise.
2039 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2040 (__lll_robust_timedlock_wait): Likewise.
2041 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2042 (__pthread_cond_timedwait): Likewise.
2043 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2044 (pthread_rwlock_timedrdlock): Likewise.
2045 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2046 (pthread_rwlock_timedwrlock): Likewise.
2047 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2050 2010-07-01 Ulrich Drepper <drepper@redhat.com>
2052 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2054 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
2056 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2057 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
2059 2010-04-09 Ulrich Drepper <drepper@redhat.com>
2062 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
2063 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
2064 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
2066 * Makefile (libpthread-routines): Add pthread_getname and
2068 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
2070 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
2072 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
2073 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
2074 * sysdeps/pthread/Makefile: Remove csu section and rt section's
2075 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
2077 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
2079 * pthread_cond_timedwait.c: Add check for
2080 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2081 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2084 2010-03-09 Ulrich Drepper <drepper@redhat.com>
2086 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2087 and the call fails wake eventually waiting setxid threads. Don't free
2088 stack here if we try starting a thread.
2089 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2090 if the clone call failed.
2092 2010-03-08 Andreas Schwab <schwab@redhat.com>
2094 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2095 * allocatestack.c (get_cached_stack): Set setxid_futex.
2096 (allocate_stack): Likewise.
2098 2010-03-05 Andreas Schwab <schwab@redhat.com>
2099 Ulrich Drepper <drepper@redhat.com>
2101 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2102 it is creating a thread or it is just being created.
2103 * pthread_create.c (start_thread): Wake setxid thread if it is
2105 (__pthread_create_2_1): Initialize setxid_futex.
2106 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2109 2010-01-15 Ulrich Drepper <drepper@redhat.com>
2111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2115 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
2117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2118 Fix pthread_cond_timedwait with requeue-PI.
2119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2120 Fix pthread_cond_wait with requeue-PI.
2122 2010-01-14 Ulrich Drepper <drepper@redhat.com>
2124 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2125 and pthread_mutexattr_setrobust for GLIBC_2.12.
2126 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2127 * pthread_mutexattr_getrobust.c: Define alias
2128 pthread_mutexattr_getrobust.
2129 * pthread_mutexattr_setrobust.c: Define alias
2130 pthread_mutexattr_setrobust.
2132 2010-01-12 Ulrich Drepper <drepper@redhat.com>
2134 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
2136 2010-01-08 Ulrich Drepper <drepper@redhat.com>
2138 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2140 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
2142 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2143 call __gmon_start__.
2144 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2146 2009-12-17 Ulrich Drepper <drepper@redhat.com>
2148 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2151 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
2153 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2154 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2156 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2159 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2162 2009-12-12 Ulrich Drepper <drepper@redhat.com>
2164 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2165 Don't update nwaiters after invalid timeout is recognized.
2167 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
2169 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2172 2009-11-27 Andreas Schwab <schwab@redhat.com>
2174 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2175 THREAD_SELF->cancelhandling after returning from futex call.
2177 2009-11-24 Ulrich Drepper <drepper@redhat.com>
2179 * tst-sem13.c: New file.
2180 * Makefile (tests): Add tst-sem13.
2182 2009-11-22 Roland McGrath <roland@redhat.com>
2184 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2185 instead of recapitulating its contents.
2187 2009-11-18 Ulrich Drepper <drepper@redhat.com>
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2190 optimizations and cleanups.
2192 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
2194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2195 Remove redundant code. Fix cfi offsets.
2196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2199 2009-11-17 Ulrich Drepper <drepper@redhat.com>
2201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2202 reduce size of unwind info.
2204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2207 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2209 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2212 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2214 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2216 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2218 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2221 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2222 steps to avoid races with creation and terminations.
2223 * nptl-init.c (sighandler_setxid): Adjust.
2224 Patch by Daniel Jacobowitz.
2226 2009-09-07 Andreas Schwab <schwab@redhat.com>
2228 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2230 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2231 Joseph Myers <joseph@codesourcery.com>
2234 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2235 Initialize the sigev_notify field for newly created timer to make sure
2236 the timer gets deleted from the active timer's list upon timer_delete.
2238 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2240 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2241 Correct a logic error.
2243 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2245 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2246 of the field in local variables.
2247 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2248 variable and don't unconditionally clear it.
2250 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2252 * pthread_create.c (start_thread): Hint to the kernel that memory for
2253 the stack can be reused. We do not mark all the memory. The part
2254 still in use and some reserve are kept.
2256 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2258 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2260 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2262 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2265 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2267 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2269 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2271 2009-08-10 Andreas Schwab <schwab@redhat.com>
2273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2274 (__pthread_cond_signal): Don't clobber register used for syscall
2277 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2279 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2280 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2283 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2286 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2288 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2289 enabled by the special *_asynccancel functions.
2290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2293 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2295 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2297 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2298 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2299 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2300 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2301 since we can assume the special __*_{en,dis}able_asynccancel
2303 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2304 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2305 and PTHREAD_CANCELED.
2307 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2309 * descr.h: Better definition of *_BITMASK macros for cancellation.
2311 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2313 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2315 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2316 dynamic linker might have to save.
2317 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2318 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2321 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2323 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2325 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2327 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2328 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2330 requeue_pi for robust mutexes.
2331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2333 Don't only skip __pthread_mutex_cond_lock. Call instead
2334 __pthread_mutex_cond_lock_adjust.
2335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2337 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2338 optimization of PI mutex handling.
2340 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2343 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2344 instead of of _acq variants of cmpxchg.
2346 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2348 * sysdeps/x86_64/configure.in: New file.
2350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2351 path when not using absolute timeout futex.
2353 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2355 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2356 optimizations of last changes.
2357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2359 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2361 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2362 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2364 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2367 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2371 (__pthread_cond_timedwait): Make more robust.
2373 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2375 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2376 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2377 directly use absolute timeout.
2379 * tst-sem5.c (do_test): Add test for premature timeout.
2380 * Makefile: Linu tst-sem5 with librt.
2382 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2383 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2384 directly use absolute timeout.
2385 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2386 (pthread_rwlock_timedrdlock): Likewise.
2388 * tst-cond11.c (run_test): Add test to check that the timeout is
2391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2392 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2393 directly use absolute timeout.
2395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2396 (__pthread_cond_wait): Convert to using exception handler instead of
2397 registered unwind buffer.
2398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2399 (__pthread_cond_timedwait): Likewise.
2401 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2403 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2404 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2405 use absolute timeout.
2407 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2408 handling of uncontested semaphore.
2410 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2411 (__condvar_cleanup): Rewrite to use cfi directives instead of
2412 hand-coded unwind tables.
2413 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2415 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2416 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2419 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2421 * Makefile (libpthread-routines): Add pthread_sigqueue.
2422 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2423 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2424 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2426 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2429 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2430 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2432 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2434 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2436 * libc-cancellation.c: Move __libc_cleanup_routine to...
2437 * libc-cleanup.c: ...here. New file.
2438 * Makefile (routines): Add libc-cleanup.
2440 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2442 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2443 * sysdeps/pthread/librt-cancellation.c: Likewise.
2446 * nptl-init.c: Renamed from init.c.
2447 * Makefile: Change all occurences of init.c to nptl-init.c.
2449 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2451 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2452 to test when deciding on the delay.
2453 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2454 * pthread_cancel.c: Close race between deciding on sending a signal
2455 and setting the CANCELING_BIT bit.
2457 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2459 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2461 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2463 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2465 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2466 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2467 * sysdeps/i386/tls.h: Likewise.
2468 (tcbhead_t): Add __private_tm member.
2470 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2472 * sem_open.c (sem_open): Rewrite initialization of initsem to
2475 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2476 Avoid warning by using may_alias attribute on ptrhack.
2478 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2481 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2482 Check policy and priority for validity.
2483 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2485 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2487 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2488 (__pthread_cond_timedwait): Change to use cfi directives instead of
2489 hand-coded unwind sections.
2491 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2493 * init.c (nptl_freeres): Compile only for SHARED.
2495 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2497 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2498 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2499 FUTEX_BITSET_MATCH_ANY.
2501 2009-02-27 Roland McGrath <roland@redhat.com>
2503 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2504 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2506 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2508 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2509 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2510 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2513 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2515 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2518 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2520 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2521 Unify name of include protector macro.
2523 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2525 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2526 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2528 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2530 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2533 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2534 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2535 * init.c (nptl_freeres): New function.
2536 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2537 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2538 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2540 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2541 load DSO. Assign last.
2542 (__unwind_freeres): New function.
2544 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2545 for better debugging. No need to use stack_list_add here.
2547 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2549 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2550 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2551 instead of computing relative timeout.
2552 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2553 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2555 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2557 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2559 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2561 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2562 (list_add_tail): Removed.
2564 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2566 * (in_flight_stack): New variable.
2567 (stack_list_del): New function. Use instead of list_del.
2568 (stack_list_add): New function. Use instead of list_add when adding to
2569 stack_cache and stack_used lists.
2570 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2571 when the fork call interrupted another thread.
2573 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2575 * init.c (__pthread_initialize_minimal_internal): Optimize test
2576 FUTEX_CLOCK_REALTIME a bit.
2578 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2580 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2581 only passing five parameters to FUTEX_WAIT_BITSET call.
2583 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2584 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2585 instead of computing relative timeout.
2587 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2589 * init.c (__pthread_initialize_minimal_internal): Check for
2590 FUTEX_CLOCK_REALTIME flag.
2591 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2592 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2595 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2596 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2598 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2599 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2600 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2602 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2604 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2605 loop body instead of ; to avoid gcc warnings.
2606 (pthread_cleanup_pop_restore_np): Likewise.
2607 Patch by Caolán McNamara <caolanm@redhat.com>.
2609 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2611 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2612 fast path here, for robust/PI/PP mutexes call
2613 __pthread_mutex_lock_full. Don't use switch, instead use a series
2614 of ifs according to their probability.
2615 (__pthread_mutex_lock_full): New function.
2616 * pthread_mutex_unlock.c: Include assert.h.
2617 (__pthread_mutex_unlock_usercnt): Handle only the
2618 fast path here, for robust/PI/PP mutexes call
2619 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2620 of ifs according to their probability.
2621 (__pthread_mutex_unlock_full): New function.
2622 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2623 (__pthread_mutex_lock_full): Define.
2625 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2627 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2628 implementation. Add necessary padding and.
2629 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2632 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2634 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2635 and FUTEX_WAKE_BITSET.
2637 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2639 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2640 and FUTEX_WAKE_BITSET.
2641 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2642 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2643 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2644 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2646 2008-11-25 Roland McGrath <roland@redhat.com>
2648 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2649 Subdirectories moved to ports repository as
2650 sysdeps/.../nptl subdirectories.
2652 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2655 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2657 * pthread_cond_init.c (__pthread_cond_init): Fix
2658 cond->__data.__nwaiters initialization.
2659 * Makefile (tests): Add tst-cond23.
2660 * tst-cond23.c: New test.
2662 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2664 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2666 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2669 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2672 * pthread_mutex_lock.c: Add support for private PI mutexes.
2673 * pthread_mutex_timedlock.c: Likewise.
2674 * pthread_mutex_trylock.c: Likewise.
2675 * pthread_mutex_unlock.c: Likewise.
2676 Patch mostly by Ben Jackson <ben@ben.com>.
2678 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2681 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2682 Increase stack size for helper thread.
2684 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2686 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2687 assembly with a clobber list for access registers a0 and a1.
2689 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2691 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2692 to force runp->refcntr to be read from memory.
2694 2008-09-08 Richard Guenther <rguenther@suse.de>
2696 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2697 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2698 lll_timedlock, lll_robust_timedlock, lll_unlock,
2699 lll_robust_unlock): Promote private to int.
2701 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2703 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2704 ARCH_RETRY_MMAP definitions.
2705 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2706 Define MAP_STACK when not defined.
2707 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2708 handling of ARCH_RETRY_MMAP.
2710 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2712 * tst-align2.c (f): Print message that f is reached.
2714 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2717 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2718 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2720 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2722 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2723 SOCK_CLOEXEC if possible.
2725 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2727 * Makefile (tests): Add tst-rwlock2a.
2728 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2729 * tst-rwlock2a.c: New file.
2731 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2733 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2735 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2737 * sysdeps/pthread/pthread.h: Fix typo in comment.
2739 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2741 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2742 of CPU set to the kernel.
2744 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2746 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2749 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2753 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2755 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2759 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2761 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2763 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2766 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2768 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2770 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2772 David S. Miller <davem@davemloft.net>
2774 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2776 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2779 __pshared correctly.
2780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2784 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2788 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2790 2008-04-14 David S. Miller <davem@davemloft.net>
2792 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2793 (__old_sem_wait): Fix argument to lll_futex_wait().
2795 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2797 * pthread_create.c: Require pthread_mutex_trylock and
2798 pthread_key_delete for libgcc.
2800 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2803 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2804 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2805 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2807 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2809 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2810 <linux/limits.h> has defined it.
2811 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2812 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2813 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2814 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2816 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2818 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2820 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2821 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2823 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2825 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2826 HAVE_DL_DISCOVER_OSVERSION.
2827 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2828 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2830 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2833 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2834 _POSIX_CHOWN_RESTRICTED value to zero.
2836 2008-01-31 Roland McGrath <roland@redhat.com>
2838 * Makefile (omit-deps): Variable removed.
2840 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2842 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2843 unnecessary addr32 prefix.
2845 2008-01-29 Roland McGrath <roland@redhat.com>
2847 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2849 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2851 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2853 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2855 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2857 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2858 (__lll_lock_wait_private): Fix typo.
2859 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2860 (pthread_barrier_wait): Likewise. Adjust XADD use.
2861 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2863 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2864 (pthread_rwlock_timedrdlock): Return correct return value.
2865 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2866 (pthread_rwlock_timedwrlock): Likewise.
2868 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2870 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2871 thread returns the program exits with an error code.
2873 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2875 * pthread-errnos.sym: Add EOVERFLOW.
2876 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2877 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2878 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2879 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2881 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2883 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2884 parameter. Passed it as permission to mmap.
2885 * allocatestack.c (allocate_stack): Pass prot as second parameter
2888 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2890 * tst-basic7.c: Allocate memory for the stack.
2893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2894 (__pthread_cond_timedwait): Don't use VDSO.
2895 Patch by Michal Januszewski.
2897 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2900 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2901 Allow label before pthread_cleanup_pop.
2902 (pthread_cleanup_pop_restore_np): Likewise.
2904 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2906 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2907 Store 2 before returning ETIMEDOUT.
2909 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2911 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2912 Store 2 before returning ETIMEDOUT.
2913 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2914 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2915 (__lll_lock_wait_private): Optimize.
2916 (__lll_lock_wait): Likewise.
2918 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2920 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2921 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2922 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2924 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2927 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2928 If we time out, try one last time to lock the futex to avoid
2929 losing a wakeup signal.
2930 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2931 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2934 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2937 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2940 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2941 mmap failed to EAGAIN.
2942 * Makefile (tests): Add tst-basic7.
2943 * tst-basic7.c: New file.
2945 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2947 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2948 Use __linkin_atfork.
2950 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2952 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2953 missing line continuations.
2954 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2955 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2957 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2960 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2961 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2962 (struct timer): Add next element.
2963 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2964 enqueue timer structure into __active_timer_sigev_thread list.
2965 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2966 remove timer struct from __active_timer_sigev_thread.
2967 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2968 Before using timer structure make sure it is still on the
2969 __active_timer_sigev_thread list. Keep lock until done.
2970 Define __active_timer_sigev_thread and
2971 __active_timer_sigev_thread_lock.
2973 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2975 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2976 Redefine thread_atfork for use of ATFORK_MEM.
2977 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2978 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2980 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2981 Use atomic operation when removing first element of list.
2983 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2985 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2986 routine instead of an alias to __new_sem_post.
2988 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2990 * init.c (__pthread_initialize_minimal): Initialize word to appease
2993 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2995 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2996 libc.so just clear NAME.
2997 (__libc_rwlock_fini): Nop inside of libc.so.
2998 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
3001 2007-09-02 Ulrich Drepper <drepper@redhat.com>
3003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3004 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
3006 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
3008 2007-08-21 Ulrich Drepper <drepper@redhat.com>
3011 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
3012 reclaimed stack if necessary.
3013 * Makefile (tests): Add tst-tsd6.
3014 * tst-tsd6.c: New file.
3016 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3018 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
3019 Add private argument.
3021 2007-08-20 Ulrich Drepper <drepper@redhat.com>
3023 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3024 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
3026 2007-08-16 Jakub Jelinek <jakub@redhat.com>
3028 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
3029 (__lll_robust_timedlock): Pass private as last argument to
3030 __lll_robust_timedlock_wait.
3031 (__lll_unlock): Fix a pasto.
3033 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3035 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
3036 sparc_old_sem): New structs.
3037 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
3038 (__sem_wait_cleanup): New function.
3039 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
3040 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3041 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3043 (__old_sem_wait): New function.
3044 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
3045 nptl/sysdeps/unix/sysv/linux/sparc version.
3046 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
3048 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
3049 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
3050 (__new_sem_trywait): Use sparc_old_sem structure.
3051 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
3052 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
3053 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3054 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3055 lll_futex_timed_wait.
3056 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
3057 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
3058 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3060 (__old_sem_post): New function.
3061 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
3062 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
3063 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
3064 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
3065 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
3066 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
3068 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3070 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3071 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3072 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3073 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3074 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
3075 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3076 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3078 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3079 kernel-features.h and tcb-offsets.h.
3080 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3081 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3083 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3085 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3086 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3088 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3089 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3093 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3096 2007-08-14 Jakub Jelinek <jakub@redhat.com>
3098 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3099 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3100 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3101 lll_futex_timed_wait.
3103 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3104 __lll_robust_unlock): Rewrite as macros instead of inline functions.
3105 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3106 __lll_robust_unlock, __lll_wait_tid): Likewise.
3108 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3110 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3113 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3114 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3115 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3117 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3118 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3121 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3122 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3123 process private. Switch DW_CFA_advance_loc1 and some
3124 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3126 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3127 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3128 process private. Switch DW_CFA_advance_loc{1,2} and some
3129 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3131 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3139 (__pthread_cond_broadcast): Compare %r8 instead of
3140 dep_mutex-cond_*(%rdi) with $-1.
3141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3142 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3145 2007-08-13 Ulrich Drepper <drepper@redhat.com>
3147 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3149 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3151 * allocatestack.c: Include kernel-features.h.
3152 * pthread_create.c: Likewise.
3153 * pthread_mutex_init.c: Likewise.
3155 * pthread_cond_timedwait.c: Likewise.
3156 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3157 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3158 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3166 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3168 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3169 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3171 2007-08-12 Jakub Jelinek <jakub@redhat.com>
3173 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3174 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3175 byte elements. One of them is the new __shared element.
3176 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3177 adjust names of other padding elements.
3178 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3179 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3180 byte elements. One of them is the new __shared element.
3181 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3182 adjust names of other padding elements.
3183 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3184 Renamed __pad1 element to __shared, adjust names of other padding
3186 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3187 (pthread_rwlock_t): Likewise.
3188 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3191 2007-08-09 Anton Blanchard <anton@samba.org>
3193 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3195 2007-08-12 Ulrich Drepper <drepper@redhat.com>
3197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3198 <kernel-features.h>.
3199 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3201 2007-08-11 Ulrich Drepper <drepper@redhat.com>
3203 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3204 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3205 dealing with robust mutexes.
3206 * pthread_mutex_timedlock.c: Likewise.
3207 * pthread_mutex_trylock.c: Likewise.
3208 * pthread_mutex_unlock.c: Likewise.
3209 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3211 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3213 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3214 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3215 (PTHREAD_MUTEX_PSHARED): Define.
3216 * pthread_mutex_init.c (__pthread_mutex_init): Set
3217 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3219 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3220 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3221 as second argument to lll_lock.
3222 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3223 instead of its __data.__lock field.
3224 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3225 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3227 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3228 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3229 instead of mutex->__data.__kind directly, pass
3230 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3231 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3232 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3233 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3234 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3235 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3236 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3237 of mutex->__data.__kind directly.
3238 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3239 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3240 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3241 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3242 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3243 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3245 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3246 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3247 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3249 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3250 Take mutex as argument instead of its __data.__lock field, pass
3251 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3252 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3253 __data.__lock field.
3254 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3255 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3256 to lll_robust_cond_lock.
3257 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3258 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3259 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3260 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3261 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3262 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3264 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3265 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3267 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3268 pshared variable, pass it to lll_lock, lll_unlock,
3269 lll_futex_timedwait and lll_futex_wake.
3270 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3271 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3273 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3274 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3276 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3277 lll_futex_wake_unlock): Likewise.
3278 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3280 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3281 lll_futex_wake_unlock): Likewise.
3282 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3284 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3285 lll_futex_wake_unlock): Likewise.
3286 (lll_futex_wake): Fix a typo.
3287 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3289 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3290 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3291 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3293 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3294 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3296 (__pthread_cond_timedwait): Likewise.
3297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3298 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3300 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3302 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3303 Don't use CGOTSETUP and CGOTRESTORE macros.
3304 (CGOTSETUP, CGOTRESTORE): Remove.
3305 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3308 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3310 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3311 definitions for private futexes.
3312 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3313 kernel-features.h and lowlevellock.h. Use private futexes if
3315 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3316 (__lll_mutex_lock_wait): Rename to
3317 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3318 (__lll_mutex_timedlock_wait): Rename to ...
3319 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3320 Don't compile in for libc.so.
3321 (__lll_mutex_unlock_wake): Rename to ...
3322 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3323 (__lll_timedwait_tid): Use __NR_gettimeofday.
3324 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3325 the header from assembler. Renamed all lll_mutex_* resp.
3326 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3327 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3328 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3330 (__lll_lock_wait_private): Add prototype.
3331 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3332 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3333 __lll_unlock_wake): Likewise.
3334 (lll_lock): Add private argument. Call __lll_lock_wait_private
3335 if private is constant LLL_PRIVATE.
3336 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3337 lll_timedlock, lll_robust_timedlock): Add private argument.
3338 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3339 if private is constant LLL_PRIVATE.
3340 (lll_robust_unlock, lll_robust_dead): Add private argument.
3341 (lll_lock_t): Remove.
3342 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3343 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3344 lll_cond_wake, lll_cond_broadcast): Remove.
3345 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3346 kernel-features.h and lowlevellock.h.
3347 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3348 (LOAD_FUTEX_WAIT): Define.
3349 (__lll_robust_mutex_lock_wait): Rename to ...
3350 (__lll_robust_lock_wait): ... this. Add private argument.
3351 Use LOAD_FUTEX_WAIT macro.
3352 (__lll_robust_mutex_timedlock_wait): Rename to ...
3353 (__lll_robust_timedlock_wait): ... this. Add private argument.
3354 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3355 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3357 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3358 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3359 __lll_mutex_{lock,unlock}_*.
3360 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3361 lowlevellock.h and pthread-errnos.h.
3362 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3363 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3364 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3365 __lll_mutex_{lock,unlock}_*.
3366 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3367 lowlevellock.h and pthread-errnos.h.
3368 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3369 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3370 __lll_mutex_{lock,unlock}_*.
3371 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3373 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3374 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3375 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3376 (__condvar_tw_cleanup): Likewise.
3377 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3379 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3380 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3381 __lll_mutex_{lock,unlock}_*.
3382 ( __condvar_w_cleanup): Likewise.
3383 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3384 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3385 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3387 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3388 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3389 __lll_mutex_{lock,unlock}_*.
3390 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3392 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3393 FUTEX_PRIVATE_FLAG): Remove.
3394 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3395 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3396 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3398 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3399 FUTEX_PRIVATE_FLAG): Remove.
3400 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3401 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3404 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3405 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3406 __lll_mutex_{lock,unlock}_*.
3407 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3409 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3410 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3411 __lll_mutex_{lock,unlock}_*.
3412 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3413 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3414 (__new_sem_post): Use standard initial exec code sequences.
3415 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3417 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3418 FUTEX_PRIVATE_FLAG): Remove.
3419 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3420 exec code sequences.
3421 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3422 (__new_sem_trywait): Use standard initial exec code sequences.
3423 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3424 (__new_sem_wait): Use standard initial exec code sequences.
3426 2007-07-31 Anton Blanchard <anton@samba.org>
3428 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3429 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3430 atomic_full_barrier.
3432 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3434 * allocatestack.c (stack_cache_lock): Change type to int.
3435 (get_cached_stack, allocate_stack, __deallocate_stack,
3436 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3437 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3438 as second argument to lll_lock and lll_unlock macros on
3440 * pthread_create.c (__find_in_stack_list): Likewise.
3441 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3442 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3444 * descr.h (struct pthread): Change lock and setxid_futex field
3446 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3447 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3448 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3449 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3451 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3452 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3453 * pthreadP.h (__attr_list_lock): Change type to int.
3454 * pthread_attr_init.c (__attr_list_lock): Likewise.
3455 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3456 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3458 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3459 also for lll_futex_{wake,wait}.
3460 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3462 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3463 LLL_SHARED as second argument to lll_{,un}lock.
3464 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3465 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3466 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3467 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3469 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3470 as second argument to lll_{,un}lock macros on pd->lock.
3471 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3472 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3473 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3474 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3476 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3478 * pthread_once.c (once_lock): Change type to int.
3479 (__pthread_once): Pass LLL_PRIVATE as second argument to
3480 lll_{,un}lock macros on once_lock.
3481 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3482 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3483 rwlock->__data.__shared as second argument to them and similarly
3485 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3487 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3489 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3490 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3491 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3492 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3493 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3494 to lll_{,un}lock macros on __sem_mappings_lock.
3495 * sem_open.c (check_add_mapping): Likewise.
3496 (__sem_mappings_lock): Change type to int.
3497 * semaphoreP.h (__sem_mappings_lock): Likewise.
3498 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3499 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3500 instead of lll_*mutex_*, pass LLL_SHARED as last
3502 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3503 pass LLL_SHARED as last argument.
3504 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3505 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3506 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3507 pass LLL_SHARED as last argument.
3508 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3509 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3510 LLL_SHARED as last argument.
3511 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3512 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3514 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3515 __libc_lock_lock_recursive, __libc_lock_unlock,
3516 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3517 argument to lll_{,un}lock.
3518 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3519 _IO_lock_unlock): Likewise.
3520 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3522 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3523 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3525 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3526 free_mem): Likewise.
3527 (__fork_lock): Change type to int.
3528 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3529 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3530 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3532 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3533 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3534 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3536 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3537 pass it through to lll_futex_*wait, only compile in when
3539 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3540 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3541 argument and pass it through to lll_futex_*wait.
3542 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3543 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3544 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3545 inline functions to __lll_* resp. __lll_robust_*.
3546 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3547 (lll_mutex_dead): Add private argument.
3548 (__lll_lock_wait_private): New prototype.
3549 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3550 __lll_robust_lock_timedwait): Add private argument to prototypes.
3551 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3552 call __lll_lock_wait_private, otherwise pass private to
3554 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3555 __lll_robust_timedlock): Add private argument, pass it to
3556 __lll_*wait functions.
3557 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3558 call __lll_unlock_wake_private, otherwise pass private to
3560 (__lll_robust_unlock): Add private argument, pass it to
3561 __lll_robust_unlock_wake.
3562 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3563 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3564 argument, pass it through to __lll_* inline function.
3565 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3566 (lll_lock_t): Remove.
3567 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3568 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3569 lll_cond_wake, lll_cond_broadcast): Remove.
3570 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3571 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3572 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3573 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3575 the header from assembler. Renamed all lll_mutex_* resp.
3576 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3577 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3578 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3579 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3580 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3581 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3582 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3584 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3585 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3586 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3587 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3588 MULTIPLE_THREADS_OFFSET as another asm operand.
3589 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3590 MULTIPLE_THREADS_OFFSET as last asm operand, call
3591 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3592 otherwise pass private as another argument to __lll_lock_wait.
3593 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3594 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3595 private as another argument to __lll_*lock_wait call.
3596 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3597 MULTIPLE_THREADS_OFFSET as another asm operand, call
3598 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3599 otherwise pass private as another argument to __lll_unlock_wake.
3600 (lll_robust_unlock): Add private argument, pass private as another
3601 argument to __lll_unlock_wake.
3602 (lll_robust_dead): Add private argument, use __lll_private_flag
3604 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3605 LLL_MUTEX_LOCK_INITIALIZER.
3606 (lll_lock_t): Remove.
3607 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3608 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3609 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3610 lll_cond_wake, lll_cond_broadcast): Remove.
3611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3612 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3613 2007-05-2{3,9} changes.
3614 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3615 kernel-features.h and lowlevellock.h.
3616 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3617 (LOAD_FUTEX_WAIT): Rewritten.
3618 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3620 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3621 (__lll_mutex_lock_wait): Rename to ...
3622 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3623 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3624 (__lll_mutex_timedlock_wait): Rename to ...
3625 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3626 contains private argument. Don't compile in for libc.so.
3627 (__lll_mutex_unlock_wake): Rename to ...
3628 (__lll_unlock_wake): ... this. %ecx contains private argument.
3629 Don't compile in for libc.so.
3630 (__lll_timedwait_tid): Use __NR_gettimeofday.
3631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3632 kernel-features.h and lowlevellock.h.
3633 (LOAD_FUTEX_WAIT): Define.
3634 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3636 (__lll_robust_mutex_lock_wait): Rename to ...
3637 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3638 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3640 (__lll_robust_mutex_timedlock_wait): Rename to ...
3641 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3642 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3643 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3645 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3646 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3647 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3648 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3649 to __lll_lock_wait in %edx.
3650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3651 Include lowlevellock.h and pthread-errnos.h.
3652 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3653 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3654 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3655 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3656 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3659 Include lowlevellock.h and pthread-errnos.h.
3660 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3661 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3662 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3663 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3664 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3667 Include lowlevellock.h.
3668 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3670 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3671 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3672 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3673 __lll_unlock_wake. Use __NR_gettimeofday.
3674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3675 Include lowlevellock.h.
3676 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3677 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3678 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3679 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3680 and __lll_unlock_wake.
3681 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3682 Include lowlevellock.h.
3683 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3684 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3685 MUTEX(%ebx) address in %edx rather than %ecx to
3686 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3687 and __lll_unlock_wake. Move return value from %ecx to %edx
3689 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3690 Include lowlevellock.h.
3691 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3693 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3694 MUTEX(%ebp) address in %edx rather than %ecx to
3695 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3696 and __lll_unlock_wake. Move return value from %ecx to %edx
3697 register. Use __NR_gettimeofday.
3698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3699 Include lowlevellock.h.
3700 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3702 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3703 MUTEX(%ebp) address in %edx rather than %ecx to
3704 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3705 and __lll_unlock_wake. Move return value from %ecx to %edx
3706 register. Use __NR_gettimeofday.
3707 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3708 Include lowlevellock.h.
3709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3710 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3711 MUTEX(%edi) address in %edx rather than %ecx to
3712 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3713 and __lll_unlock_wake.
3714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3715 Include lowlevellock.h.
3716 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3717 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3718 MUTEX(%ebx) address in %edx rather than %ecx to
3719 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3720 and __lll_unlock_wake. Move return value from %ecx to %edx
3722 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3724 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3726 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3727 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3728 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3730 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3731 (sem_timedwait): Use __NR_gettimeofday.
3732 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3734 (LOCK): Don't define.
3735 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3737 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3738 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3740 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3741 2007-05-2{3,9} changes.
3742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3743 kernel-features.h and lowlevellock.h.
3744 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3745 (LOAD_FUTEX_WAIT): Rewritten.
3746 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3747 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3748 (__lll_mutex_lock_wait): Rename to ...
3749 (__lll_lock_wait): ... this. %esi is now private argument.
3750 Don't compile in for libc.so.
3751 (__lll_mutex_timedlock_wait): Rename to ...
3752 (__lll_timedlock_wait): ... this. %esi contains private argument.
3753 Don't compile in for libc.so.
3754 (__lll_mutex_unlock_wake): Rename to ...
3755 (__lll_unlock_wake): ... this. %esi contains private argument.
3756 Don't compile in for libc.so.
3757 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3758 kernel-features.h and lowlevellock.h.
3759 (LOAD_FUTEX_WAIT): Define.
3760 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3761 (__lll_robust_mutex_lock_wait): Rename to ...
3762 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3763 Use LOAD_FUTEX_WAIT macro.
3764 (__lll_robust_mutex_timedlock_wait): Rename to ...
3765 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3766 private, use LOAD_FUTEX_WAIT macro.
3767 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3769 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3770 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3771 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3772 __lll_lock_wait and __lll_unlock_wake.
3773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3774 Include lowlevellock.h and pthread-errnos.h.
3775 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3776 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3777 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3778 pass LLL_SHARED in %esi to both __lll_lock_wait and
3780 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3781 Include lowlevellock.h and pthread-errnos.h.
3782 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3783 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3784 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3785 pass LLL_SHARED in %esi to both __lll_lock_wait and
3787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3788 Include lowlevellock.h.
3789 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3790 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3791 pass LLL_SHARED in %esi to both __lll_lock_wait and
3793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3794 Include lowlevellock.h.
3795 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3796 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3797 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3798 and __lll_unlock_wake.
3799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3800 Include lowlevellock.h.
3801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3803 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3804 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3805 and __lll_unlock_wake.
3806 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3807 Include lowlevellock.h.
3808 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3810 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3811 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3812 and __lll_unlock_wake.
3813 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3814 Include lowlevellock.h.
3815 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3817 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3818 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3819 and __lll_unlock_wake.
3820 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3821 Include lowlevellock.h.
3822 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3824 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3825 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3826 and __lll_unlock_wake.
3827 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3828 Include lowlevellock.h.
3829 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3831 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3832 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3833 and __lll_unlock_wake.
3834 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3836 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3838 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3839 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3840 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3842 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3843 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3845 (LOCK): Don't define.
3846 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3848 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3849 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3850 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3851 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3852 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3853 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3854 (__lll_lock_wait_private): New function.
3855 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3856 it to lll_futex_*wait. Don't compile in for libc.so.
3857 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3859 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3860 (struct sparc_pthread_barrier): Remove.
3861 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3862 struct sparc_pthread_barrier. Pass
3863 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3864 and lll_futex_wait macros.
3865 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3867 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3868 Include sparc pthread_barrier_wait.c instead of generic one.
3870 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3872 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3875 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3877 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3878 (pthread_rwlock_timedwrlock): Likewise.
3879 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3880 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3882 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3884 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3886 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3888 * tst-locale2.c (useless): Add return statement.
3890 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3892 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3893 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3894 * pthread_create.c (start_thread): Likewise.
3895 * init.c (sighandler_setxid): Likewise.
3896 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3897 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3898 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3899 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3900 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3901 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3902 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3903 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3904 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3906 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3908 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3910 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3911 __rtld_notify): Likewise.
3912 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3913 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3914 __pthread_once): Likewise.
3915 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3916 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3917 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3918 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3919 (lll_futex_wait): Add private argument, define as wrapper around
3920 lll_futex_timed_wait.
3921 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3922 use __lll_private_flag macro.
3923 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3924 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3925 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3926 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3927 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3928 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3929 (lll_futex_wait): Add private argument, define as wrapper around
3930 lll_futex_timed_wait.
3931 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3932 use __lll_private_flag macro.
3933 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3934 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3935 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3937 (lll_futex_timed_wait, lll_futex_wake): Use it.
3938 (lll_private_futex_wait, lll_private_futex_timed_wait,
3939 lll_private_futex_wake): Removed.
3940 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3941 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3942 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3943 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3944 (lll_futex_wait): Add private argument, define as wrapper around
3945 lll_futex_timed_wait.
3946 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3947 use __lll_private_flag macro.
3948 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3949 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3951 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3952 (lll_private_futex_wait, lll_private_futex_timed_wait,
3953 lll_private_futex_wake): Removed.
3954 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3955 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3956 (lll_private_futex_wait, lll_private_futex_timed_wait,
3957 lll_private_futex_wake): Removed.
3958 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3959 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3960 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3961 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3962 (lll_futex_wait): Add private argument, define as wrapper around
3963 lll_futex_timed_wait.
3964 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3965 use __lll_private_flag macro.
3966 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3967 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3971 (lll_futex_timed_wait, lll_futex_wake): Use it.
3972 (lll_private_futex_wait, lll_private_futex_timed_wait,
3973 lll_private_futex_wake): Removed.
3975 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3977 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3978 of the structure for sparc32.
3980 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3982 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3984 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3987 code used when private futexes are assumed.
3988 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3991 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3993 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3994 (__lll_private_flag): Define.
3995 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3996 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3998 (lll_private_futex_wait, lll_private_futex_timedwait,
3999 lll_private_futex_wake): Define as wrapper around non-_private
4001 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4002 (__lll_private_flag): Define.
4003 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
4004 (lll_private_futex_wait, lll_private_futex_timedwait,
4005 lll_private_futex_wake): Define as wrapper around non-_private
4008 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
4010 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
4011 parameter to lll_futex_wait call.
4012 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
4014 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4015 Replace lll_futex_wait with lll_private_futex_wait.
4016 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4017 Add LLL_SHARED parameter to lll_futex_wake().
4019 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
4020 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
4021 lll_private_futex_wake.
4022 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
4023 bit from private parm before syscall.
4024 (lll_futex_timed_wait): Likewise.
4025 (lll_futex_wake): Likewise.
4026 (lll_futex_wake_unlock): Likewise.
4027 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
4028 (lll_robust_mutex_unlock): Likewise.
4029 (lll_mutex_unlock_force): Likewise.
4030 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
4032 2007-07-23 Ulrich Drepper <drepper@redhat.com>
4034 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4035 compilation when unconditionally using private futexes.
4036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4040 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4042 2007-07-17 Jakub Jelinek <jakub@redhat.com>
4044 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
4047 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4049 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
4052 2007-05-16 Roland McGrath <roland@redhat.com>
4054 * init.c (__nptl_initial_report_events): New variable.
4055 (__pthread_initialize_minimal_internal): Initialize pd->report_events
4058 2007-06-22 Jakub Jelinek <jakub@redhat.com>
4060 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
4061 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
4063 2007-06-19 Ulrich Drepper <drepper@redhat.com>
4065 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
4068 2007-06-18 Ulrich Drepper <drepper@redhat.com>
4070 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
4071 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
4072 * pthread_mutex_timedlock.c: Likewise.
4073 * pthread_mutex_trylock.c: Likewise.
4074 * pthread_mutex_unlock.c: Likewise.
4076 2007-06-17 Andreas Schwab <schwab@suse.de>
4078 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4081 2007-06-17 Ulrich Drepper <drepper@redhat.com>
4083 * allocatestack.c (allocate_stack): Make code compile if
4084 __ASSUME_PRIVATE_FUTEX is set.
4086 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4089 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4091 (__pthread_rwlock_wrlock): Likewise.
4092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4093 (pthread_rwlock_timedrdlock): Likewise.
4094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4095 (pthread_rwlock_timedwrlock): Likewise.
4096 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4097 (__pthread_rwlock_unlock): Likewise.
4099 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4101 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4102 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4103 Split __flags into __flags, __shared, __pad1 and __pad2.
4104 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4105 futexes if they are available.
4106 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4107 in libc-lowlevellock.S allow using private futexes.
4108 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4109 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
4110 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
4111 to call lll_futex_timed_wait. Add lll_private_futex_wait,
4112 lll_private_futex_timed_wait and lll_private_futex_wake.
4113 (lll_robust_mutex_unlock): Fix typo.
4114 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4115 field in futex command setup.
4116 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4117 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4118 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4119 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4120 if they are available. Remove clear_once_control.
4121 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4122 futexes if they are available.
4123 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4124 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4125 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4127 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4128 Wake only when there are waiters.
4129 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4130 support. Indicate that there are waiters. Remove unnecessary
4131 extra cancellation test.
4132 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
4133 left-over duplication of __sem_wait_cleanup.
4135 2007-06-07 Ulrich Drepper <drepper@redhat.com>
4137 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4138 parameter to lll_futex_wait, lll_futex_timed_wait, and
4139 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
4140 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4141 lll_private_futex_wake.
4142 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4143 * allocatestack.c: Adjust use of lll_futex_* macros.
4145 * lowlevellock.h: Likewise.
4146 * pthread_barrier_wait.c: Likewise.
4147 * pthread_cond_broadcast.c: Likewise.
4148 * pthread_cond_destroy.c: Likewise.
4149 * pthread_cond_signal.c: Likewise.
4150 * pthread_cond_timedwait.c: Likewise.
4151 * pthread_cond_wait.c: Likewise.
4152 * pthread_create.c: Likewise.
4153 * pthread_mutex_lock.c: Likewise.
4154 * pthread_mutex_setprioceiling.c: Likewise.
4155 * pthread_mutex_timedlock.c: Likewise.
4156 * pthread_mutex_unlock.c: Likewise.
4157 * pthread_rwlock_timedrdlock.c: Likewise.
4158 * pthread_rwlock_timedwrlock.c: Likewise.
4159 * pthread_rwlock_unlock.c: Likewise.
4160 * sysdeps/alpha/tls.h: Likewise.
4161 * sysdeps/i386/tls.h: Likewise.
4162 * sysdeps/ia64/tls.h: Likewise.
4163 * sysdeps/powerpc/tls.h: Likewise.
4164 * sysdeps/pthread/aio_misc.h: Likewise.
4165 * sysdeps/pthread/gai_misc.h: Likewise.
4166 * sysdeps/s390/tls.h: Likewise.
4167 * sysdeps/sh/tls.h: Likewise.
4168 * sysdeps/sparc/tls.h: Likewise.
4169 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4170 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4171 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4172 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4173 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4174 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4175 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4176 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4177 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4178 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4180 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4181 * sysdeps/x86_64/tls.h: Likewise.
4183 2007-05-29 Ulrich Drepper <drepper@redhat.com>
4185 * pthread_getattr_np.c: No need to install a cancellation handler,
4186 this is no cancellation point.
4187 * pthread_getschedparam.c: Likewise.
4188 * pthread_setschedparam.c: Likewise.
4189 * pthread_setschedprio.c: Likewise.
4190 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4192 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4194 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4195 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4196 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4197 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4198 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4199 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4200 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4201 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4202 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4203 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4205 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4206 whether there are more than one thread makes no sense here since
4207 we only call the slow path if the locks are taken.
4208 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4210 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4211 COND_NWAITERS_SHIFT.
4212 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4214 * pthread_cond_init.c: Likewise.
4215 * pthread_cond_timedwait.c: Likewise.
4216 * pthread_cond_wait.c: Likewise.
4217 * pthread_condattr_getclock.c: Likewise.
4218 * pthread_condattr_setclock.c: Likewise.
4219 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4225 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4227 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4230 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4232 (THREAD_GSCOPE_GET_FLAG): Remove.
4233 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4234 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4236 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4237 (THREAD_GSCOPE_GET_FLAG): Remove.
4238 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4239 instead of THREAD_GSCOPE_GET_FLAG.
4240 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4242 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4243 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4244 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4245 THREAD_GSCOPE_WAIT): Define.
4246 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4247 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4248 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4249 THREAD_GSCOPE_WAIT): Define.
4250 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4251 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4252 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4253 THREAD_GSCOPE_WAIT): Define.
4254 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4255 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4256 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4257 THREAD_GSCOPE_WAIT): Define.
4259 2007-05-24 Richard Henderson <rth@redhat.com>
4261 * descr.h (struct pthread): Add header.gscope_flag.
4262 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4263 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4264 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4265 THREAD_GSCOPE_WAIT): Define.
4267 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4269 * init.c: Make it compile with older kernel headers.
4271 * tst-initializers1.c: Show through exit code which test failed.
4273 * pthread_rwlock_init.c: Also initialize __shared field.
4274 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4275 element in rwlock structure into four byte elements. One of them is
4276 the new __shared element.
4277 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4279 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4280 __shared, adjust names of other padding elements.
4281 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4282 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4283 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4284 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4287 futex to use private operations if possible.
4288 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4290 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4300 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4302 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4304 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4305 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4306 * pthread_rwlock_timedrdlock.c: Likewise.
4307 * pthread_rwlock_tryrdlock.c: Likewise.
4309 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4312 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4313 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4314 duplication of __sem_wait_cleanup.
4316 * allocatestack.c: Revert last change.
4318 * sysdeps/i386/tls.h: Likewise.
4319 * sysdeps/x86_64/tls.h: Likewise.
4320 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4322 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4324 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4326 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4327 * pthread_barrier_init.c: Set private flag if pshared and private
4328 futexes are supported.
4329 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4330 private field in futex command setup.
4331 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4333 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4335 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4337 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4338 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4339 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4340 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4341 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4343 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4344 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4345 fields in the structure.
4346 (__old_sem_init): New function.
4347 * sem_open.c: Initialize all fields of the structure.
4348 * sem_getvalue.c: Adjust for renamed element.
4349 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4350 (gen-as-const-headers): Add structsem.sym.
4351 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4352 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4353 struct new_sem. Add struct old_sem.
4354 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4355 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4356 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4357 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4358 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4359 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4360 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4361 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4362 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4363 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4364 * tst-sem10.c: New file.
4365 * tst-sem11.c: New file.
4366 * tst-sem12.c: New file.
4367 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4370 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4371 Jakub Jelinek <jakub@redhat.com>
4373 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4374 Move __pthread_enable_asynccancel right before futex syscall.
4375 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4378 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4380 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4381 THREAD_COPY_PRIVATE_FUTEX): Define.
4382 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4383 THREAD_COPY_PRIVATE_FUTEX): Define.
4384 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4385 * init.c (__pthread_initialize_minimal_internal): Use
4386 THREAD_SET_PRIVATE_FUTEX.
4388 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4389 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4390 THREAD_GSCOPE_FLAG_WAIT): Define.
4391 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4392 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4393 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4395 (THREAD_GSCOPE_GET_FLAG): Define.
4396 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4397 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4398 instead of ->header.gscope_flag directly.
4400 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4402 * init.c (__pthread_initialize_minimal_internal): Check whether
4403 private futexes are available.
4404 * allocatestack.c (allocate_stack): Copy private_futex field from
4405 current thread into the new stack.
4406 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4407 futexes if they are available.
4408 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4409 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4410 in libc-lowlevellock.S allow using private futexes.
4411 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4412 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4415 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4416 if they are available.
4417 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4418 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4419 * sysdeps/i386/tcb-offsets.sym: Likewise.
4420 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4421 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4423 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4425 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4426 Remove ptr_wait_lookup_done again.
4427 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4428 (__pthread_initialize_minimal_internal): Initialize
4429 _dl_wait_lookup_done pointer in _rtld_global directly.
4430 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4431 Remove code to code _dl_wait_lookup_done.
4432 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4435 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4437 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4438 pthread_mutex_init failed with ENOTSUP.
4440 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4442 * allocatestack.c (__wait_lookup_done): New function.
4443 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4444 Add ptr_wait_lookup_done.
4445 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4446 * pthreadP.h: Declare __wait_lookup_done.
4447 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4448 Define macros to implement reference handling of global scope.
4449 * sysdeps/x86_64/tls.h: Likewise.
4450 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4451 Initialize GL(dl_wait_lookup_done).
4453 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4456 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4458 * pthread_mutex_timedlock.c: Likewise.
4459 * pthread_mutex_trylock.c: Likewise.
4460 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4462 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4463 * tst-robust9.c: New file.
4464 * tst-robustpi9.c: New file.
4466 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4467 unnecessary extra cancellation test.
4469 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4471 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4472 extra cancellation test.
4473 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4475 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4477 * descr.h (struct pthread): Rearrange members to fill hole in
4480 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4481 (__pthread_setaffinity_new): If syscall was successful and
4482 RESET_VGETCPU_CACHE is defined, use it before returning.
4483 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4485 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4488 * tst-align2.c: Include stackinfo.h.
4489 * tst-getpid1.c: Likewise.
4491 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4494 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4495 * tst-getpid1.c (do_test): Likewise.
4498 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4499 (allocate_stack): Likewise.
4501 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4503 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4504 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4505 (__lll_robust_timedlock_wait): Likewise.
4506 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4508 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4511 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4512 * tst-cancel4.c (tf_fdatasync): New test.
4514 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4517 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4518 check mutexes like normal mutexes.
4521 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4522 Initialize the whole sigevent structure to appease valgrind.
4524 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4526 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4527 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4529 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4531 * tst-locale1.c: Avoid warnings.
4532 * tst-locale2.c: Likewise.
4534 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4536 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4537 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4539 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4541 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4542 __extern_always_inline where appropriate.
4543 * sysdeps/pthread/pthread.h: Likewise.
4545 2007-03-13 Richard Henderson <rth@redhat.com>
4547 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4548 separate cfi regions for the two subsections.
4550 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4552 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4553 new thread, don't just decrement it.
4554 Patch by Suzuki K P <suzuki@in.ibm.com>.
4556 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4558 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4559 PTHFCT_CALL definition.
4561 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4563 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4564 available, don't use it.
4566 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4568 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4569 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4570 call into the kernel to delay.
4572 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4574 * tst-initializers1.c: We want to test the initializers as seen
4575 outside of libc, so undefined _LIBC.
4577 * pthread_join.c (cleanup): Avoid warning.
4579 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4582 (__lll_timedwait_tid): Add unwind info.
4584 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4585 function table, mangle the pointers.
4586 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4587 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4588 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4589 demangle pointers before use.
4590 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4592 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4593 * sysdeps/pthread/setxid.h: Likewise.
4595 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4597 * tst-rwlock7.c: Show some more information in case of correct
4600 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4603 (lll_futex_timed_wait): Undo part of last change, don't negate
4606 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4609 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4611 2006-12-28 David S. Miller <davem@davemloft.net>
4613 * shlib-versions: Fix sparc64 linux target specification.
4615 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4617 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4618 Adjust include path for pthread_barrier_wait.c move.
4620 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4622 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4623 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4625 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4627 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4628 6 argument cancellable syscalls.
4629 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4630 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4631 6 argument cancellable syscalls.
4632 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4634 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4636 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4637 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4639 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4641 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4642 __sync_lock_release instead of __sync_lock_release_si.
4644 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4646 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4648 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4649 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4650 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4651 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4652 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4653 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4654 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4655 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4656 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4657 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4658 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4660 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4662 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4663 * pthread_barrier_wait.c: ...here.
4664 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4665 * pthread_cond_broadcast.c: ...here.
4666 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4667 * pthread_cond_signal.c: ...here.
4668 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4669 * pthread_cond_timedwait.c: ...here.
4670 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4671 * pthread_cond_wait.c: ...here.
4672 * sysdeps/pthread/pthread_once.c: Move to...
4673 * pthread_once.c: ...here.
4674 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4675 * pthread_rwlock_rdlock.c: ...here.
4676 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4677 * pthread_rwlock_timedrdlock.c: ...here.
4678 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4679 * pthread_rwlock_timedwrlock.c: ...here.
4680 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4681 * pthread_rwlock_unlock.c: ...here.
4682 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4683 * pthread_rwlock_wrlock.c: ...here.
4684 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4685 * pthread_spin_destroy.c: ...here.
4686 * sysdeps/pthread/pthread_spin_init.c: Move to...
4687 * pthread_spin_init.c: ...here.
4688 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4689 * pthread_spin_unlock.c: ...here.
4690 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4691 * pthread_getcpuclockid.c: ...here.
4693 * init.c: USE_TLS support is now always enabled.
4694 * tst-tls5.h: Likewise.
4695 * sysdeps/alpha/tls.h: Likewise.
4696 * sysdeps/i386/tls.h: Likewise.
4697 * sysdeps/ia64/tls.h: Likewise.
4698 * sysdeps/powerpc/tls.h: Likewise.
4699 * sysdeps/s390/tls.h: Likewise.
4700 * sysdeps/sh/tls.h: Likewise.
4701 * sysdeps/sparc/tls.h: Likewise.
4702 * sysdeps/x86_64/tls.h: Likewise.
4704 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4706 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4707 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4710 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4711 Define to THREAD_SELF->header.multiple_threads.
4712 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4714 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4716 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4717 (SINGLE_THREAD_P): Likewise.
4718 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4719 (SINGLE_THREAD_P): Likewise.
4720 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4721 (SINGLE_THREAD_P): Likewise.
4722 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4723 (SINGLE_THREAD_P): Likewise.
4724 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4726 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4727 (SINGLE_THREAD_P): Likewise.
4728 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4729 (SINGLE_THREAD_P): Likewise.
4730 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4733 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4735 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4736 by default rather than 2_3_3.
4738 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4740 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4741 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4742 atomic_* instead of catomic_* macros.
4744 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4747 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4748 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4749 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4750 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4751 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4752 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4753 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4754 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4755 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4756 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4757 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4758 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4759 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4761 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4763 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4764 cancelable syscalls with six parameters.
4766 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4767 operations instead of atomic_*.
4769 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4771 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4773 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4775 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4776 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4777 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4779 * pthread_attr_setstack.c: Allow overwriting the version number of the
4781 * pthread_attr_setstacksize.c: Likewise.
4782 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4784 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4785 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4787 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4790 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4791 Patch by Petr Baudis.
4793 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4795 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4797 * tst-cancel2.c (tf): Loop as long as something was written.
4799 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4801 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4802 mutexes wake all mutexes.
4803 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4804 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4805 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4807 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4809 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4810 to guarantee the thread is always canceled.
4812 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4814 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4816 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4817 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4818 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4822 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4825 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4826 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4828 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4830 * Makefile (tests): Add tst-cond22.
4831 * tst-cond22.c: New file.
4833 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4836 * descr.h (struct pthread): Add parent_cancelhandling.
4837 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4838 cancelhandling value to child.
4839 * pthread_create.c (start_thread): If parent thread was canceled
4840 reset the SIGCANCEL mask.
4841 * Makefile (tests): Add tst-cancel25.
4842 * tst-cancel25.c: New file.
4844 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4845 Ulrich Drepper <drepper@redhat.com>
4847 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4848 counterp if it is already zero.
4849 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4851 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4852 Roland McGrath <roland@redhat.com>
4854 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4855 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4856 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4857 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4858 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4859 lll_robust_mutex_timedlock, lll_mutex_unlock,
4860 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4861 Add _L_*_ symbols around the subsection.
4862 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4863 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4865 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4866 Roland McGrath <roland@redhat.com>
4868 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4869 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4870 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4871 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4872 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4873 lll_robust_mutex_timedlock, lll_mutex_unlock,
4874 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4875 Add _L_*_ symbols around the subsection.
4876 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4877 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4879 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4881 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4882 change because it can disturb too much existing code. If real hard
4883 reader preference is needed we'll introduce another type.
4884 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4885 (pthread_rwlock_timedwrlock): Likewise.
4886 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4889 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4891 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4894 (pthread_rwlock_timedwrlock): Likewise.
4895 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4898 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4900 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4901 Only define ifdef SHARED.
4903 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4905 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4906 (free_stacks): ...here.
4907 (__free_stack_cache): New function.
4908 * pthreadP.h: Declare __free_stack_cache.
4909 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4911 * init.c (pthread_functions): Initialize ptr_freeres.
4912 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4913 New freeres function.
4915 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4918 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4920 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4922 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4923 _XOPEN_REALTIME_THREADS.
4925 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4927 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4928 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4929 HAVE_CLOCK_GETTIME_VSYSCALL.
4930 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4932 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4934 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4935 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4936 * descr.h (struct priority_protection_data): New type.
4937 (struct pthread): Add tpp field.
4938 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4939 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4940 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4941 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4943 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4944 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4945 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4946 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4948 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4950 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4951 * pthread_mutexattr_getprioceiling.c
4952 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4953 in the SCHED_FIFO priority range.
4954 * pthread_mutexattr_setprioceiling.c
4955 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4956 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4957 if mutex is not TPP. Ceiling is now in __data.__lock.
4958 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4959 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4960 is now in __data.__lock. Add locking.
4961 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4962 * Makefile (libpthread-routines): Add tpp.
4963 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4964 * tst-tpp.h: New file.
4965 * tst-mutexpp1.c: New file.
4966 * tst-mutexpp6.c: New file.
4967 * tst-mutexpp10.c: New file.
4968 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4969 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4971 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4974 * pthread_join.c (pthread_join): Account for self being canceled
4975 when checking for deadlocks.
4976 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4977 (tf1): Don't print anything after pthread_join returns, this would be
4978 another cancellation point.
4980 * tst-join6.c: New file.
4981 * Makefile (tests): Add tst-join6.
4983 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4986 * pthread_setspecific.c (__pthread_setspecific): Check
4987 out-of-range index before checking for unused key.
4989 * sysdeps/pthread/gai_misc.h: New file.
4991 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4993 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4994 file. Don't use sysctl.
4995 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4996 overwrite the file if this is likely not true.
4998 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
5000 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
5001 * Makefile (tests): Add tst-getpid3.
5002 * tst-getpid3.c: New file.
5004 2006-07-30 Roland McGrath <roland@redhat.com>
5006 * Makefile (libpthread-routines): Add ptw-sigsuspend.
5008 * sysdeps/unix/sysv/linux/i386/not-cancel.h
5009 (pause_not_cancel): New macro.
5010 (nanosleep_not_cancel): New macro.
5011 (sigsuspend_not_cancel): New macro.
5012 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
5013 nanosleep_not_cancel macro from <not-cancel.h>.
5014 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
5015 macro from <not-cancel.h>.
5017 2006-07-28 Ulrich Drepper <drepper@redhat.com>
5018 Jakub Jelinek <jakub@redhat.com>
5020 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5021 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
5022 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
5023 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
5024 * pthread_mutex_init.c: Add support for priority inheritance mutex.
5025 * pthread_mutex_lock.c: Likewise.
5026 * pthread_mutex_timedlock.c: Likewise.
5027 * pthread_mutex_trylock.c: Likewise.
5028 * pthread_mutex_unlock.c: Likewise.
5029 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
5031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
5033 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
5034 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
5035 pthread-pi-defines.sym.
5036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
5037 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
5038 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5039 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
5040 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5041 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5042 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5043 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5044 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5045 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5046 _POSIX_THREAD_PRIO_INHERIT to 200112L.
5047 * tst-mutex1.c: Adjust to allow use in PI mutex test.
5048 * tst-mutex2.c: Likewise.
5049 * tst-mutex3.c: Likewise.
5050 * tst-mutex4.c: Likewise.
5051 * tst-mutex5.c: Likewise.
5052 * tst-mutex6.c: Likewise.
5053 * tst-mutex7.c: Likewise.
5054 * tst-mutex7a.c: Likewise.
5055 * tst-mutex8.c: Likewise.
5056 * tst-mutex9.c: Likewise.
5057 * tst-robust1.c: Likewise.
5058 * tst-robust7.c: Likewise.
5059 * tst-robust8.c: Likewise.
5060 * tst-mutexpi1.c: New file.
5061 * tst-mutexpi2.c: New file.
5062 * tst-mutexpi3.c: New file.
5063 * tst-mutexpi4.c: New file.
5064 * tst-mutexpi5.c: New file.
5065 * tst-mutexpi6.c: New file.
5066 * tst-mutexpi7.c: New file.
5067 * tst-mutexpi7a.c: New file.
5068 * tst-mutexpi8.c: New file.
5069 * tst-mutexpi9.c: New file.
5070 * tst-robust1.c: New file.
5071 * tst-robust2.c: New file.
5072 * tst-robust3.c: New file.
5073 * tst-robust4.c: New file.
5074 * tst-robust5.c: New file.
5075 * tst-robust6.c: New file.
5076 * tst-robust7.c: New file.
5077 * tst-robust8.c: New file.
5078 * Makefile (tests): Add the new tests.
5080 * pthread_create.c (start_thread): Add some casts to avoid warnings.
5081 * pthread_mutex_destroy.c: Remove unneeded label.
5083 2006-07-01 Ulrich Drepper <drepper@redhat.com>
5085 * pthread_mutex_init.c (__pthread_mutex_init): Move some
5086 computations to compile time.
5088 2006-06-04 Ulrich Drepper <drepper@redhat.com>
5090 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5092 2006-05-15 Ulrich Drepper <drepper@redhat.com>
5094 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5096 2006-05-11 Ulrich Drepper <drepper@redhat.com>
5098 * pthread_key_create.c (__pthread_key_create): Do away with
5099 __pthread_keys_lock.
5101 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5102 (__kernel_cpumask_size): Mark as hidden.
5103 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5105 * sem_open.c (__sem_mappings_lock): Mark as hidden.
5106 * semaphoreP.h (__sem_mappings_lock): Likewise.
5108 2006-05-10 Ulrich Drepper <drepper@redhat.com>
5110 * pthread_atfork.c: Mark __dso_handle as hidden.
5112 2006-05-09 Ulrich Drepper <drepper@redhat.com>
5115 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5116 the reload problem. Change the one path in pthread_cancel_init
5117 which causes the problem. Force gcc to reload. Simplify callers.
5118 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5119 (_Unwind_GetBSP): Undo last patch.
5121 2006-05-07 Ulrich Drepper <drepper@redhat.com>
5123 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5124 function pointer is reloaded after pthread_cancel_init calls.
5127 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5128 pointers are reloaded after pthread_cancel_init calls.
5130 2006-05-01 Ulrich Drepper <drepper@redhat.com>
5132 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5135 2006-04-27 Ulrich Drepper <drepper@redhat.com>
5137 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5138 Allocate new object which is passed to timer_sigev_thread so that
5139 the timer can be deleted before the new thread is scheduled.
5141 2006-04-26 Roland McGrath <roland@redhat.com>
5143 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5145 2006-04-08 Ulrich Drepper <drepper@redhat.com>
5147 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5148 suffix for conditional jumps.
5149 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5150 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5151 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5152 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5153 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5154 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5156 * init.c (sigcancel_handler): Compare with correct PID even if the
5157 thread is in the middle of a fork call.
5158 (sighandler_setxid): Likewise.
5159 Reported by Suzuki K P <suzuki@in.ibm.com> .
5161 2006-04-07 Jakub Jelinek <jakub@redhat.com>
5163 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5165 2006-04-06 Ulrich Drepper <drepper@redhat.com>
5167 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5168 fails [Coverity CID 105].
5170 2006-04-05 Ulrich Drepper <drepper@redhat.com>
5172 * sysdeps/pthread/pthread.h: Add nonnull attributes.
5174 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
5177 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5178 Define __lll_rel_instr using lwsync.
5180 2006-03-27 Ulrich Drepper <drepper@redhat.com>
5182 * allocatestack.c (allocate_stack): Always initialize robust_head.
5183 * descr.h: Define struct robust_list_head.
5184 (struct pthread): Use robust_list_head in robust mutex list definition.
5185 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5186 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5187 (__pthread_initialize_minimal_internal): Register robust_list with
5189 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5190 Declare __set_robust_list_avail.
5191 * pthread_create.c (start_thread): Register robust_list of new thread.
5192 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5194 * pthread_mutex_destroy.c: For robust mutexes don't look at the
5195 number of users, it's unreliable.
5196 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5197 set_robust_list syscall is available.
5198 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5199 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5200 Set robust_head.list_op_pending before trying to lock a robust mutex.
5201 * pthread_mutex_timedlock.c: Likewise.
5202 * pthread_mutex_trylock.c: Likewise.
5203 * pthread_mutex_unlock.c: Likewise for unlocking.
5204 * Makefile (tests): Add tst-robust8.
5205 * tst-robust8.c: New file.
5207 2006-03-08 Andreas Schwab <schwab@suse.de>
5209 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5210 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5212 2006-03-05 Roland McGrath <roland@redhat.com>
5214 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5215 and $config_os doesn't match *linux*.
5217 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5219 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5220 Use __syscall_error.
5221 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5222 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5223 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5224 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5225 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5226 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5228 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5230 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5232 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5234 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5235 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5237 (__lll_robust_timedlock_wait): Likewise.
5238 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5239 (__lll_robust_lock_wait): Likewise.
5240 (__lll_robust_timedlock_wait): Likewise.
5241 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5242 (__lll_robust_lock_wait): Likewise.
5243 (__lll_robust_timedlock_wait): Likewise.
5245 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5247 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5248 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5249 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5250 lll_robust_mutex_unlock): Define.
5251 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5253 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5255 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5256 instead of <clone.S>.
5258 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5260 * Makefile (libpthread-routines): Add
5261 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5262 and pthread_mutex_[sg]etprioceiling.
5263 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5264 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5265 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5266 pthread_mutex_setprioceiling.
5267 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5268 PTHREAD_PRIO_PROTECT): New enum values.
5269 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5270 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5271 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5273 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5274 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5275 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5277 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5278 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5279 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5280 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5281 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5282 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5283 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5285 * pthread_mutex_getprioceiling.c: New file.
5286 * pthread_mutex_setprioceiling.c: New file.
5287 * pthread_mutexattr_getprioceiling.c: New file.
5288 * pthread_mutexattr_setprioceiling.c: New file.
5289 * pthread_mutexattr_getprotocol.c: New file.
5290 * pthread_mutexattr_setprotocol.c: New file.
5292 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5294 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5296 2006-02-27 Roland McGrath <roland@redhat.com>
5298 * sysdeps/pthread/Subdirs: List nptl here too.
5299 * configure (libc_add_on_canonical): New variable.
5301 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5303 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5304 self to get main source tree's file.
5305 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5306 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5307 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5308 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5309 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5310 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5311 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5312 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5313 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5314 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5315 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5316 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5317 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5319 * Makefile: Use $(sysdirs) in vpath directive.
5321 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5322 (CPPFLAGS-timer_routines.c): Likewise.
5324 * Makeconfig (includes): Variable removed.
5326 2006-02-26 Roland McGrath <roland@redhat.com>
5328 * sysdeps/generic/pt-raise.c: Moved to ...
5329 * pt-raise.c: ... here.
5330 * sysdeps/generic/lowlevellock.h: Moved to ...
5331 * lowlevellock.h: ... here.
5333 2006-02-23 Roland McGrath <roland@redhat.com>
5335 * descr.h (struct pthread): Add final member `end_padding'.
5336 (PTHREAD_STRUCT_END_PADDING): Use it.
5338 2006-02-20 Roland McGrath <roland@redhat.com>
5340 * sysdeps/mips: Directory removed, saved in ports repository.
5341 * sysdeps/unix/sysv/linux/mips: Likewise.
5343 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5345 * tst-robust1.c: Add second mutex to check that the mutex list is
5348 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5350 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5351 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5352 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5353 lll_robust_mutex_unlock): New macros.
5354 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5355 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5356 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5357 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5358 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5360 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5362 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5364 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5366 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5368 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5369 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5370 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5371 (lll_robust_mutex_unlock): Likewise.
5373 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5375 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5376 Set robust_list.__next rather than robust_list.
5377 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5378 (__pthread_list_t): New typedef.
5379 (pthread_mutex_t): Replace __next and __prev fields with __list.
5380 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5381 (__pthread_list_t): New typedef.
5382 (pthread_mutex_t): Replace __next and __prev fields with __list.
5383 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5384 (__pthread_list_t, __pthread_slist_t): New typedefs.
5385 (pthread_mutex_t): Replace __next and __prev fields with __list.
5386 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5387 (__pthread_list_t, __pthread_slist_t): New typedefs.
5388 (pthread_mutex_t): Replace __next and __prev fields with __list.
5389 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5390 (__pthread_list_t, __pthread_slist_t): New typedefs.
5391 (pthread_mutex_t): Replace __next and __prev fields with __list.
5392 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5393 (__pthread_slist_t): New typedef.
5394 (pthread_mutex_t): Replace __next field with __list.
5396 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5398 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5399 PTHREAD_MUTEX_OWNERDEAD.
5400 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5401 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5402 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5403 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5404 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5405 to PTHREAD_MUTEX_INCONSISTENT.
5406 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5407 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5408 * pthread_mutex_trylock.c: Likewise.
5409 * pthread_mutex_timedlock.c: Likewise.
5410 * pthread_mutex_unlock.c: Likewise.
5411 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5412 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5413 lowlevelrobustlock.sym.
5414 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5415 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5417 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5418 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5419 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5420 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5421 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5423 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5425 * allocatestack.c (allocate_stack): Initialize robust_list.
5426 * init.c (__pthread_initialize_minimal_internal): Likewise.
5427 * descr.h (struct xid_command): Pretty printing.
5428 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5429 robust_list. Adjust macros.
5430 * pthread_create.c (start_thread): Adjust robust_list handling.
5431 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5432 but the owner for all robust mutex types.
5433 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5434 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5435 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5436 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5438 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5439 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5441 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5443 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5444 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5446 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5448 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5450 (lll_futex_timed_wait): Define.
5452 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5454 * tst-cancel4.c: Test ppoll.
5456 2006-01-18 Andreas Jaeger <aj@suse.de>
5459 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5460 (pthread_mutex_t): Follow changes for other archs. Based on patch
5461 by Jim Gifford <patches@jg555.com>.
5463 2006-01-13 Richard Henderson <rth@redhat.com>
5465 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5467 2006-01-10 Roland McGrath <roland@redhat.com>
5469 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5470 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5471 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5472 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5473 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5474 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5475 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5476 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5477 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5478 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5480 2006-01-09 Roland McGrath <roland@redhat.com>
5482 * tst-initializers1-c89.c: New file.
5483 * tst-initializers1-c99.c: New file.
5484 * tst-initializers1-gnu89.c: New file.
5485 * tst-initializers1-gnu99.c: New file.
5486 * Makefile (tests): Add them.
5487 (CFLAGS-tst-initializers1-c89.c): New variable.
5488 (CFLAGS-tst-initializers1-c99.c): New variable.
5489 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5490 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5492 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5493 Use __extension__ on anonymous union definition.
5494 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5495 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5496 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5497 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5498 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5500 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5502 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5503 Don't give the union a name because it changes the mangled name.
5504 Instead name the struct for __data.
5505 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5507 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5510 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5512 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5513 stack bias to mc_ftp field.
5515 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5517 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5518 being too clever and reloading the futex value where it shouldn't.
5520 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5522 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5525 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5527 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5530 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5532 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5533 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5534 rename in tcbhead_t.
5536 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5537 Don't give the union a name because it changes the mangled name.
5538 Instead name the struct for __data.
5539 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5540 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5541 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5542 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5543 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5544 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5546 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5550 (lll_futex_timed_wait): Define.
5551 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5552 * sysdeps/pthread/aio_misc.h: New file.
5554 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5556 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5558 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5561 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5564 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5566 * tst-cancel24.cc: Use C headers instead of C++ headers.
5568 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5570 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5571 sparc-linux configured glibc.
5572 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5573 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5574 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5575 atomic_compare_and_exchange_val_24_acq instead of
5576 atomic_compare_and_exchange_val_acq.
5577 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5578 instead of atomic_exchange_rel.
5579 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5580 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5582 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5584 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5585 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5586 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5587 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5588 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5589 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5591 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5593 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5594 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5595 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5597 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5599 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5601 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5603 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5606 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5608 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5609 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5610 THREAD_COPY_POINTER_GUARD): Define.
5611 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5612 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5614 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5616 * version.c: Update copyright year.
5618 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5620 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5621 .eh_frame section, use cfi_* directives.
5622 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5624 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5626 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5629 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/pthread/sigaction.c: Removed.
5632 * sigaction.c: New file.
5633 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5635 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5637 * Makefile (tests): Add tst-signal7.
5638 * tst-signal7.c: New file.
5640 2005-12-27 Roland McGrath <roland@redhat.com>
5642 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5643 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5644 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5645 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5646 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5647 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5648 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5649 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5650 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5651 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5652 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5654 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5656 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5657 and __prev field to pthread_mutex_t.
5658 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5659 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5660 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5661 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5662 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5665 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5667 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5668 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5669 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5670 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5671 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5672 and PTHREAD_MUTEXATTR_FLAG_BITS.
5673 * descr.h (struct pthread): Add robust_list field and define
5674 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5675 * pthread_mutexattr_getrobust.c: New file.
5676 * pthread_mutexattr_setrobust.c: New file.
5677 * pthread_mutex_consistent.c: New file.
5678 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5679 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5680 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5681 Adjust pthread_mutex_t initializers.
5682 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5683 field to pthread_mutex_t.
5684 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5685 and __prev field to pthread_mutex_t.
5686 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5687 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5688 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5689 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5690 * pthread_mutexattr_gettype.c: Likewise.
5691 * pthread_mutexattr_setpshared.c: Likewise.
5692 * pthread_mutexattr_settype.c: Likewise.
5693 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5694 Initialize mutex kind according to robust flag.
5695 * pthread_mutex_lock.c: Implement local robust mutex.
5696 * pthread_mutex_timedlock.c: Likewise.
5697 * pthread_mutex_trylock.c: Likewise.
5698 * pthread_mutex_unlock.c: Likewise.
5699 * pthread_create.c (start_thread): Mark robust mutexes which remained
5701 * tst-robust1.c: New file.
5702 * tst-robust2.c: New file.
5703 * tst-robust3.c: New file.
5704 * tst-robust4.c: New file.
5705 * tst-robust5.c: New file.
5706 * tst-robust6.c: New file.
5707 * tst-robust7.c: New file.
5708 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5709 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5710 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5711 tst-robust5, tst-robust6, and tst-robust7.
5713 * tst-typesizes.c: New file.
5714 * Makefile (tests): Add tst-typesizes.
5716 * tst-once3.c: More debug output.
5718 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5720 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5721 missing after last change.
5723 * version.c: Update copyright year.
5725 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5727 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5728 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5729 * pthread_mutex_trylock.c: Likewise.
5730 * pthread_mutex_timedlock.c: Likewise.
5731 * pthread_mutex_unlock.c: Likewise.
5733 2005-12-22 Roland McGrath <roland@redhat.com>
5735 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5736 so that #include_next's search location is not reset to the -I..
5737 directory where <nptl/...> can be found.
5739 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5742 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5743 Fix unwind info. Remove useless branch prediction prefix.
5744 * tst-cancel24.cc: New file.
5745 * Makefile: Add rules to build and run tst-cancel24.
5747 2005-12-21 Roland McGrath <roland@redhat.com>
5749 * libc-cancellation.c: Use <> rather than "" #includes.
5750 * pt-cleanup.c: Likewise.
5751 * pthread_create.c: Likewise.
5752 * pthread_join.c: Likewise.
5753 * pthread_timedjoin.c: Likewise.
5754 * pthread_tryjoin.c: Likewise.
5755 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5756 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5757 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5758 * unwind.c: Likewise.
5760 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5762 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5763 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5764 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5765 THREAD_COPY_POINTER_GUARD): Define.
5767 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5769 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5771 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5772 THREAD_COPY_POINTER_GUARD): Define.
5773 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5774 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5775 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5776 THREAD_COPY_POINTER_GUARD): Define.
5777 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5778 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5779 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5780 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5781 Use PTR_DEMANGLE for B0 if defined.
5783 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5785 * pthread_create.c (__pthread_create_2_1): Use
5786 THREAD_COPY_POINTER_GUARD if available.
5787 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5788 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5789 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5790 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5791 * sysdeps/x86_64/tls.h: Likewise.
5793 2005-12-15 Roland McGrath <roland@redhat.com>
5795 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5797 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5799 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5801 * errno-loc.c: New file.
5803 2005-12-12 Roland McGrath <roland@redhat.com>
5805 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5806 adjustments before choosing stack size. Update minimum stack size
5807 calculation to match allocate_stack change.
5809 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5811 * allocatestack.c (allocate_stack): Don't demand that there is an
5812 additional full page available on the stack beside guard, TLS, the
5815 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5817 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5818 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5820 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5821 compiling 32-bit code we must define __cleanup_fct_attribute.
5823 005-11-24 Jakub Jelinek <jakub@redhat.com>
5826 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5827 __attribute__ instead of __attribute.
5828 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5829 (__cleanup_fct_attribute): Likewise.
5831 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5833 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5834 a write barrier before writing libgcc_s_getcfa.
5836 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5838 * sysdeps/unix/sysv/linux/configure: Removed.
5840 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5842 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5843 optional init_array/fini_array support.
5845 2005-10-24 Roland McGrath <roland@redhat.com>
5847 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5848 versioned_symbol use.
5850 2005-10-16 Roland McGrath <roland@redhat.com>
5852 * init.c (__pthread_initialize_minimal_internal): Even when using a
5853 compile-time default stack size, apply the minimum that allocate_stack
5854 will require, and round up to page size.
5856 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5858 * Makefile ($(test-modules)): Remove static pattern rule.
5860 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5861 Ulrich Drepper <drepper@redhat.com>
5863 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5864 alignment in callback function.
5865 * Makefile: Add rules to build and run tst-align3.
5866 * tst-align3.c: New file.
5868 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5870 * allocatestack.c (setxid_signal_thread): Add
5871 INTERNAL_SYSCALL_DECL (err).
5873 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5875 * allocatestack.c (setxid_signal_thread): Need to use
5876 atomic_compare_and_exchange_bool_acq.
5878 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5879 Jakub Jelinek <jakub@redhat.com>
5881 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5883 (struct pthread): Move specific_used field to avoid padding.
5884 Add setxid_futex field.
5885 * init.c (sighandler_setxid): Reset setxid flag and release the
5887 * allocatestack.c (setxid_signal_thread): New function. Broken
5888 out of the bodies of the two loops in __nptl_setxid. For undetached
5889 threads check whether they are exiting and if yes, don't send a signal.
5890 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5891 * pthread_create.c (start_thread): For undetached threads, check
5892 whether setxid bit is set. If yes, wait until signal has been
5895 * allocatestack.c (STACK_VARIABLES): Initialize them.
5896 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5898 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5900 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5901 waiters, awake all waiters on the associated mutex.
5903 2005-09-22 Roland McGrath <roland@redhat.com>
5905 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5906 ../sysdeps/x86_64/hp-timing.h).
5908 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5910 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5911 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5912 (lll_futex_wake_unlock): Define.
5913 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5914 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5915 (lll_futex_wake_unlock): Define.
5916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5917 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5918 (lll_futex_wake_unlock): Define.
5919 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5920 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5921 (lll_futex_wake_unlock): Define.
5922 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5923 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5924 (lll_futex_wake_unlock): Define.
5925 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5926 lll_futex_wake_unlock.
5927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5928 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5929 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5931 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5932 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5934 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5936 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5937 Fix typo in register name.
5939 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5941 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5942 Use __sigfillset. Document that sigfillset does the right thing wrt
5945 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5948 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5949 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5950 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5951 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5952 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5953 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5955 * Makefile (tests): Add tst-initializers1.
5956 (CFLAGS-tst-initializers1.c): Set.
5957 * tst-initializers1.c: New test.
5959 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5961 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5962 Make sure __flags are located at offset 48 from the start of the
5965 2005-07-02 Roland McGrath <roland@redhat.com>
5967 * Makeconfig: Comment fix.
5969 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5971 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5972 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5973 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5974 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5975 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5976 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5977 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5978 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5979 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5980 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5982 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5984 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5985 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5986 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5988 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5989 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5990 field. Put in sysinfo field unconditionally.
5991 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5992 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5993 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5994 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5996 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5997 * pthread_create.c (__pthread_create_2_1): Use
5998 THREAD_COPY_STACK_GUARD macro.
5999 * Makefile: Add rules to build and run tst-stackguard1{,-static}
6001 * tst-stackguard1.c: New file.
6002 * tst-stackguard1-static.c: New file.
6004 2005-06-14 Alan Modra <amodra@bigpond.net.au>
6006 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6007 Invoke CGOTSETUP and CGOTRESTORE.
6008 (CGOTSETUP, CGOTRESTORE): Define.
6010 2005-05-29 Richard Henderson <rth@redhat.com>
6012 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
6013 (tf_write, tf_writev): Use it.
6014 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
6017 2005-05-23 Jakub Jelinek <jakub@redhat.com>
6019 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6020 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
6021 __librt_*_asynccancel@local.
6023 2005-05-17 Alan Modra <amodra@bigpond.net.au>
6025 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
6026 all occurrences of JUMPTARGET. Instead append @local to labels.
6028 2005-05-20 Jakub Jelinek <jakub@redhat.com>
6030 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
6031 size/alignment of struct pthread rather than tcbhead_t.
6032 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6034 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6036 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6039 2005-05-19 Richard Henderson <rth@redhat.com>
6041 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
6042 __sync_val_compare_and_swap, not explicit _si variant.
6043 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
6045 2005-05-03 Ulrich Drepper <drepper@redhat.com>
6048 * sysdeps/pthread/pthread.h: Avoid empty initializers.
6050 2005-05-03 Jakub Jelinek <jakub@redhat.com>
6052 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
6053 .eh_frame section, use cfi_* directives.
6055 2005-04-27 Jakub Jelinek <jakub@redhat.com>
6057 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
6060 2005-04-27 Ulrich Drepper <drepper@redhat.com>
6063 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
6066 2005-04-27 Roland McGrath <roland@redhat.com>
6068 * Makefile (tests): Remove tst-clock2.
6070 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
6071 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
6072 translating to the kernel clockid_t for our own process/thread clock.
6074 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
6076 2005-04-15 Jakub Jelinek <jakub@redhat.com>
6078 * old_pthread_cond_init.c: Include <errno.h>.
6079 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6080 process shared or uses clock other than CLOCK_REALTIME.
6081 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6083 2005-04-13 David S. Miller <davem@davemloft.net>
6085 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6086 * sysdeps/sparc/sparc64/clone.S: New file.
6088 2005-04-05 Jakub Jelinek <jakub@redhat.com>
6091 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6092 __inline instead of inline.
6093 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6095 2005-03-31 Jakub Jelinek <jakub@redhat.com>
6097 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6098 functionally equivalent, but shorter instructions.
6099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6100 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6101 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6103 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6104 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6105 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6106 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6109 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6112 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6113 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6114 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6115 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6117 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
6119 * sysdeps/mips/Makefile: New file.
6120 * sysdeps/mips/nptl-sysdep.S: New file.
6121 * sysdeps/mips/tcb-offsets.sym: New file.
6122 * sysdeps/mips/pthread_spin_lock.S: New file.
6123 * sysdeps/mips/pthread_spin_trylock.S: New file.
6124 * sysdeps/mips/pthreaddef.h: New file.
6125 * sysdeps/mips/tls.h: New file.
6126 * sysdeps/mips/jmpbuf-unwind.h: New file.
6127 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6128 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6129 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6130 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6131 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6132 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6133 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6134 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6135 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6136 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6138 2005-03-23 Ulrich Drepper <drepper@redhat.com>
6141 * pthread_create.c (__pthread_create_2_1): Rename syscall error
6144 2005-03-10 Jakub Jelinek <jakub@redhat.com>
6146 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6148 2005-02-25 Roland McGrath <roland@redhat.com>
6150 * alloca_cutoff.c: Correct license text.
6151 * tst-unload.c: Likewise.
6152 * sysdeps/pthread/allocalim.h: Likewise.
6153 * sysdeps/pthread/pt-initfini.c: Likewise.
6154 * sysdeps/pthread/bits/libc-lock.h: Likewise.
6155 * sysdeps/pthread/bits/sigthread.h: Likewise.
6156 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6157 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6159 2005-02-16 Roland McGrath <roland@redhat.com>
6161 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6162 Use unsigned int * for ptr_nthreads.
6164 2005-02-14 Alan Modra <amodra@bigpond.net.au>
6167 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6170 2005-02-07 Richard Henderson <rth@redhat.com>
6173 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6176 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
6178 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6179 order of arguments in invocation of atomic_add_zero.
6181 2005-01-26 Jakub Jelinek <jakub@redhat.com>
6184 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6185 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6186 at least gotntpoff relocation and addition.
6187 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6189 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6191 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6194 2005-01-06 Ulrich Drepper <drepper@redhat.com>
6196 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6197 entry for static tls deallocation fix.
6198 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6199 also contains information whether the memory pointed to is static
6201 * sysdeps/i386/tls.h: Likewise.
6202 * sysdeps/ia64/tls.h: Likewise.
6203 * sysdeps/powerpc/tls.h: Likewise.
6204 * sysdeps/s390/tls.h: Likewise.
6205 * sysdeps/sh/tls.h: Likewise.
6206 * sysdeps/sparc/tls.h: Likewise.
6207 * sysdeps/x86_64/tls.h: Likewise.
6209 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6211 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6213 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6215 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6217 * Makefile (tests): Add tst-align2.
6218 * tst-align2.c: New test.
6219 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6220 -mpreferred-stack-boundary=4.
6222 2004-12-18 Roland McGrath <roland@redhat.com>
6224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6225 New file removed withdrawn for the moment.
6227 2004-12-17 Richard Henderson <rth@redhat.com>
6229 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6230 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6232 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6234 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6235 Increased PTHREAD_STACK_MIN.
6237 * tst-context1.c (stacks): Use bigger stack size.
6239 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6241 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6242 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6244 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6246 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6247 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6248 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6250 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6252 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6254 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6256 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6257 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6259 * tst-getpid1.c: If child crashes, report this first. Print which
6262 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6264 * init.c (__pthread_initialize_minimal_internal): Also unblock
6267 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6269 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6270 _POSIX_THREAD_CPUTIME): Define to 0.
6271 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6272 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6273 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6274 __timer_signal_thread_tclk): Remove.
6275 (init_module): Remove their initialization.
6276 (thread_cleanup): Remove their cleanup assertions.
6277 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6278 __timer_signal_thread_tclk): Remove.
6279 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6280 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6281 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6283 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6285 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6286 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6288 * Makefile (tests): Add tst-getpid2.
6289 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6290 (do_test): Use it. Use __clone2 instead of clone on ia64.
6291 * tst-getpid2.c: New test.
6293 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6295 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6297 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6299 * Makefile (tests): Add tst-getpid1.
6300 * tst-getpid1.c: New file.
6301 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6302 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6304 2004-12-02 Roland McGrath <roland@redhat.com>
6306 * Makefile (libpthread-nonshared): Variable removed.
6307 ($(objpfx)libpthread_nonshared.a): Target removed.
6308 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6309 These are now handled by generic magic from
6310 libpthread-static-only-routines being set.
6312 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6314 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6315 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6316 _POSIX_THREAD_PRIO_PROTECT): Define.
6317 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6318 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6319 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6321 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6323 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6324 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6325 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6326 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6327 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6328 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6329 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6331 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6333 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6335 * Makefile (libpthread-routines): Add pthread_setschedprio.
6336 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6337 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6338 * pthread_setschedprio.c: New file.
6340 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6342 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6343 * pthread_cancel.c (pthread_create): Likewise.
6345 * Makefile (libpthread-routines): Add vars.
6346 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6347 * init.c (__default_stacksize, __is_smp): Remove.
6349 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6350 and define a wrapper macro.
6351 (PTHREAD_STATIC_FN_REQUIRE): Define.
6352 * allocatestack.c (__find_thread_by_id): Undefine.
6353 * pthread_create (__pthread_keys): Remove.
6354 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6355 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6356 PTHREAD_STATIC_FN_REQUIRE.
6358 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6360 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6361 parameter to REGISTER macro.
6363 2004-11-17 Roland McGrath <roland@redhat.com>
6365 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6366 Make sure SIGCANCEL is blocked as well.
6368 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6370 * sysdeps/pthread/setxid.h: New file.
6371 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6372 (struct xid_command): Add forward decl.
6373 (struct pthread_functions): Change return type of __nptl_setxid hook
6375 * pthreadP.h (__nptl_setxid): Change return type to int.
6376 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6377 calling thread, return its return value and set errno on failure.
6378 * descr.h (struct xid_command): Change id type to long array.
6380 * Makefile: Add rules to build and test tst-setuid1 and
6382 * tst-setuid1.c: New test.
6383 * tst-setuid1-static.c: New test.
6385 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6387 * Makefile (tests): Add tst-exit3.
6388 * tst-exit3.c: New test.
6390 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6392 * Makefile (tests): Add tst-exit2.
6393 * tst-exit2.c: New file.
6395 2004-11-09 Roland McGrath <roland@redhat.com>
6398 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6399 here, before calling clone.
6400 * pthread_create.c (start_thread): Don't do it here.
6402 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6404 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6406 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6408 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6409 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6412 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6414 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6415 if sched_priority is not between minprio and maxprio.
6417 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6419 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6420 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6422 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6423 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6425 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6427 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6428 not-cancelable I/O functions.
6430 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6432 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6433 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6434 make sure 2 is stored in the futex and we looked at the old value.
6435 Fix a few other problems to return the correct value.
6437 2004-10-14 Richard Henderson <rth@redhat.com>
6439 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6442 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6444 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6445 of pthread-functions.h and pthreaddef.h.
6446 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6448 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6449 Change __data.__nwaiters from int to unsigned int.
6451 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6452 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6454 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6457 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6458 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6460 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6462 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6463 test fails, remove message queue.
6464 (tf_msgsnd): Likewise.
6466 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6468 * tst-clock1.c: Change #ifdef to #if defined.
6469 * tst-clock2.c: Likewise.
6470 * tst-cond11.c: Likewise.
6472 * sysdeps/pthread/timer_create.c (timer_create): Use
6473 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6474 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6477 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6479 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6480 _POSIX_THREAD_CPUTIME): Define to 0.
6482 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6484 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6485 and _POSIX_THREAD_CPUTIME to zero.
6486 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6487 * tst-barrier2.c: Fix testing for POSIX feature.
6488 * tst-clock1.c: Likewise.
6489 * tst-clock2.c: Likewise.
6490 * tst-cond11.c: Likewise.
6491 * tst-cond4.c: Likewise.
6492 * tst-cond6.c: Likewise.
6493 * tst-flock2.c: Likewise.
6494 * tst-mutex4.c: Likewise.
6495 * tst-mutex9.c: Likewise.
6496 * tst-rwlock12.c: Likewise.
6497 * tst-rwlock4.c: Likewise.
6498 * tst-signal1.c: Likewise.
6499 * tst-spin2.c: Likewise.
6500 * sysdeps/pthread/posix-timer.h: Likewise.
6501 * sysdeps/pthread/timer_create.c: Likewise.
6502 * sysdeps/pthread/timer_routines.c: Likewise.
6504 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6507 (__lll_mutex_timedlock_wait): Address futex correctly.
6509 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6510 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6511 make sure 2 is stored in the futex and we looked at the old value.
6512 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6513 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6514 which might very well made the code not working at all before.
6517 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6519 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6520 allow SIGSETXID to be sent.
6521 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6522 for SIGSETXID to be defined.
6523 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6524 SIGSETXID cannot be blocked.
6526 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6527 Add __extension__ to long long types.
6528 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6529 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6530 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6531 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6532 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6533 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6534 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6536 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6538 * descr.h (struct pthread): Add stopped_start field.
6539 * sysdeps/pthread/createthread.c (create_thread): Set
6540 start_stopped flag in descriptor for new thread appropriately.
6541 * pthread_create.c (start_thread): Only take lock to be stopped on
6542 startup if stopped_start flag says so.
6544 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6546 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6547 is created detached and if yes, do not try to free the stack in case
6548 the thread creation failed.
6549 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6550 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6551 case there has been no error. [BZ #405]
6553 * pthread_create.c (start_thread): Don't wait for scheduler data
6554 etc to be set at the beginning of the function. The cancellation
6555 infrastructure must have been set up. And enable async
6556 cancellation before potentially going to sleep. [BZ #401]
6558 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6560 * Versions: Remove exports for pthread_set*id_np functions.
6561 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6563 * Makefile: Don't build pthread_set*id code for now.
6565 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6567 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6569 * allocatestack.c (__nptl_setxid): New function.
6570 * descr.h (struct xid_command): Define type.
6571 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6572 (sighandler_setxid): New function.
6573 (__pthread_initialize_minimal): Register sighandler_setxid for
6575 * pt-allocrtsig.c: Update comment.
6576 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6577 Declare __nptl_setxid.
6578 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6579 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6580 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6581 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6582 and pthread_setresuid_np.
6583 * pthread_setgid_np.c: New file.
6584 * pthread_setuid_np.c: New file.
6585 * pthread_setegid_np.c: New file.
6586 * pthread_seteuid_np.c: New file.
6587 * pthread_setregid_np.c: New file.
6588 * pthread_setreuid_np.c: New file.
6589 * pthread_setresgid_np.c: New file.
6590 * pthread_setresuid_np.c: New file.
6591 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6592 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6593 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6594 and pthread_setresuid_np.
6595 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6596 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6597 pthread_setregid, and pthread_setresgid.
6599 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6601 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6602 ENOMEM when out of memory.
6604 2004-09-10 Roland McGrath <roland@redhat.com>
6607 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6608 code, since we don't try to use the broken CLONE_STOPPED any more.
6609 * pthread_create.c (start_thread): Likewise.
6611 2004-09-15 Richard Henderson <rth@redhat.com>
6613 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6615 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6617 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6618 (__libc_unwind_longjmp): Delete macro and declare as function.
6619 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6620 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6622 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6623 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6624 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6626 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6628 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6630 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6631 types also for __USE_XOPEN2K.
6632 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6633 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6634 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6635 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6636 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6637 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6638 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6641 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6643 * sysdeps/pthread/pthread.h
6644 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6645 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6646 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6647 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6650 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6652 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6653 PSEUDO to be used with . prefix.
6655 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6656 Use atomic_increment instead of atomic_exchange_and_add.
6657 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6659 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6661 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6664 * allocatestack.c (allocate_stack): Use atomic_increment_val
6665 instead of atomic_exchange_and_add.
6666 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6667 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6669 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6672 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6673 the initialization function might throw.
6675 2005-09-05 Richard Henderson <rth@redhat.com>
6677 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6678 Move definition inside libpthread, libc, librt check. Provide
6679 definition for rtld.
6681 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6683 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6684 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6685 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6686 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6687 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6688 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6689 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6690 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6693 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6694 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6695 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6698 Decrement __nwaiters. If pthread_cond_destroy has been called and
6699 this is the last waiter, signal pthread_cond_destroy caller and
6700 avoid using the pthread_cond_t structure after unlock.
6701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6703 Read clock type from the least significant bits of __nwaiters instead
6705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6706 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6708 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6711 * Makefile (tests): Add tst-cond20 and tst-cond21.
6712 * tst-cond20.c: New test.
6713 * tst-cond21.c: New test.
6714 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6715 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6717 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6720 (pthread_cond_t): Likewise.
6721 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6723 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6725 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6727 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6728 (cond_nwaiters): New.
6730 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6731 if there are waiters not signalled yet.
6732 Wait until all already signalled waiters wake up.
6733 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6734 __nwaiters. If pthread_cond_destroy has been called and this is the
6735 last waiter, signal pthread_cond_destroy caller and avoid using
6736 the pthread_cond_t structure after unlock.
6737 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6738 decrement it when leaving. If pthread_cond_destroy has been called
6739 and this is the last waiter, signal pthread_cond_destroy caller.
6740 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6741 Likewise. Read clock type from the least significant bits of
6742 __nwaiters instead of __clock.
6743 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6744 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6745 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6746 clock type just from the last COND_CLOCK_BITS bits of value.
6747 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6748 instead of __clock, just from second bit of condattr's value.
6750 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6752 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6753 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6755 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6757 2004-08-15 Roland McGrath <roland@frob.com>
6759 * pthread_atfork.c: Update copyright terms including special exception
6760 for these trivial files, which are statically linked into executables
6761 that use dynamic linking for the significant library code.
6763 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6765 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6766 pthread_rwlock_rdlock.
6767 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6768 Decrease __nr_readers_queued after reacquiring lock.
6769 * sysdeps/pthread/pthread_rwlock_timedrdlock
6770 (pthread_rwlock_timedrdlock): Likewise.
6771 Reported by Bob Cook <bobcook47@hotmail.com>.
6773 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6775 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6776 before pthread_barrier_wait.
6778 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6781 Remove unnecessary exception handling data.
6783 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6786 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6787 instead of clockid_t.
6789 2004-07-21 Roland McGrath <roland@redhat.com>
6791 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6793 2004-07-19 Roland McGrath <roland@redhat.com>
6795 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6797 2004-07-02 Roland McGrath <roland@redhat.com>
6799 * configure: Don't exit.
6801 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6803 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6804 (__pthread_cond_timedwait): Check for invalid nanosecond in
6807 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6809 * Makefile: Add rules to build and run tst-fini1.
6810 * tst-fini1.c: New file.
6811 * tst-fini1mod.c: New file.
6813 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6815 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6816 if no cancellation support is needed.
6817 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6818 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6819 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6820 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6821 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6822 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6823 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6824 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6825 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6827 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6828 only if not already defined.
6830 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6833 constraint "m" instead of "0" for futex.
6835 * shlib-versions: Add powerpc64-.*-linux.*.
6837 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6839 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6840 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6842 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6843 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6846 2004-06-29 Roland McGrath <roland@redhat.com>
6848 * Banner: NPTL no longer has its own version number.
6849 * Makefile (nptl-version): Variable removed.
6850 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6851 using $(version), the glibc version number.
6853 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6855 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6856 Fix branch offset for a PLT entry.
6857 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6859 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6861 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6863 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6866 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6868 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6871 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6873 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6874 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6876 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6877 (pthread_rwlock_timedrdlock): Likewise.
6879 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6881 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6882 Set __r7 to val, not mutex.
6884 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6886 * Makefile: Add rules to build tst-rwlock14.
6887 * tst-rwlock14.c: New file.
6889 2004-06-24 Boris Hu <boris.hu@intel.com>
6891 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6895 2004-06-19 Andreas Jaeger <aj@suse.de>
6897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6898 assembler in last patch.
6900 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6902 * sysdeps/pthread/pthread_cond_timedwait.c
6903 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6905 (__pthread_cond_timedwait): Check for invalid nanosecond in
6907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6908 * tst-cond19.c: New file.
6909 * Makefile: Add rules to build and run tst-cond19.
6911 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6913 * tst-context1.c (GUARD_PATTERN): Defined.
6914 (tst_context_t): Define struct containing ucontext_t & guard words.
6915 (ctx): Declare as an array of tst_context_t.
6916 (fct): Verify uc_link & guard words are still valid.
6917 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6919 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6921 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6922 Add __data.__futex field, reshuffle __data.__clock.
6923 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6924 (__pthread_cond_signal): Increment __futex at the same time as
6925 __wakeup_seq or __total_seq. Pass address of __futex instead of
6926 address of low 32-bits of __wakeup_seq to futex syscall.
6927 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6928 (__pthread_cond_wait): Likewise. Pass __futex value from before
6929 releasing internal lock to FUTEX_WAIT.
6930 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6931 (__pthread_cond_timedwait): Likewise.
6932 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6933 (FUTEX_CMP_REQUEUE): Define.
6934 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6935 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6936 Pass __futex value from before the unlock and __futex address instead
6937 of address of low 32-bits of __wakeup_seq to futex syscall.
6938 Fallback to FUTEX_WAKE all on any errors.
6940 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6942 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6944 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6945 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6946 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6947 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6948 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6950 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6952 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6953 Add memory clobber to inline assembly.
6954 (__lll_mutex_trylock): Likewise.
6955 (__lll_mutex_cond_trylock): Likewise.
6957 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6959 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6960 Pass val argument as 6th system call argument in %r7.
6962 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6964 * Makefile (tests): Add tst-cond16.
6965 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6966 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6968 Add __data.__futex field, reshuffle __data.__clock.
6969 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6970 (__pthread_cond_signal): Increment __futex at the same time as
6971 __wakeup_seq or __total_seq. Pass address of __futex instead of
6972 address of low 32-bits of __wakeup_seq to futex syscall.
6973 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6974 (__pthread_cond_wait): Likewise. Pass __futex value from before
6975 releasing internal lock to FUTEX_WAIT.
6976 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6977 (__pthread_cond_timedwait): Likewise.
6978 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6979 (FUTEX_CMP_REQUEUE): Define.
6980 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6981 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6982 Pass __futex value from before the unlock and __futex address instead
6983 of address of low 32-bits of __wakeup_seq to futex syscall.
6984 Fallback to FUTEX_WAKE all on any errors.
6985 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6987 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6988 internally. Return non-zero if error, zero if success.
6989 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6990 Add __data.__futex field, reshuffle __data.__clock.
6991 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6993 (lll_futex_requeue): Add val argument, return 1 unconditionally
6995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6996 Add __data.__futex field, reshuffle __data.__clock.
6997 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6999 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7000 internally. Return non-zero if error, zero if success.
7001 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7002 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
7003 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7005 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7006 internally. Return non-zero if error, zero if success.
7007 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
7008 Add __data.__futex field, reshuffle __data.__clock.
7009 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
7011 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7012 internally. Return non-zero if error, zero if success.
7013 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
7014 Add __data.__futex field, reshuffle __data.__clock.
7015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
7016 Add __data.__futex field, reshuffle __data.__clock.
7017 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
7018 Increment __futex at the same time as __wakeup_seq or __total_seq.
7019 Pass address of __futex instead of address of low 32-bits of
7020 __wakeup_seq to futex syscall.
7021 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7022 Pass __futex value from before releasing internal lock
7024 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7025 Likewise. Avoid unnecessary shadowing of variables.
7026 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
7027 Set __futex to 2 * __total_seq. Pass __futex value from before the
7028 unlock and __futex address instead of address of low 32-bits of
7029 __wakeup_seq to futex_requeue macro, adjust for new return value
7031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
7032 (__pthread_cond_signal): Increment __futex at the same time as
7033 __wakeup_seq or __total_seq. Pass address of __futex instead of
7034 address of low 32-bits of __wakeup_seq to futex syscall.
7035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7036 (__pthread_cond_wait): Likewise. Pass __futex value from before
7037 releasing internal lock to FUTEX_WAIT.
7038 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7039 (__pthread_cond_timedwait): Likewise.
7040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7041 (FUTEX_CMP_REQUEUE): Define.
7042 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7043 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7044 Pass __futex value from before the unlock and __futex address instead
7045 of address of low 32-bits of __wakeup_seq to futex syscall.
7046 Fallback to FUTEX_WAKE all on any errors.
7048 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7050 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
7051 Add nop to align the end of critical section.
7052 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
7054 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7056 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7057 Add __broadcast_seq field.
7058 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
7059 all waiters as woken with woken_seq and bump broadcast counter.
7060 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
7061 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
7062 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7063 Comment typo fixes. Avoid returning -ETIMEDOUT.
7065 2004-06-01 Ulrich Drepper <drepper@redhat.com>
7067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7068 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
7069 Reported by Kaz Kojima.
7071 2004-05-25 Jakub Jelinek <jakub@redhat.com>
7073 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
7075 2004-05-21 Jakub Jelinek <jakub@redhat.com>
7077 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
7078 __broadcast_seq with bc_seq after acquiring internal lock instead of
7081 2004-05-18 Jakub Jelinek <jakub@redhat.com>
7083 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7086 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7088 (pthread_cond_t): Add __data.__broadcast_seq field.
7089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7090 (FRAME_SIZE): Define.
7091 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
7093 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7095 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
7097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7098 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
7101 2004-05-18 Ulrich Drepper <drepper@redhat.com>
7103 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7104 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7105 Add __broadcast_seq field.
7106 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7107 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7108 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7109 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7110 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7112 all waiters as woken with woken_seq and bump broadcast counter.
7113 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7115 __broadcast_seq field.
7116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7117 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7118 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7119 * pthread_cond_init.c: Initialize __broadcast_seq field.
7120 * Makefile (tests): Add tst-cond17 and tst-cond18.
7121 Add .NOTPARALLEL goal.
7122 * tst-cond16.c: New file. From Jakub.
7123 * tst-cond17.c: New file. From Jakub.
7124 * tst-cond18.c: New file. From Jakub.
7126 2004-05-16 Ulrich Drepper <drepper@redhat.com>
7128 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7132 Parametrize frame size. Correct some unwind info.
7133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7135 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7137 * tst-stack3.c: Note testing functionality beyond POSIX.
7139 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7141 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7142 Change conditional from ifdef to if.
7144 2004-04-23 Jakub Jelinek <jakub@redhat.com>
7146 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7147 SYSDEP_CANCEL_ERROR): Define.
7150 2004-05-01 Jakub Jelinek <jakub@redhat.com>
7152 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7154 2004-04-20 Jakub Jelinek <jakub@redhat.com>
7156 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7158 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7160 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7161 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7162 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7163 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7165 2004-04-19 Ulrich Drepper <drepper@redhat.com>
7167 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7168 thread has all signals blocked.
7170 2004-04-18 Andreas Jaeger <aj@suse.de>
7172 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7173 (SEM_VALUE_MAX): Add missing brace.
7175 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7177 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7179 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7180 * sysdeps/pthread/tst-mqueue8x.c: New test.
7181 * tst-cancel4.c: Update comment about message queues.
7183 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7184 return it_value { 0, 0 }.
7185 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7187 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7188 assertion for SIGEV_NONE.
7189 (thread_attr_compare): Compare all attributes, not just a partial
7192 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7194 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7196 2004-04-17 Ulrich Drepper <drepper@redhat.com>
7198 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7199 Just use a plain number.
7200 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7201 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7202 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7203 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7204 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7205 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7206 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7208 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7210 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7212 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7214 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7216 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7217 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7218 of calling sigwaitinfo.
7220 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7222 * allocatestack.c (allocate_stack): Set reported_guardsize
7224 * pthread_getattr_np.c (pthread_getattr_np): Use
7225 reported_guardsize instead of guardsize.
7226 * descr.h (struct pthread): Add reported_guardsize field.
7228 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7230 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7232 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7234 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7236 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7238 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7239 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7240 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7241 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7242 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7244 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7245 (_POSIX_MESSAGE_PASSING): Define.
7246 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7247 (_POSIX_MESSAGE_PASSING): Define.
7248 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7249 (_POSIX_MESSAGE_PASSING): Define.
7251 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7253 * tst-context1.c (fct): Check whether correct stack is used.
7255 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7258 matching constraints for asm mem parameters.
7260 * tst-clock2.c (tf): Don't define unless needed.
7262 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7264 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7267 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7270 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7271 * pthreadP.h: Declare __nptl_deallocate_tsd.
7272 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7275 * Makefile (tests): Add tst-tsd5.
7276 * tst-tsd5.c: New file.
7278 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7280 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7281 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7282 is SHLIB_COMPAT check.
7283 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7284 (__pthread_attr_getaffinity_old): Likewise.
7285 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7286 (__pthread_getaffinity_old): Likewise.
7287 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7288 (__pthread_setaffinity_old): Likewise.
7290 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7292 * allocatestack.c (_make_stacks_executable): Call
7293 _dl_make_stack_executable first.
7295 2004-03-24 Roland McGrath <roland@redhat.com>
7297 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7298 constraint instead of "0".
7300 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7302 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7303 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7305 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7306 code to avoid warning.
7308 2004-03-24 Andreas Jaeger <aj@suse.de>
7310 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7311 (__pthread_attr_setaffinity_old): Remove const.
7313 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7315 * sysdeps/unix/sysv/linux/smp.h: New file.
7316 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7317 * init.c: Define __is_smp.
7318 (__pthread_initialize_minimal_internal): Call is_smp_system to
7319 initialize __is_smp.
7320 * pthreadP.h: Declare __is_smp.
7321 Define MAX_ADAPTIVE_COUNT is necessary.
7322 * pthread_mutex_init.c: Add comment regarding __spins field.
7323 * pthread_mutex_lock.c: Implement adaptive mutex type.
7324 * pthread_mutex_timedlock.c: Likewise.
7325 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7326 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7328 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7329 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7330 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7331 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7332 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7333 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7334 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7335 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7336 lll_mutex_cond_trylock.
7337 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7338 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7339 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7340 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7341 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7342 Define BUSY_WAIT_NOP.
7343 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7344 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7346 * tst-mutex5.c: Add support for testing adaptive mutexes.
7347 * tst-mutex7.c: Likewise.
7348 * tst-mutex5a.c: New file.
7349 * tst-mutex7a.c: New file.
7350 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7352 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7353 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7354 vgettimeofday call might destroy the content.
7356 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7359 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7360 No need to restrict type of ret. Make it int. Add comment.
7362 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7363 Remove unnecessary setne instruction.
7365 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7367 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7368 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7369 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7370 If realloc fails, break out of the loop.
7372 2004-03-20 Andreas Jaeger <aj@suse.de>
7374 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7375 (__pthread_setaffinity_old): Fix interface.
7376 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7377 (__pthread_getaffinity_old): Likewise.
7379 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7380 (__pthread_setaffinity_new): Remove duplicate declaration.
7382 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7384 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7385 the return value to a safe register.
7386 (CDISABLE): Set the function argument correctly.
7388 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7390 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7392 Rewrite so that only one locked memory operation per round is needed.
7393 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7394 (pthread_barrier_wait): After wakeup, release lock only when the
7395 last thread stopped using the barrier object.
7396 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7397 (__pthread_cond_wait): Don't store mutex address if the current
7398 value is ~0l. Add correct cleanup support and unwind info.
7399 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7400 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7401 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7402 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7403 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7404 Add correct cleanup support and unwind info.
7405 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7406 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7407 information for syscall wrappers.
7409 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7411 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7412 cpusetsize field, remove next.
7413 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7414 parameter for size of the CPU set.
7415 (pthread_setaffinity_np): Likewise.
7416 (pthread_attr_getaffinity_np): Likewise.
7417 (pthread_attr_setaffinity_np): Likewise.
7418 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7419 interface change, keep compatibility code.
7420 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7421 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7422 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7423 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7424 __pthread_getaffinity_np.
7425 * Versions: Add version for changed interfaces.
7426 * tst-attr3.c: Adjust test for interface change.
7427 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7428 increasing buffer sizes.
7429 * pthread_attr_destroy.c: Remove unused list handling.
7430 * pthread_attr_init.c: Likewise.
7432 2004-03-17 Roland McGrath <roland@redhat.com>
7434 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7435 first argument to clock_getres so we ever enable kernel timers.
7437 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7439 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7441 2004-03-12 Richard Henderson <rth@redhat.com>
7443 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7444 oldvalue from CENABLE to CDISABLE.
7446 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7448 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7449 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7450 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7451 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7453 2004-03-11 Richard Henderson <rth@redhat.com>
7455 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7456 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7457 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7459 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7461 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7462 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7463 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7465 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7467 * forward.c (__pthread_cond_broadcast_2_0,
7468 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7469 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7470 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7472 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7474 * sysdeps/sh/tcb-offsets.sym: Add PID.
7475 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7476 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7478 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7480 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7481 include <sysdep-cancel.h>, vfork is no cancellation point.
7482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7483 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7484 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7486 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7488 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7490 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7491 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7493 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7495 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7496 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7497 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7498 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7499 of DO_CALL_VIA_BREAK. Work around a gas problem.
7501 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7502 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7503 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7504 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7505 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7506 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7508 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7509 a local register for saving old PID. Negate PID in parent upon exit.
7511 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7513 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7514 before syscall, set to the old value in the parent afterwards.
7515 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7516 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7518 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7519 before syscall, set to the old value in the parent afterwards.
7520 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7521 * sysdeps/s390/tcb-offsets.sym: Add PID.
7523 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7524 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7525 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7526 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7527 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7528 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7530 2004-03-10 Andreas Schwab <schwab@suse.de>
7532 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7533 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7534 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7536 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7538 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7539 * tst-cancel21.c (do_one_test): Likewise.
7540 Reported by Gordon Jin <gordon.jin@intel.com>.
7542 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7544 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7545 if non-zero and set to INT_MIN if zero.
7546 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7547 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7548 (SAVE_PID, RESTORE_PID): Define.
7550 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7551 Use relative path to avoid including NPTL i386/vfork.S.
7552 (SAVE_PID, RESTORE_PID): Define.
7553 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7554 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7555 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7557 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7558 * tst-vfork1.c: New test.
7559 * tst-vfork2.c: New test.
7560 * tst-vfork1x.c: New test.
7561 * tst-vfork2x.c: New test.
7563 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7565 * sysdeps/i386/tcb-offsets.sym: Add PID.
7566 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7567 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7568 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7570 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7572 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7574 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7576 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7579 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7581 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7584 * tst-once4.c: Remove unnecessary macro definition.
7586 * tst-mutex7.c (do_test): Limit thread stack size.
7587 * tst-once2.c (do_test): Likewise.
7588 * tst-tls3.c (do_test): Likewise.
7589 * tst-tls1.c (do_test): Likewise.
7590 * tst-signal3.c (do_test): Likewise.
7591 * tst-kill6.c (do_test): Likewise.
7592 * tst-key4.c (do_test): Likewise.
7593 * tst-join4.c (do_test): Likewise.
7594 * tst-fork1.c (do_test): Likewise.
7595 * tst-context1.c (do_test): Likewise.
7596 * tst-cond2.c (do_test): Likewise.
7597 * tst-cond10.c (do_test): Likewise.
7598 * tst-clock2.c (do_test): Likewise.
7599 * tst-cancel10.c (do_test): Likewise.
7600 * tst-basic2.c (do_test): Likewise.
7601 * tst-barrier4.c (do_test): Likewise.
7603 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7605 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7607 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7610 (__pthread_cond_timedwait): Optimize wakeup test.
7611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7612 (__pthread_cond_wait): Likewise.
7613 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7614 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7617 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7619 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7620 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7621 the atomic instruction needed.
7622 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7623 (__lll_mutex_lock_wait): Likewise.
7625 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7627 * Makefile (tests): Add tst-cond14 and tst-cond15.
7628 * tst-cond14.c: New file.
7629 * tst-cond15.c: New file.
7631 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7633 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7634 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7635 needs to be implemented differently to be useful.
7637 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7639 * pthread_attr_setschedparam.c: Don't test priority against limits
7640 here. Set ATTR_FLAG_SCHED_SET flag.
7641 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7642 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7643 from parent thread to child. If attribute is used and scheduling
7644 parameters are not inherited, copy parameters from attribute or
7645 compute them. Check priority value.
7646 * pthread_getschedparam.c: If the parameters aren't known yet get
7647 them from the kernel.
7648 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7649 ATTR_FLAG_POLICY_SET flag for thread.
7650 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7651 and ATTR_FLAG_POLICY_SET.
7653 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7655 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7656 fail if stack address hasn't been set. Just return 0.
7658 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7660 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7661 libpthread for the files in this list.
7662 (CFLAGS-tst-unload): Removed.
7663 * tst-unload.c (do_test): Don't use complete path for
7666 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7669 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7671 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7672 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7673 operation per round is needed.
7674 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7675 (__lll_mutex_lock_wait): Likewise.
7677 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7679 * tst-cancel9.c (cleanup): Don't print to stderr.
7681 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7683 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7685 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7687 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7688 (__syscall_error_handler2): Call CDISABLE.
7689 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7690 (__syscall_error_handler2): Call CDISABLE.
7692 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7693 Release lock before the loop, don't reacquire it.
7695 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7697 2004-02-19 Andreas Schwab <schwab@suse.de>
7699 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7702 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7704 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7705 (pthread_barrier_wait): After wakeup, release lock only when the
7706 last thread stopped using the barrier object.
7707 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7708 (pthread_barrier_wait): Likewise.
7709 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7711 * Makefile (tests): Add tst-barrier4.
7712 * tst-barrier4.c: New file.
7714 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7715 (__pthread_cond_timedwait): Perform timeout test while holding
7716 internal lock to prevent wakeup race.
7717 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7718 * sysdeps/pthread/pthread_cond_timedwait.c
7719 (__pthread_cond_timedwait): Likewise.
7720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7721 (__pthread_cond_timedwait): Likewise.
7723 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7725 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7726 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7727 * Makefile (tests): Add tst-rwlock13.
7728 * tst-rwlock13.c: New test.
7730 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7733 (__condvar_tw_cleanup): Little optimization.
7734 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7736 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7738 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7739 libpthread as "lib" parameter to SHLIB_COMPAT.
7740 (__novmx_siglongjmp): Fix typo in function name.
7741 (__novmx_longjmp): Fix typo in function name.
7743 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7745 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7748 * sysdeps/generic/pt-longjmp.c: Moved to...
7749 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7751 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7753 * Makefile (libpthread-routines): Add pt-cleanup.
7754 * pt-longjmp.c: Removed.
7755 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7756 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7757 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7758 Version longjmp, siglongjmp for GLIBC_2.3.4.
7759 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7761 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7763 * sysdeps/pthread/pthread_cond_timedwait.c
7764 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7765 Reuse code. Add __builtin_expects.
7767 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7768 (__pthread_cond_timedwait): Get internal lock in case timeout has
7769 passed before the futex syscall.
7770 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7772 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7774 * allocatestack.c: Pretty printing.
7776 * sysdeps/pthread/createthread.c (create_thread): Don't add
7777 CLONE_DETACHED bit if it is not necessary.
7779 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7781 * pthread_getattr_np.c: Include ldsodefs.h.
7783 2004-01-16 Richard Henderson <rth@redhat.com>
7785 * allocatestack.c: Don't declare __libc_stack_end.
7786 * init.c (__pthread_initialize_minimal_internal): Likewise.
7787 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7789 2004-01-15 Richard Henderson <rth@redhat.com>
7791 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7792 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7793 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7794 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7795 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7796 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7797 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7798 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7800 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7802 * init.c (pthread_functions): Make array const.
7804 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7806 * allocatestack.c (__make_stacks_executable): Change interface.
7807 Check parameters. Pass parameter on to libc counterpart.
7808 * pthreadP.h: Change declaration.
7810 2004-01-13 Richard Henderson <rth@redhat.com>
7812 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7814 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7817 * sysdeps/alpha/Makefile: New file.
7818 * sysdeps/alpha/tcb-offsets.sym: New file.
7819 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7820 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7822 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7825 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7827 * Makefile (tests): Add tst-backtrace1.
7828 * tst-backtrace1.c: New test.
7830 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7832 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7833 register as second parameter to the REGISTER macro.
7834 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7835 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7836 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7837 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7838 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7839 of thread register as second parameter to REGISTER macro in 64 case.
7841 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7843 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7844 (CFLAGS-getpid.o): Defined.
7845 (CFLAGS-getpid.os): Defined.
7847 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7849 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7850 returned for main thread does not overlap with any other VMA.
7851 Patch by Jakub Jelinek.
7853 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7855 * tst-raise1.c: Include stdio.h.
7857 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7859 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7860 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7861 If pid is 0, set it to selftid.
7862 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7863 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7864 != 0, return self->tid without doing a syscall.
7865 * descr.h (struct pthread): Move pid field after tid.
7867 * Makefile (tests): Add tst-raise1.
7868 * tst-raise1.c: New file.
7870 2003-12-23 Roland McGrath <roland@redhat.com>
7872 * tst-oddstacklimit.c: New file.
7873 * Makefile (tests): Add it.
7874 (tst-oddstacklimit-ENV): New variable.
7876 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7877 value up to page size for __default_stacksize.
7879 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7881 * Makefile (tests): Add tst-eintr5.
7882 * tst-eintr5.c: New file.
7884 * eintr.c (eintr_source): Prevent sending signal to self.
7886 * tst-eintr2.c (tf1): Improve error message.
7888 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7890 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7891 * sysdeps/unix/sysv/linux/getpid.c: New file.
7892 * pthread_cancel.c: Add comment explaining use of PID field.
7893 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7894 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7895 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7896 temporarily to signal the field must not be relied on and updated
7898 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7899 temporarily negative.
7900 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7902 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7904 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7905 (eintr_source): If ARG != NULL, use pthread_kill.
7906 * tst-eintr1.c: Adjust for this change.
7907 * tst-eintr2.c: Likewise.
7908 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7909 * tst-eintr3.c: New file.
7910 * tst-eintr4.c: New file.
7912 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7914 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7915 if CANCELSTATE_BITMASK is set.
7916 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7919 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7920 (tests-reverse): Add tst-cancel23.
7921 * tst-cancel22.c: New test.
7922 * tst-cancel23.c: New test.
7924 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7926 * tst-eintr1.c: Better error messages.
7928 * Makefile (tests): Add tst-eintr2.
7929 * tst-eintr2.c: New file.
7931 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7933 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7934 (CFLAGS-tst-cancelx21.c): Set.
7935 * tst-cancel21.c: New test.
7936 * tst-cancelx21.c: New test.
7938 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7940 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7941 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7942 * pt-longjmp.c: Include jmpbuf-unwind.h.
7943 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7944 _JMPBUF_UNWINDS. Adjust compared pointers.
7945 * init.c (__pthread_initialize_minimal_internal): Initialize
7946 pd->stackblock_size.
7947 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7948 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7949 * sysdeps/i386/jmpbuf-unwind.h: New file.
7950 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7951 * sysdeps/s390/jmpbuf-unwind.h: New file.
7952 * sysdeps/sh/jmpbuf-unwind.h: New file.
7953 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7954 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7955 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7956 (_JMPBUF_CFA_UNWINDS): Remove.
7957 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7959 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7961 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7962 (CFLAGS-tst-cancelx20.c): Set.
7963 * tst-cancel20.c: New test.
7964 * tst-cancelx20.c: New test.
7966 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7968 * init.c (__pthread_initialize_minimal_internal): Don't treat
7969 architectures with separate register stack special here when
7970 computing default stack size.
7972 2003-12-17 Roland McGrath <roland@redhat.com>
7974 * Makefile (tst-cancelx7-ARGS): New variable.
7975 Reportd by Greg Schafer <gschafer@zip.com.au>.
7977 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7979 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7980 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7981 (tst-stack3-ENV): Set.
7982 ($(objpfx)tst-stack3-mem): New.
7983 * tst-stack3.c: New test.
7985 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7987 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7988 Add unwind directives. Drop unused .regstk directive.
7989 (_fini_EPILOG_BEGINS): Add unwind directives.
7991 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7993 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7994 Assume parameter is a pointer.
7995 (lll_futex_wake): Likewise.
7996 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7998 (lll_futex_wake): Likewise.
7999 Reported by Boris Hu.
8000 * sysdeps/unix/sysv/linux/unregister-atfork.c
8001 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
8003 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
8005 2003-12-10 Ulrich Drepper <drepper@redhat.com>
8007 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
8008 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
8009 __rtld_lock_initialize for ld.so lock.
8010 Patch in part by Adam Li <adam.li@intel.com>.
8012 2003-12-02 David Mosberger <davidm@hpl.hp.com>
8014 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
8015 in $(gnulib). Also, remove stale comment.
8017 2003-11-12 David Mosberger <davidm@hpl.hp.com>
8019 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
8020 advantage of new syscall stub and optimize accordingly.
8022 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
8023 from SYS_futex, to match expectations of
8024 sysdep.h:DO_INLINE_SYSCALL.
8025 (lll_futex_clobbers): Remove.
8026 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
8027 (lll_futex_wake): Likewise.
8028 (lll_futex_requeue): Likewise.
8029 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
8030 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
8032 (__lll_mutex_lock): Likewise.
8033 (__lll_mutex_cond_lock): Likewise.
8034 (__lll_mutex_timed_lock): Likewise.
8035 (__lll_mutex_unlock): Likewise.
8036 (__lll_mutex_unlock_force): Likewise.
8038 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
8039 comes before the include of <sysdep.h>.
8040 (THREAD_SELF_SYSINFO): New macro.
8041 (THREAD_SYSINFO): Likewise.
8042 (INIT_SYSINFO): New macro.
8043 (TLS_INIT_TP): Call INIT_SYSINFO.
8045 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
8047 * sysdeps/pthread/createthread.c (create_thread): Use
8048 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
8049 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
8050 THREAD_SELF_SYSINFO instead of open code.
8051 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
8052 (THREAD_SYSINFO): Likewise.
8054 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
8056 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
8058 2003-12-06 Ulrich Drepper <drepper@redhat.com>
8060 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
8061 instead of .init. Patch by David Mosberger.
8063 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
8065 * sysdeps/pthread/configure.in: Remove broken declaration in C
8066 cleanup handling check.
8068 2003-11-30 Andreas Jaeger <aj@suse.de>
8070 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
8071 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
8074 2003-11-27 Jakub Jelinek <jakub@redhat.com>
8076 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
8077 * pthread_attr_destroy.c: Include shlib-compat.h.
8078 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
8079 is set in iattr->flags.
8080 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8082 2003-11-21 Jakub Jelinek <jakub@redhat.com>
8084 * Makefile (distribute): Add tst-cleanup4aux.c.
8086 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
8089 2003-11-21 Ulrich Drepper <drepper@redhat.com>
8091 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8092 pthread_cond_signal.
8094 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8095 store mutex address if the current value is ~0l.
8096 * sysdeps/pthread/pthread_cond_timedwait.c
8097 (__pthread_cond_timedwait): Likewise.
8098 * sysdeps/pthread/pthread_cond_broadcast.c
8099 (__pthread_cond_broadcast): Don't use requeue for pshared
8102 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8103 (__pthread_cond_wait): Don't store mutex address if the current
8105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8106 (__pthread_cond_timedwait): Likewise.
8107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8108 (__pthread_cond_broadcast): Don't use requeue for pshared
8111 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8112 element with ~0l for pshared condvars, with NULL otherwise.
8114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8115 (__pthread_cond_wait): Don't store mutex address if the current
8117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8118 (__pthread_cond_timedwait): Likewise.
8119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8120 (__pthread_cond_broadcast): Don't use requeue for pshared
8123 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8124 * tst-cond12.c: New file.
8125 * tst-cond13.c: New file.
8127 2003-11-17 Ulrich Drepper <drepper@redhat.com>
8129 * sysdeps/pthread/configure.in: Make missing forced unwind support
8132 2003-11-11 Ulrich Drepper <drepper@redhat.com>
8134 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8136 2003-11-06 Ulrich Drepper <drepper@redhat.com>
8138 * Makefile: Add magic to clean up correctly.
8140 2003-11-05 Jakub Jelinek <jakub@redhat.com>
8142 * unwind.c (FRAME_LEFT): Define.
8143 (unwind_stop): Handle old style cleanups here.
8144 (__pthread_unwind): Handle old style cleanups only if
8145 !HAVE_FORCED_UNWIND.
8146 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8147 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8148 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8149 ($(objpfx)tst-cleanupx4): Likewise.
8150 * tst-cleanup4.c: New test.
8151 * tst-cleanup4aux.c: New.
8152 * tst-cleanupx4.c: New test.
8154 2003-11-04 Ulrich Drepper <drepper@redhat.com>
8156 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8157 lll_mutex_*lock macros to skip atomic operations on some archs.
8159 2003-11-03 Ulrich Drepper <drepper@redhat.com>
8161 * sysdeps/pthread/tst-timer.c (main): Initialize
8162 sigev2.sigev_value as well.
8164 2003-10-15 Roland McGrath <roland@redhat.com>
8166 * sysdeps/pthread/configure.in: Barf if visibility attribute support
8168 * sysdeps/pthread/configure: Regenerated.
8170 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8172 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8173 locking macros. No distinction between normal and mutex locking
8175 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8176 Merge bits from lowlevelmutex.S we still need.
8177 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8178 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8179 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8180 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8181 new mutex implementation.
8182 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8183 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8184 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8185 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8186 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8189 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8190 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8191 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8192 symbol for entry point to avoid cancellation.
8194 2003-10-07 Jakub Jelinek <jakub@redhat.com>
8196 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8198 (SAVE_OLDTYPE_0): Fix a typo.
8200 2003-10-03 Ulrich Drepper <drepper@redhat.com>
8202 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8203 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8205 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8207 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8210 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8212 * Makefile (tests): Add tst-cancel19.
8213 * tst-cancel19.c: New test.
8215 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8217 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8218 restoring of the old cancellation type.
8220 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8222 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8224 2003-09-27 Wolfram Gloger <wg@malloc.de>
8226 * sysdeps/pthread/malloc-machine.h: New file
8228 2003-09-24 Roland McGrath <roland@redhat.com>
8230 * allocatestack.c (__make_stacks_executable): Don't ignore return
8231 value from _dl_make_stack_executable.
8233 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8235 * allocatestack.c (__make_stacks_executable): Also change
8236 permission of the currently unused stacks.
8238 * allocatestack.c (change_stack_perm): Split out from
8239 __make_stacks_executable.
8240 (allocate_stack): If the required permission changed between the time
8241 we started preparing the stack and queueing it, change the permission.
8242 (__make_stacks_executable): Call change_stack_perm.
8244 * Makefile: Build tst-execstack-mod locally.
8245 * tst-execstack-mod.c: New file.
8247 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8249 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8251 2003-09-23 Roland McGrath <roland@redhat.com>
8253 * tst-execstack.c: New file.
8254 * Makefile (tests): Add it.
8255 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8256 (LDFLAGS-tst-execstack): New variable.
8258 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8259 whether to use PROT_EXEC for stack mmap.
8260 (__make_stacks_executable): New function.
8261 * pthreadP.h: Declare it.
8262 * init.c (__pthread_initialize_minimal_internal): Set
8263 GL(dl_make_stack_executable_hook) to that.
8265 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8267 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8268 recommendation from AMD re avoidance of lock prefix.
8270 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8272 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8273 lll_futex_timed_wait instead of lll_futex_wait.
8274 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8275 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8276 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8277 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8278 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8279 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8280 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8281 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8282 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8283 Completely revamp the locking macros. No distinction between
8284 normal and mutex locking anymore.
8285 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8286 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8287 __lll_lock_timedwait): Fix prototypes.
8288 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8289 __lll_lock_timedwait): Likewise.
8290 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8291 macros, add __builtin_expect.
8292 (lll_mutex_timedlock): Likewise. Fix return value.
8293 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8294 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8295 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8296 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8297 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8298 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8299 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8300 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8302 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8304 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8305 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8306 operation if possible.
8308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8309 like jumping over the lock prefix.
8311 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8313 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8314 locking macros. No distinction between normal and mutex locking
8316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8317 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8318 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8319 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8320 locking. Merge bits from lowlevelmutex.S we still need.
8321 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8322 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8323 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8324 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8325 * Makefile (routines): Remove libc-lowlevelmutex.
8326 (libpthread-rountines): Remove lowlevelmutex.
8327 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8328 for new mutex implementation.
8329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8337 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8338 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8339 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8340 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8348 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8353 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8355 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8357 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8358 in parameters of asm with output parameters.
8360 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8361 type of DECR parameter to int.
8362 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8364 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8366 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8367 guardsize for each thread.
8369 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8371 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8372 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8373 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8375 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8376 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8378 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8379 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8380 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8381 (pthread_getaffinity_np): Add hidden_def.
8383 * Makefile (tests): Add tst-attr3.
8384 * tst-attr3.c: New test.
8386 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8388 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8390 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8391 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8393 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8395 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8396 * tst-align.c: Include tst-stack-align.h.
8397 (tf, do_test): Use TEST_STACK_ALIGN macro.
8399 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8401 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8404 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8406 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8407 stack-related values for the initial thread.
8409 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8411 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8413 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8415 * pthread_mutex_lock.c: Minor code rearrangements.
8417 2003-09-05 Roland McGrath <roland@redhat.com>
8419 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8420 Instead, include ../nptl_db/db_info.c to do its magic.
8421 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8422 (__pthread_pthread_key_2ndlevel_size): Likewise.
8423 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8424 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8425 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8426 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8427 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8428 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8429 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8430 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8431 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8432 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8433 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8434 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8435 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8436 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8437 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8438 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8439 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8441 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8443 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8444 of pthread_t to be compatible with LT.
8445 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8446 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8448 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8449 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8450 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8451 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8453 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8455 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8457 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8459 * unwind-forcedunwind.c: Move to...
8460 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8461 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8462 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8463 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8464 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8465 * unwind.c: Include jmpbuf-unwind.h.
8466 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8468 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8470 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8471 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8472 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8473 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8474 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8475 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8476 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8477 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8478 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8479 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8480 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8482 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8483 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8484 * Makefile (tests): Add tst-stack2.
8485 * tst-stack2.c: New test.
8486 * tst-stack1.c: Include limits.h and sys/param.h.
8487 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8489 * pthread_condattr_setpshared.c: Include errno.h.
8490 (pthread_condattr_setpshared): Return EINVAL if pshared
8491 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8493 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8494 defined symbol for entry point to avoid cancellation.
8495 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8497 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8501 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8503 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8505 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8506 __close_nocancel, __read_nocancel, __write_nocancel,
8507 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8508 libpthread.so or librt.so, define to corresponding function
8509 without _nocancel suffix.
8510 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8511 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8512 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8514 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8516 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8518 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8519 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8521 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8522 in subsections has a symbol associated with it.
8524 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8525 defined symbol for entry point to avoid cancellation.
8526 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8528 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8530 * Makefile (tests): Add tst-tls5.
8531 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8532 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8533 ($(objpfx)tst-tls5): New.
8534 ($(objpfx)tst-tls6.out): Likewise.
8535 (tests): Depend on $(objpfx)tst-tls6.out.
8536 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8537 (do_test): Check pthread_self () return value alignment.
8538 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8539 (tf): Check pthread_self () return value alignment.
8540 * tst-tls5.c: New test.
8542 * tst-tls5mod.c: New.
8543 * tst-tls5moda.c: New.
8544 * tst-tls5modb.c: New.
8545 * tst-tls5modc.c: New.
8546 * tst-tls5modd.c: New.
8547 * tst-tls5mode.c: New.
8548 * tst-tls5modf.c: New.
8549 * tst-tls6.sh: New test.
8551 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8552 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8553 * init.c (pthread_functions): Initialize them.
8554 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8555 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8556 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8557 pthread_cond_timedwait@@GLIBC_2.3.2.
8559 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8561 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8562 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8563 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8564 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8565 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8566 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8568 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8570 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8571 _POSIX_THREAD_PRIORITY_SCHEDULING.
8572 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8574 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8576 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8577 nested function, use static inline function from libio.h.
8578 Code by Richard Henderson.
8580 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8583 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8585 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8586 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8587 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8588 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8589 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8590 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8591 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8592 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8593 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8594 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8595 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8596 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8597 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8598 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8599 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8600 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8601 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8602 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8603 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8604 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8605 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8606 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8607 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8608 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8609 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8610 * sysdeps/sparc/tls.h: New file.
8611 * sysdeps/sparc/tcb-offsets.sym: New file.
8612 * sysdeps/sparc/Makefile: New file.
8613 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8614 * init.c [__sparc__] (__NR_set_tid_address): Define.
8616 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8618 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8619 _IO_release_lock): Define.
8621 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8623 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8624 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8626 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8628 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8629 (__pthread_cleanup_class): Add missing return types of member
8632 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8635 (lll_mutex_unlock_force): Add memory barrier between store and futex
8638 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8640 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8641 tempmsg in first loop.
8643 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8645 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8646 _POSIX_THREAD_PRIORITY_SCHEDULING.
8647 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8649 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8651 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8652 (__rtld_lock_default_lock_recursive,
8653 __rtld_lock_default_unlock_recursive): Define.
8654 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8655 __rtld_lock_unlock_recursive): Define using
8656 GL(_dl_rtld_*lock_recursive).
8657 * init.c (__pthread_initialize_minimal_internal): Initialize
8658 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8659 Lock GL(_dl_load_lock) the same number of times as
8660 GL(_dl_load_lock) using non-mt implementation was nested.
8662 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8663 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8665 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8667 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8670 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8672 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8674 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8676 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8677 to first syscall error check. Move syscall error check for tkill
8678 into __ASSUME_CLONE_STOPPED #ifdef.
8680 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8682 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8683 is not defined, do explicit synchronization.
8684 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8685 is not defined also unlock pd->lock for non-debugging case in case
8687 * pthread_create.c (start_thread): Always get and release pd->lock
8688 if __ASSUME_CLONE_STOPPED is not defined.
8689 (start_thread_debug): Removed. Adjust users.
8690 * allocatestack.c (allocate_stack): Always initialize lock if
8691 __ASSUME_CLONE_STOPPED is not defined.
8692 * Makefile (tests): Add tst-sched1.
8693 * tst-sched1.c: New file.
8695 * sysdeps/pthread/createthread.c (do_clone): Only use
8696 sched_setschduler and pass correct parameters.
8698 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8700 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8701 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8702 PTHREAD_STACK_MIN in comments.
8704 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8706 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8707 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8709 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8710 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8711 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8712 (__pthread_cleanup_upto): Fix prototype.
8713 (_longjmp_unwind): Adjust caller.
8714 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8715 Change second argument to const struct pointer.
8716 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8717 * tst-sem9.c (main): Likewise.
8718 * unwind.c: Include string.h for strlen prototype.
8720 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8723 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8724 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8726 Patch by Nicholas Miell <nmiell@attbi.com>.
8728 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8730 * init.c (__pthread_initialize_minimal_internal): Initialize
8731 GL(dl_init_static_tls).
8732 * pthreadP.h (__pthread_init_static_tls): New prototype.
8733 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8735 * Makefile (tests): Add tst-tls4.
8736 (modules-names): Add tst-tls4moda and tst-tls4modb.
8737 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8738 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8740 * tst-tls4.c: New file.
8741 * tst-tls4moda.c: New file.
8742 * tst-tls4modb.c: New file.
8744 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8746 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8747 before __timer_dealloc.
8748 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8749 Don't call list_unlink.
8751 2003-07-29 Roland McGrath <roland@redhat.com>
8753 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8755 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8757 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8758 Don't reuse struct aiocb A if it failed.
8759 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8760 not just one byte, as that does not block.
8762 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8764 * sysdeps/pthread/unwind-resume.c: New file.
8765 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8766 unwind-resume in csu subdir.
8767 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8769 (librt-sysdep_routines, librt-shared-only-routines): Add
8771 * sysdeps/pthread/rt-unwind-resume.c: New file.
8772 * unwind-forcedunwind.c: New file.
8773 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8774 (libpthread-shared-only-routines): Likewise.
8775 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8776 * pthreadP.h (pthread_cancel_init): New prototype.
8777 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8779 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8780 attr argument const struct pthread_attr *.
8782 * res.c (__res_state): Return __resp.
8783 * descr.h: Include resolv.h.
8784 (struct pthread): Add res field.
8785 * pthread_create.c: Include resolv.h.
8786 (start_thread): Initialize __resp.
8787 * Makefile (tests): Add tst-_res1.
8788 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8789 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8790 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8792 * tst-_res1.c: New file.
8793 * tst-_res1mod1.c: New file.
8794 * tst-_res1mod2.c: New file.
8796 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8798 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8800 * Makefile: Define various *-no-z-defs variables for test DSOs
8801 which has undefined symbols.
8803 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8805 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8806 Retry if the stwcx fails to store once_control.
8808 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8810 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8811 pthread_attr_setaffinity.
8812 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8813 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8814 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8815 * pthread_attr_destroy.c: Free cpuset element if allocated.
8816 * pthread_create.c: Pass iattr as additional parameter to
8818 * sysdeps/pthread/createthread.c: If attribute is provided and
8819 a new thread is created with affinity set or scheduling parameters,
8820 start thread with CLONE_STOPPED.
8821 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8822 pthread_attr_setaffinity.
8823 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8826 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8828 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8830 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8832 * sysdeps/pthread/configure.in: Require CFI directives also for
8835 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8837 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8840 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8842 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8844 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8845 registers as variables. Call __pthread_mutex_unlock_usercnt.
8846 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8847 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8848 not self pointer in __writer. Compare with TID to determine
8850 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8851 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8853 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8855 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8856 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8857 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8858 macros also when compiling librt.
8860 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8862 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8863 -fasynchronous-unwind-tables.
8864 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8865 (PSEUDO): Add cfi directives.
8866 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8868 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8871 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8873 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8874 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8875 * unwind.c (__pthread_unwind_next): Add hidden_def.
8876 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8878 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8879 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8880 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8882 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8883 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8885 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8886 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8887 __pthread_unregister_cancel and __pthread_unwind_next.
8889 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8891 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8892 different symbol for the cancellation syscall wrapper and
8893 non-cancellation syscall wrapper.
8894 (PSEUDO_END): Define.
8896 2003-07-05 Richard Henderson <rth@redhat.com>
8898 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8899 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8900 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8901 return actual return value from the syscall, not 0.
8903 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8905 * descr.h (struct pthread): Add pid field.
8906 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8907 (__reclaim_stacks): Likewise.
8908 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8909 also check for PID of the signal source.
8910 (__pthread_initialize_minimal_internal): Also initialize pid field
8911 of initial thread's descriptor.
8912 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8913 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8914 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8915 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8916 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8918 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8920 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8921 Fix use of parameter.
8922 (__libc_cleanup_pop): Likewise.
8924 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8926 * init.c (sigcancel_handler): Change parameters to match handler
8927 for SA_SIGACTION. Check signal number and code to recognize
8928 invalid invocations.
8930 2003-07-03 Roland McGrath <roland@redhat.com>
8932 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8933 Apply sizeof (struct pthread) bias to r13 value.
8935 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8937 * sysdeps/pthread/configure.in: Require CFI directives.
8939 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8941 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8942 libpthread compilation.
8943 * unwind.c (__pthread_unwind): Add hidden_def.
8944 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8946 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8948 * libc-cancellation.c (__libc_cleanup_routine): Define.
8949 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8950 (__pthread_cleanup_pop): Define.
8952 2003-07-01 Richard Henderson <rth@redhat.com>
8954 * sysdeps/alpha/elf/pt-initfini.c: New file.
8955 * sysdeps/alpha/pthread_spin_lock.S: New file.
8956 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8957 * sysdeps/alpha/pthreaddef.h: New file.
8958 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8959 * sysdeps/alpha/tls.h: New file.
8960 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8961 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8962 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8963 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8964 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8965 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8966 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8967 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8968 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8969 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8971 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8973 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8974 cleanup support and unwind info.
8976 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8978 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8979 Use correct cleanup handler registration. Add unwind info.
8980 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8981 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8982 * tst-once3.c: Add cleanup handler and check it is called.
8983 * tst-once4.c: Likewise.
8984 * tst-oncex3.c: New file.
8985 * tst-oncex4.c: New file.
8986 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8988 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8990 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8992 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8994 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8995 (tf_msgsnd): Likewise.
8997 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8998 premature returns a bit more.
9000 2003-06-26 Ulrich Drepper <drepper@redhat.com>
9002 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
9003 definition to the front.
9005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
9006 the cleanup functions to make the names unique. Fix dwarf opcode
9008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
9009 functions to make the names unique. Fix CFA offset for two blocks.
9011 2003-06-25 Ulrich Drepper <drepper@redhat.com>
9013 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
9014 missing closing braces.
9015 Patch by Christophe Saout <christophe@saout.de>.
9017 2003-06-24 Roland McGrath <roland@redhat.com>
9019 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
9021 2003-06-24 Ulrich Drepper <drepper@redhat.com>
9023 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
9024 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
9026 * pthreadP.h: Declare __find_thread_by_id.
9027 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
9028 * pthread_clock_gettime.c: Allow using other thread's clock.
9029 * pthread_clock_settime.c: Likewise.
9030 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9031 * Makefile: Add rules to build and run tst-clock2.
9032 * tst-clock2.c: New file.
9034 2003-06-23 Ulrich Drepper <drepper@redhat.com>
9036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
9037 to use exception-based cleanup handler.
9038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9040 * tst-cond8.c (ch): Announce that we are done.
9042 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
9044 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
9045 Also test aio_suspend with timeout value.
9047 2003-06-22 Ulrich Drepper <drepper@redhat.com>
9049 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
9050 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
9053 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
9054 (__pthread_mutex_lock_internal): Likewise.
9055 (__pthread_mutex_unlock_internal): Likewise.
9056 (__pthread_mutex_unlock_usercnt): Declare.
9057 * pthread_mutex_destroy.c: Always fail if used in any way.
9058 * pthread_mutex_init.c: Update comment.
9059 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
9060 * pthread_mutex_timedlock.c: Adjust __nusers.
9061 * pthread_mutex_trylock.c: Adjust __nusers.
9062 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
9063 and public interfaces are wrapper with pass additional parameter.
9064 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
9066 * tst-mutex8.c: New file.
9067 * Makefile (tests): Add tst-mutex8.
9068 * sysdeps/pthread/pthread_cond_timedwait.c: Call
9069 __pthread_mutex_unlock_usercnt.
9070 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9071 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9075 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
9076 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9078 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9079 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9080 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9081 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9082 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9084 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9085 * pthread_mutex_timedlock.c: Likewise.
9086 * pthread_mutex_trylock.c: Adjust __nusers.
9087 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9088 * tst-mutex9.c: New file.
9089 * Makefile (tests): Add tst-mutex9.
9090 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9091 * sysdeps/ia64/tls.h: Likewise.
9092 * sysdeps/powerpc/tls.h: Likewise.
9093 * sysdeps/s390/tls.h: Likewise.
9094 * sysdeps/sh/tls.h: Likewise.
9095 * sysdeps/x86_64/tls.h: Likewise.
9096 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9097 Change type of __owner.
9098 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9099 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9100 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9101 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9102 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9104 2003-06-19 Jakub Jelinek <jakub@redhat.com>
9106 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9107 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9109 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9110 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
9111 instead of nr to lll_futex_wake. Only set errno and return -1
9114 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9115 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9116 return actual return value from the syscall, not 0.
9118 2003-06-18 Ulrich Drepper <drepper@redhat.com>
9120 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9121 find a random value.
9122 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
9125 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9126 compat_timer_settime.
9127 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9128 compat_timer_gettime.
9129 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9130 compat_timer_getoverrun.
9131 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9132 compat_timer_delete.
9134 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9135 error-checking mutex detect busy mutexes.
9137 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9140 Add ax to clobber list.
9141 (lll_mutex_cond_lock): Likewise.
9142 (lll_mutex_unlock): Likewise.
9143 (lll_lock): Likewise.
9144 (lll_unlock): Likewise.
9146 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9147 * tst-cancel18.c: New file.
9148 * tst-cancelx18.c: New file.
9150 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9153 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9154 * tst-cancel17.c: New file.
9155 * tst-cancelx17.c: New file.
9157 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9158 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9159 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9161 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9163 2003-06-16 Jakub Jelinek <jakub@redhat.com>
9165 * sysdeps/pthread/createthread.c (create_thread): Set
9166 header.multiple_threads unconditionally.
9167 * allocatestack.c (allocate_stack): Likewise.
9168 * descr.h (struct pthread): Add header.multiple_threads
9170 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9171 Define for librt. #error if neither libpthread, libc nor librt.
9172 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9174 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9175 CDISABLE): Likewise.
9176 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9177 CDISABLE): Likewise.
9178 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9179 CDISABLE): Likewise.
9180 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9181 CDISABLE): Likewise. Access header.multiple_threads outside of
9182 libc and libpthread.
9183 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9185 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9186 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9188 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9190 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9191 Also test early cancellation before the thread reaches the cancellation
9194 * Makefile: Compile forward.c with exceptions.
9196 * sysdeps/unix/sysv/linux/sleep.c: New file.
9198 2003-06-16 Ulrich Drepper <drepper@redhat.com>
9200 * Makefile: Add CFLAGS definition to compile function wrappers
9201 duplicated from libc with exceptions.
9202 * tst-cancel4.c: Also check cancellation handlers.
9204 * Makefile: Add rules to build and run tst-cancel16 and
9205 tst-cancelx16. Add missing CFLAGS definitions.
9206 * tst-cancel16.c: New file.
9207 * tst-cancelx16.c: New file.
9209 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9211 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9212 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9213 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9214 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9216 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9217 (LIBC_CANCEL_RESET): Likewise.
9218 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9219 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9221 (CFLAGS-libcrt-cancellation.c): Define.
9222 * sysdeps/pthread/librt-cancellation.c: New file.
9223 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9224 macros also when compiling librt.
9225 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9226 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9227 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9228 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9229 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9230 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9231 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9233 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9234 compat_timer_create.
9236 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9238 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9240 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9242 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9243 Add libc_hidden_def.
9245 2003-06-13 Roland McGrath <roland@redhat.com>
9247 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9248 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9250 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9252 * allocatestack.c (queue_stack): Always inline.
9253 * ptreadhP.h (__do_cancel): Likewise.
9255 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9257 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9260 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9263 (__pthread_cond_signal): Remove incorrect second addition for
9266 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9268 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9269 (__pthread_cond_signal): Use correct futex pointer in
9270 __lll_mutex_lock_wait call.
9272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9273 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9275 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9277 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9279 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9282 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9283 hand-written CFI generation code. Since ENTRY/END also initiated
9284 CFI frames this caused two CFI sets to be generated.
9286 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9288 * cleanup_routine.c: New file.
9289 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9290 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9292 * Makefile (libpthread-routines): Add cleanup_routine.
9293 Add more CFLAGS variables to compile with exceptions. Add comments
9294 why which file needs unwind tables.
9295 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9297 * tst-cancelx1.c: New file.
9298 * tst-cancelx2.c: New file.
9299 * tst-cancelx3.c: New file.
9300 * tst-cancelx4.c: New file.
9301 * tst-cancelx5.c: New file.
9302 * tst-cancelx6.c: New file.
9303 * tst-cancelx7.c: New file.
9304 * tst-cancelx8.c: New file.
9305 * tst-cancelx9.c: New file.
9306 * tst-cancelx10.c: New file.
9307 * tst-cancelx11.c: New file.
9308 * tst-cancelx12.c: New file.
9309 * tst-cancelx13.c: New file.
9310 * tst-cancelx14.c: New file.
9311 * tst-cancelx15.c: New file.
9312 * tst-cleanupx0.c: New file.
9313 * tst-cleanupx0.expect: New file.
9314 * tst-cleanupx1.c: New file.
9315 * tst-cleanupx2.c: New file.
9316 * tst-cleanupx3.c: New file.
9318 * tst-cleanup0.c: Make standard compliant.
9319 * tst-cleanup1.c: Likewise.
9321 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9322 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9323 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9324 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9325 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9326 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9327 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9329 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9330 * tst-cancel12.c: New file.
9331 * tst-cancel13.c: New file.
9332 * tst-cancel14.c: New file.
9333 * tst-cancel15.c: New file.
9334 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9337 * tst-cancel1.c: Add some comments.
9339 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9342 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9344 * Makefile (CFLAGS-pthread_cancel.c): Define.
9346 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9348 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9349 Change type of __writer element to int.
9350 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9351 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9352 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9353 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9354 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9355 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9356 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9357 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9358 Compare with TID to determine deadlocks.
9359 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9360 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9361 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9362 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9370 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9374 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9375 * Makefile (tests): Add tst-rwlock12.
9376 * tst-rwlock12.c: New file.
9378 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9380 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9381 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9382 Remove bogus hidden_proto.
9383 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9385 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9386 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9387 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9388 ___lll_mutex_timedlock): Likewise.
9390 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9393 (__pthread_cond_signal): Add some code to eventually handle
9396 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9398 * Makefile (tests): Add tst-exec4.
9399 (tst-exec4-ARGS): Define.
9400 * tst-exec4.c: New file.
9402 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9404 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9405 Also fail if tv_nsec < 0.
9406 (__lll_timedwait_tid): Likewise.
9407 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9408 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9410 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9412 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9414 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9416 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9418 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9421 * Makefile (tests): Add tst-sem8 and tst-sem9.
9422 * tst-sem8.c: New file.
9423 * tst-sem9.c: New file.
9424 * sem_open.c: Fix creation of in_use record if the file exists but
9427 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9430 * sysdeps/pthread/timer_create.c (timer_create): In case
9431 evp==NULL, assign timer ID to sival_ptr.
9433 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9434 struct pthread_unwind_buf *.
9435 (struct pthread): Likewise for cleanup_jmp_buf element.
9437 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9438 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9439 * unwind.c (__pthread_unwind_next): Likewise.
9441 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9443 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9444 (lll_futex_timed_wait): Use int for futex value parameter.
9445 (lll_futex_wake): Likewise.
9446 (lll_futex_requeue): Likewise.
9448 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9449 Replace one memory operation with one register operation.
9451 * tst-join4.c (do_test): Fix error message.
9453 * tst-rwlock6.c (do_test): Use correct format specifier.
9455 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9456 (__lll_mutex_lock_wait): Replace one memory operation with one
9458 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9459 (__lll_mutex_lock_wait): Likewise.
9461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9462 (__lll_mutex_cond_lock): Add one to value parameter of
9463 __lll_lock_wait to reflect reality in the futex syscall.
9464 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9465 (lll_mutex_cond_lock): Likewise.
9467 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9469 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9471 (lll_mutex_cond_lock): Define.
9473 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9475 * Makefile (tests): Add tst-signal6.
9476 * tst-signal6.c: New file.
9478 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9479 (__lll_mutex_unlock_force): New function
9480 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9482 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9483 (__lll_mutex_unlock_force): New function.
9484 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9486 * tst-rwlock7.c (do_test): Use correct format specifier.
9488 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9489 Find break parameter in correct asm argument.
9491 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9493 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9495 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9497 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9499 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9500 lll_futex_requeue, lll_mutex_unlock_force): Define.
9502 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9504 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9505 (pthread_cond_t): Add __mutex.
9506 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9507 lll_futex_requeue, lll_mutex_unlock_force): Define.
9509 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9511 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9512 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9514 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9516 (lll_futex_wait, lll_futex_wake): Define.
9517 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9518 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9519 FUTEX_REQUEUE instead of FUTEX_WAIT.
9520 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9521 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9522 mutex which was used in condvar structure. Call
9523 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9524 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9527 include tcb-offsets.h. Read wakeup value in locked region.
9528 Use the value of gbr register as THREAD_ID.
9529 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9530 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9531 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9533 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9536 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9538 * sysdeps/pthread/pthread_cond_broadcast.c
9539 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9541 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9544 typo in register name.
9545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9546 correctly. Actually use requeue. Little optimization.
9547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9548 mutex address early. Handle cancellation state as 32-bit value.
9549 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9550 Remove unnecessary label.
9552 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9554 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9555 instead of FUTEX_WAIT.
9556 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9557 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9559 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9561 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9562 used in condvar structure. Call __pthread_mutex_cond_lock instead
9563 of __pthread_mutex_lock_internal.
9564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9565 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9566 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9567 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9570 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9571 Add pthread_mutex_cond_lock.
9572 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9573 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9575 lll_mutex_cond_lock.
9576 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9577 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9578 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9580 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9581 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9583 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9584 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9586 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9587 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9588 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9589 macro don't define aliases.
9591 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9592 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9593 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9594 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9597 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9601 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9603 * sem_open.c: Fix one endless loop. Implement correct semantics
9604 wrt opening the same semaphore more then once.
9605 * sem_close.c: Adjust for sem_open change.
9606 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9607 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9608 * Makefile (tests): Add tst-sem7.
9609 * tst-sem7.c: New file.
9611 2003-05-16 Roland McGrath <roland@redhat.com>
9613 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9614 uninitialized variable braino.
9616 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9618 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9619 test for syscall availability.
9621 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9622 __no_posix_timers to -1 if the syscalls don't exist.
9624 * pthread_join.c (pthread_join): Set tid field of the joined
9625 thread to -1. This isn't necessary but helps to recognize some
9626 error conditions with almost no cost.
9628 * allocatestack.c (FREE_P): Also negative values indicate an
9631 * unwind.c: Include <unistd.h>.
9633 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9635 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9637 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9639 * Makefile (crti-objs, crtn-objs): New variables.
9640 (omit-deps, extra-objs): Add crtn.
9641 ($(objpfx)libpthread.so): Depend on both crti and crtn
9642 and links to them in multidir.
9643 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9645 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9647 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9648 (lll_mutex_unlock): Use atomic_exchange_rel.
9650 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9652 * cond-perf.c (cons): Add missing locking around setting of alldone.
9654 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9656 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9658 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9660 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9662 * tst-sem6.c: New file.
9663 * Makefile (tests): Add tst-sem6.
9665 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9666 Use atomic_exchange_rel instead of atomic_exchange.
9667 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9670 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9671 code for lll_futex_wait and lll_futex_wake in static apps. Use
9672 vsyscall is possible.
9674 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9675 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9676 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9677 pthread_setaffinity_np.
9678 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9679 and pthread_setaffinity_np.
9680 * Makefile (libpthread-routines): Add pthread_getaffinity and
9681 pthread_setaffinity.
9683 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9684 use it in case mmap to allocate the stack fails.
9685 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9686 ARCH_MAP_FLAGS here.
9687 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9690 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9692 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9693 handler implementation. It is now lockless in fork().
9694 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9695 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9696 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9697 declare the __fork_*_lists.
9698 (struct fork_handler): Include pointers to all three functions.
9699 Add next, refcntr and need_signal elements.
9700 (__fork_handlers): New declaration.
9701 (__register_atfork_malloc): Remove declaration.
9702 (HAVE_register_atfork_malloc): Remove definition.
9703 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9704 __pthread_child_handler variable.
9705 (__libc_pthread_init): Use __register_atfork instead of explicitly
9707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9709 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9711 * unwind.c (unwind_cleanup): Print error message and then abort. This
9712 function must never be reached.
9714 * cond-perf.c: New file.
9716 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9718 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9720 2003-05-04 Roland McGrath <roland@redhat.com>
9722 * Makefile ($(objpfx)../libc.so): New target.
9724 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9726 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9727 (pthread_condattr_t): Size is only an int, don't use long for
9729 (pthread_mutexattr_t): Likewise.
9730 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9731 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9732 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9734 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9736 * sysdeps/i386/tls.h: Define THREAD_ID.
9737 * sysdeps/ia64/tls.h: Likewise.
9738 * sysdeps/powerpc/tls.h: Likewise.
9739 * sysdeps/s390/tls.h: Likewise.
9740 * sysdeps/sh/tls.h: Likewise.
9741 * sysdeps/x86_64/tls.h: Likewise.
9742 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9744 * pthread_mutex_timedlock.c: Likewise.
9745 * pthread_mutex_trylock.c: Likewise.
9746 * pthread_mutex_unlock.c: Likewise.
9747 * pthread_rwlock_trywrlock.c: Likewise.
9748 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9749 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9750 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9751 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9753 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9756 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9758 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9759 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9760 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9761 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9762 Make __align long long instead of long.
9763 (pthread_rwlock_t): Formatting.
9764 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9765 (pthread_rwlock_t): Formatting.
9766 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9767 (pthread_cond_t): Make __align long long instead of long.
9768 (pthread_rwlock_t): Move __flags field to the same position as in
9771 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9773 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9774 * tst-rwlock7.c (do_test): Likewise.
9776 2003-04-26 Roland McGrath <roland@redhat.com>
9778 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9780 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9782 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9783 sizeof (struct pthread).
9784 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9786 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9788 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9790 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9792 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9794 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9796 (NO_TLS_OFFSET): Define.
9797 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9798 add TLS_TCB_SIZE unnecessarily.
9800 2003-04-22 Roland McGrath <roland@redhat.com>
9802 * Makeconfig (shared-thread-library): Reverse link order to work
9805 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9807 * semaphore.h: Fix typo in comment.
9809 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9811 * sysdeps/pthread/sigfillset.c: New file.
9813 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9814 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9815 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9816 * sysdeps/pthread/sigaction.c: Likewise.
9817 * sysdeps/pthread/sigprocmask.c: New file.
9818 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9820 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9821 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9824 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9826 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9827 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9829 * sysdeps/unix/sysv/linux/unregister-atfork.c
9830 (__unregister_atfork): Don't free memory not allocated dynamically.
9832 * semaphore.h: Remove __THROW marker from cancellation points.
9833 * nptl/sysdeps/pthread/pthread.h: Likewise.
9835 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9837 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9838 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9841 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9843 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9845 2003-04-15 Roland McGrath <roland@redhat.com>
9847 * forward.c (__pthread_unwind): Tweak to avoid warning.
9849 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9851 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9853 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9856 overflow CFA advance instructions.
9857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9859 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9861 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9862 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9863 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9867 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9869 DW_CFA_advance_loc for .Laddl-.Lsubl.
9871 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9873 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9874 position-independent unwind data for static libraries.
9875 Add missing unwind info. Add comments.
9877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9882 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9884 * Makefile: Make sure all cancellation points are compiled with
9885 exception and asynchronous unwind tables.
9887 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9888 which mishandles loading of global object addresses in PIC.
9889 (THREAD_SETMEM_NC): Likewise.
9891 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9893 * pthread.h: Define new data structure for cleanup buffer. Declare
9894 new cleanup handler interfaces.
9895 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9896 (struct pthread): Add cleanup_jmp_buf pointer. Define
9897 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9898 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9899 it. Declare old cleanup handler installation functions.
9900 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9902 * cleanup_defer.c: Likewise.
9903 * cleanup_compat.c: New file. Old cleanup code.
9904 * cleanup_def_compat.c: New file. Old cleanup code.
9905 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9906 if own thread descriptor.
9907 * unwind.c: New file.
9908 * forward.c: Add __pthread_unwind.
9909 * init.c (pthread_functions): Add __pthread_unwind.
9910 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9911 Add ptr___pthread_unwind.
9912 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9913 and unwind function.
9914 * Makefile (libpthread-routines): Add cleanup_compat,
9915 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9916 table generation if necessary.
9917 * version.c: Record whether unwind support is compiled in.
9918 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9919 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9921 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9922 complication to generate unwind information for syscall wrappers.
9923 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9924 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9925 __cleanup_fct_attribute.
9927 * Makefile: Add rules to build and run tst-cleanup0.
9928 * tst-cleanup0.c: New file.
9929 * tst-cleanup0.expect: New file.
9931 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9932 caller. Optimize to avoid often unecessary local variable.
9934 2003-04-11 Roland McGrath <roland@redhat.com>
9936 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9937 sets variable `multidir'; include that.
9938 (generated): Add it.
9939 ($(objpfx)$(multidir)/crti.o): New target.
9940 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9942 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9944 * tst-attr2.c (do_test): Add cast to avoid warning.
9945 * tst-mutex4.c (do_test): Likewise.
9947 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9949 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9952 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9954 * Makefile (tests): Add tst-detach1.
9955 * tst-detach1.c: New file.
9957 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9959 * sysdeps/pthread/pthread.h: Remove duplicate
9960 pthread_cleanup_{push,pop} definitions.
9962 * tst-barrier2.c: Eliminate warnings.
9963 * tst-cancel4.c: Likewise.
9964 * tst-cond4.c: Likewise.
9965 * tst-cond6.c: Likewise.
9966 * tst-detach1.c: Likewise.
9967 * tst-rwlock4.c: Likewise.
9968 * tst-rwlock6.c: Likewise.
9969 * tst-rwlock7.c: Likewise.
9970 * tst-sem3.c: Likewise.
9971 * tst-spin2.c: Likewise.
9972 * tst-umask1.c: Likewise.
9974 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9976 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9978 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9980 * descr.h (struct pthread): Move cancelhandling member to the front.
9982 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9984 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9985 malloc_parent, and malloc_child statically.
9986 (__register_atfork_malloc): New function.
9987 (free_mem): Don't free any of the malloc_* variables on the list.
9988 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9989 Define HAVE_register_atfork_malloc.
9991 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9993 * sysdeps/pthread/createthread.c (create_thread): Add some more
9994 comments explaining when to set multiple_threads and when not.
9996 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9997 THREAD_ATOMIC_BIT_SET if not already defined.
9998 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9999 THREAD_ATOMIC_BIT_SET:
10000 * sysdeps/x86_64/tls.h: Likewise.
10001 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
10002 THREAD_ATOMIC_CMPXCHG_VAL.
10003 (_pthread_cleanup_pop_restore): Likewise.
10004 * cancellation.c (__pthread_enable_asynccancel): Likewise.
10005 (__pthread_enable_asynccancel_2): Likewise.
10006 (__pthread_disable_asynccancel): Likewise.
10007 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10008 (__libc_disable_asynccancel): Likewise.
10009 * init.c (sigcancel_handler): Likewise.
10010 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
10011 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
10013 2003-04-03 Ulrich Drepper <drepper@redhat.com>
10015 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
10016 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10017 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
10018 * Makefile (tests): Add tst-cancel11.
10019 * tst-cancel11.c: New file.
10021 2003-04-01 Ulrich Drepper <drepper@redhat.com>
10023 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
10024 round, not the first. Use specific_used flag instead of local
10025 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
10026 (__free_tcb): Don't call deallocate_tsd here.
10027 (start_thread): Call deallocate_tsd here.
10028 * pthread_setspecific.c: Set specific_used flag really only when
10030 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
10031 * tst-tsd3.c: New file.
10032 * tst-tsd4.c: New file.
10034 2003-03-31 Ulrich Drepper <drepper@redhat.com>
10036 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
10037 Use atomic_exchange_and_add instead of __lll_add.
10038 (__lll_mutex_timedlock): Likewise.
10039 Patch by Ian Wienand.
10041 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
10043 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10044 (SINGLE_THREAD_P): Fix typo.
10045 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
10047 2003-03-31 Ulrich Drepper <drepper@redhat.com>
10049 * Makefile (tests): Add tst-align.
10050 * tst-align.c: New file.
10051 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
10053 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
10054 function correctly.
10056 * tst-tsd2.c: Add casts to avoid warnings.
10058 2003-03-30 Ulrich Drepper <drepper@redhat.com>
10060 * descr.h (struct pthread): Move most often used elements to the front.
10062 2003-03-29 Ulrich Drepper <drepper@redhat.com>
10064 * Makefile (libpthread-routines): Add pthread_atfork.
10065 (libpthread-static-only-routines): Add pthread_atfork.
10067 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
10069 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
10071 (INSTALL_DTV): Add parens.
10072 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
10073 Use passed descr instead of THREAD_SELF.
10074 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
10075 (__lll_mutex_timedlock_wait): Correct expected value after
10077 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
10078 Release lock before waking up the waiters.
10079 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10080 criteria. Reorderstruct passed to cleanup handler. Fix
10081 handling of cancellation and failung pthread_mutex_unlock call.
10082 Use __pthread_enable_asynccancel_2 instead of
10083 __pthread_enable_asynccancel.
10084 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10085 Return result of lock re-get if it fails.
10086 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10087 for __pthread_cleanup_push.
10088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10089 completely broken rwlock implementation.
10090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10093 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10095 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
10096 versioned_symbol macro.
10097 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10098 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10100 2003-03-27 Ulrich Drepper <drepper@redhat.com>
10102 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10103 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
10105 (struct timer): Remove th and bar field.
10106 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10107 debugging code. Create only one helper thread.
10108 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10110 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10111 Renamed. Define statically. Use thread info from siginfo.
10112 (__helper_once): New variable.
10113 (__helper_tid): New variable.
10114 (__reset_helper_control): New function.
10115 (__start_helper_thread): New function.
10117 * pthread_create.c (start_thread): Don't use setjmp inside
10118 __builtin_expect to work around gcc bug.
10120 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10121 timer_delete syscall fails, but not with ENOSYS, set
10124 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10125 (timer_settime): Fix typo.
10126 * sysdeps/unix/sysv/linux/timer_getoverr.c
10127 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10129 2003-03-27 Jakub Jelinek <jakub@redhat.com>
10131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10132 offset of cleanupbuf.__prev.
10134 2003-03-26 Jakub Jelinek <jakub@redhat.com>
10136 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10139 2003-03-26 Ulrich Drepper <drepper@redhat.com>
10141 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10142 NULL provide default definition to syscall.
10144 2003-03-25 Roland McGrath <roland@redhat.com>
10146 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10147 (timer_id2ptr): Fix typo.
10149 2003-03-25 Ulrich Drepper <drepper@redhat.com>
10151 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10152 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10153 * sysdeps/ia64/pthreaddef.h: Likewise.
10154 * sysdeps/powerpc/pthreaddef.h: Likewise.
10155 * sysdeps/s390/pthreaddef.h: Likewise.
10156 * sysdeps/sh/pthreaddef.h: Likewise.
10157 * sysdeps/x86_64/pthreaddef.h: Likewise.
10158 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10159 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10161 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10162 SIGTIMER is not unblocked.
10163 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10165 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10167 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10168 pass pointer through as ID.
10169 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10170 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10171 * sysdeps/unix/sysv/linux/timer_create.c: New file.
10172 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10173 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10174 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10175 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10176 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10177 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10178 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10179 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10180 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10181 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10182 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10183 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10184 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10185 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10186 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10187 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10188 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10189 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10190 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10191 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10192 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10193 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10194 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10195 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10196 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10197 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10198 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10199 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10200 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10201 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10203 * pthreadP.h: Remove FRAME_LEFT definition.
10204 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10205 already left frame. Programs which have this problem are not POSIX
10207 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10209 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10211 * sysdeps/pthread/tst-timer.c: Check return values of the
10214 2003-03-23 Roland McGrath <roland@redhat.com>
10216 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10217 * tst-tls3mod.c: Likewise.
10218 * tst-tls1.c: Likewise.
10219 * tst-tls2.c: Likewise.
10221 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10222 undefined behavior.
10224 * tst-join5.c (tf1, tf2): Add a cast.
10226 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10228 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10229 Don't test anything.
10230 * tst-cond4.c: Likewise.
10231 * tst-cond6.c: Likewise.
10232 * tst-flock2.c: Likewise.
10233 * tst-mutex4.c: Likewise.
10234 * tst-rwlock4.c: Likewise.
10235 * tst-signal1.c: Likewise.
10236 * tst-spin2.c: Likewise.
10237 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10239 * tst-mutex4.c: Use test-skeleton.c.
10240 * tst-spin2.c: Likewise.
10241 * tst-sysconf.c: Likewise.
10242 * tst-barrier2.c: Likewise.
10243 * tst-cond4.c: Likewise.
10244 * tst-cond6.c: Likewise.
10245 * tst-rwlock4.c: Likewise.
10246 * tst-unload.c: Likewise.
10247 * tst-flock2.c (do_test): Use return instead of exit.
10249 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10251 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10253 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10255 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10256 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10257 instead of __lll_compare_and_swap.
10258 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10260 Removed definition if __lll_compare_and_swap.
10262 * cancellation.c: Adjust for new form of compare&exchange macros.
10263 * cleanup_defer.c: Likewise.
10264 * init.c: Likewise.
10265 * libc-cancellation.c: Likewise.
10266 * old_pthread_cond_broadcast.c: Likewise.
10267 * old_pthread_cond_signal.c: Likewise.
10268 * old_pthread_cond_timedwait.c: Likewise.
10269 * old_pthread_cond_wait.c: Likewise.
10270 * pthread_cancel.c: Likewise.
10271 * pthread_create.c: Likewise.
10272 * pthread_detach.c: Likewise.
10273 * pthread_join.c: Likewise.
10274 * pthread_key_delete.c: Likewise.
10275 * pthread_setcancelstate.c: Likewise.
10276 * pthread_setcanceltype.c: Likewise.
10277 * pthread_timedjoin.c: Likewise.
10278 * pthread_tryjoin.c: Likewise.
10279 * sysdeps/pthread/createthread.c: Likewise.
10281 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10283 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10284 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10285 definitions. Replace uses with calls to atomic_* functions.
10286 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10287 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10288 __lll_test_and_set calls with atomic_exchange_and_add and
10289 atomic_exchange calls respectively.
10290 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10291 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10292 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10293 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10294 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10295 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10296 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10298 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10299 returns the old value.
10301 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10303 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10304 int for variable OLDVAL and correct inline assembler contraint.
10305 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10306 type int for variable OLD.
10308 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10310 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10311 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10312 instead of multiple_threads field in the TCB.
10314 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10316 * sysdeps/i386/i686/bits/atomic.h: Removed.
10317 * sysdeps/i386/i586/bits/atomic.h: Removed.
10318 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10319 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10320 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10321 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10322 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10323 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10324 * atomic.h: Removed. Moved to glibc.
10326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10327 support for clock selection.
10329 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10330 signalling waiters.
10332 2003-03-18 Roland McGrath <roland@redhat.com>
10334 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10335 Add __lll_rel_instr first. Add memory clobber.
10336 (lll_mutex_unlock): Use __lll_test_and_set.
10337 From Paul Mackerras <paulus@samba.org>.
10339 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10341 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10342 (SINGLE_THREAD_P): Add `header.' prefix.
10343 From Paul Mackerras <paulus@samba.org>.
10345 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10346 pthread_timedjoin_np to ...
10347 (libpthread: GLIBC_2.3.3): ... here.
10348 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10350 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10351 Avoid shadowing VAL variable.
10353 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10356 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10358 * Makefile (tests): Add tst-cond11.
10359 * tst-cond11.c: New file.
10361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10362 struct passed to cleanup handler to eliminate one more
10364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10366 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10367 (pthrad_cond_t): Replace __unused field with __clock.
10369 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10370 waken all waiters in cleanup handler.
10371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10374 * pthread_condattr_getclock.c: New file.
10375 * pthread_condattr_setclock.c: New file.
10376 * sysdeps/pthread/pthread.h: Declare these new functions.
10377 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10378 * Makefile (libpthread-routines): Add the new functions.
10379 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10380 Renamed field to value. Document use of the bits.
10381 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10383 * pthread_condattr_setpshared.c: Likewise.
10384 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10385 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10386 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10388 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10389 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10390 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10391 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10393 Implement clock selection.
10394 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10395 * pthread-errnos.sym: Add ENOSYS.
10396 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10397 _POSIX_CLOCK_SELECTION.
10398 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10401 invalid .size directive.
10403 2003-03-17 Roland McGrath <roland@redhat.com>
10405 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10408 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10410 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10411 Use __lll_add instead of spelling it out. Use protected symbol names.
10412 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10415 Renamed from lll_compare_and_swap. Use new name where necessary.
10416 (__lll_add): Defined.
10417 (__lll_dec_if_positive): Defined.
10418 (__lll_test_and_set): Defined.
10419 * sysdeps/ia64/pthread_spin_init.c: Removed.
10420 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10421 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10422 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10423 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10424 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10425 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10426 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10427 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10428 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10429 __sync_lock_release_si.
10430 Patch by Jakub Jelinek.
10432 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10433 Fix timeout handling.
10434 (__lll_timedwait_tid): Likewise.
10435 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10436 Patch by Jakub Jelinek.
10438 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10440 2003-03-17 Roland McGrath <roland@redhat.com>
10442 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10443 * sysdeps/pthread/pthread_spin_init.c: New file.
10444 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10445 * sysdeps/powerpc/Makefile: New file.
10446 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10447 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10448 * sysdeps/powerpc/pthreaddef.h: New file.
10449 * sysdeps/powerpc/tcb-offsets.sym: New file.
10450 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10451 * sysdeps/powerpc/tls.h: New file.
10452 * sysdeps/powerpc/bits/atomic.h: New file.
10453 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10454 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10455 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10457 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10458 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10459 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10460 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10461 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10462 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10463 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10464 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10465 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10466 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10467 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10468 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10469 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10470 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10471 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10473 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10475 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10476 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10477 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10478 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10479 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10481 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10483 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10484 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10487 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10489 2003-03-16 Roland McGrath <roland@redhat.com>
10491 * tst-fork4.c: Include <string.h>.
10492 * tst-signal2.c: Likewise.
10493 * tst-mutex5.c (do_test): exit -> return.
10494 * tst-mutex2.c: Include <stdlib.h>.
10496 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10498 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10499 (__lll_mutex_timedlock_wait): Correct expected value after
10500 spurious wakeup. Otherwise we would never wait again.
10502 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10503 zone versus inline asm stupidity. Use correct instructions.
10505 * tst-rwlock6.c: Add some more status output.
10507 2003-03-15 Roland McGrath <roland@redhat.com>
10509 * sysdeps/pthread/configure.in: New file.
10510 * sysdeps/pthread/configure: New file (generated).
10512 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10514 * allocatestack.c (allocate_stack): Store the exact stack size of
10515 user allocated stacks.
10517 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10519 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10520 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10521 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10522 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10523 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10524 Use `header.' prefix.
10525 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10527 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10529 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10530 __builtin_frame_address, use stack pointer.
10532 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10533 instead of __builtin_frame_pointer.
10535 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10537 * tst-basic1.c (do_test): Add cast to avoid warning.
10538 * tst-basic2.c (do_test): Likewise.
10540 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10541 amount of stack correction.
10543 * tst-fork4.c: Use test-skeleton.c.
10545 2003-03-14 Roland McGrath <roland@redhat.com>
10547 * init.c: Fix typo "#eli" for "#else".
10549 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10551 * allocatestack.c (__stack_user): Use hidden_data_def.
10552 * pthread_create.c (__pthread_keys): Likewise.
10554 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10556 2003-03-14 Roland McGrath <roland@redhat.com>
10558 * tst-fork4.c: New file.
10559 * Makefile (tests): Add it.
10561 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10562 we always define the padding space.
10563 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10564 stopped supporting its own extensions fully.
10565 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10566 struct also called `header', so `header.multiple_threads' is the field
10567 name to use on all machines.
10568 * allocatestack.c (allocate_stack): Use `header.' prefix.
10569 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10570 * pthread_create.c (__pthread_create_2_1): Likewise.
10571 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10572 (THREAD_SELF): Likewise.
10573 * sysdeps/x86_64/tls.h: Likewise.
10574 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10575 (SINGLE_THREAD_P): Likewise.
10576 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10577 (SINGLE_THREAD_P): Likewise.
10578 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10579 (SINGLE_THREAD_P): Likewise.
10581 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10584 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10586 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10587 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10589 * pthread_create.c (start_thread): setjmp is expected to return 0.
10591 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10592 (THREAD_GETMEM_NC): Likewise.
10594 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10596 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10597 and the size of the stack which must be allocated is a multiple,
10598 allocate one more page.
10599 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10600 MULTI_PAGE_ALIASING.
10602 2003-03-13 Roland McGrath <roland@redhat.com>
10604 * pthread_create.c (start_thread): Set EXITING_BIT after the
10605 event-reporting (and destructors), not before.
10607 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10609 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10610 lll_futex_wake): Declare register variables as long int instead of
10611 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10612 Make syscall arguments clobbered by the syscall.
10613 (lll_futex_wait): Define using lll_futex_timed_wait.
10615 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10618 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10619 PPID if [! NDEBUG].
10621 * allocatestack.c (nptl_ncreated): Only declare if
10622 COLORING_INCREMENT != 0.
10624 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10625 (__libc_enable_asynccancel_2): Remove prototype.
10627 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10628 ctid to match kernel.
10630 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10632 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10633 libc_multiple_threads.
10634 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10635 __libc_multiple_threads to...
10636 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10638 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10640 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10641 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10643 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10644 (__pthread_once_internal): Define.
10646 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10647 macros instead of .symver directly.
10648 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10649 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10651 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10652 * sysdeps/x86_64/tcb-offsets.sym: New file.
10653 * sysdeps/x86_64/Makefile: New file.
10655 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10656 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10657 to access own pthread_t in TCB.
10658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10664 2003-03-12 Roland McGrath <roland@redhat.com>
10666 * pthread-errnos.sym: New file.
10667 * Makefile (gen-as-const-headers): New variable, list that file.
10668 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10669 header <pthread-errnos.h> instead of defining errno values here.
10670 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10671 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10672 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10674 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10676 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10678 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10680 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10681 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10682 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10683 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10684 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10685 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10687 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10689 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10690 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10691 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10692 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10693 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10694 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10695 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10696 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10698 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10699 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10700 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10701 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10702 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10703 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10706 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10707 CLONE_CHILD_SETTID worked.
10709 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10711 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10713 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10716 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10717 (pthread_cond_t): Add padding.
10719 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10721 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10723 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10724 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10726 (__pthread_rwlock_timedrdlock): Likewise.
10727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10728 (__pthread_rwlock_wrlock): Likewise.
10729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10730 (__pthread_rwlock_rdlock): Likewise.
10732 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10734 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10735 result of lock re-get if it fails.
10737 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10739 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10740 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10741 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10744 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10745 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10746 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10747 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10748 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10750 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10751 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10753 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10754 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10755 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10756 (create_thread): Likewise.
10757 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10758 * init.c (__pthread_initialize_minimal_internal): Initialize
10759 __libc_multiple_threads_ptr if necessary.
10760 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10761 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10762 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10763 __libc_multiple_threads.
10764 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10767 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10768 (THREAD_SETMEM_NC): Likewise.
10770 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10771 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10772 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10773 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10775 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10776 Eliminate one entire instruction.
10778 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10779 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10781 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10782 instead of __pthread_enable_asynccancel.
10783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10784 (__pthread_cond_wait): Likewise.
10785 * sysdeps/pthread/pthread_cond_timedwait.c
10786 (__pthread_cond_timedwait): Likewise.
10787 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10790 (__condvar_cleanup): Wake up all waiters in case we got signaled
10791 after being woken up but before disabling asynchronous
10793 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10795 (__condvar_cleanup): Likewise.
10797 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10798 Make it an error if architecture has no #if case. Add x86-64.
10800 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10801 pt-initfini.s generation.
10803 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10804 (TLS_INIT_TP): Fix typo.
10806 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10808 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10809 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10811 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10812 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10813 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10814 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10815 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10816 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10817 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10818 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10820 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10822 * sysdeps/pthread/pthread_cond_timedwait.c
10823 (__pthread_cond_timedwait): Return the result of the final
10824 locking. If it succeeds, the regular function return value.
10826 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10827 Return result of the final locking.
10828 * version.c (__nptl_main): Work around problems with the strange
10829 INTERNAL_SYSCALL macro on ppc32.
10830 * init.c (__pthread_initialize_minimal_internal): Unblock
10831 SIGCANCEL in case the parent blocked it.
10832 Reported by Paul Mackerras <paulus@samba.org>.
10834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10835 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10836 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10838 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10840 * sysdeps/pthread/pthread_cond_timedwait.c
10841 (__pthread_cond_timedwait): Unlock and fail if
10842 __pthread_mutex_unlock_internal failed.
10844 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10845 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10847 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10848 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10849 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10850 ALLOCATE_STACK): New macros.
10851 (TLS_TPADJ): New macro.
10852 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10853 (allocate_stack): Handle TLS_DTV_AT_TP and
10854 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10855 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10856 Don't set PD->self.
10857 * init.c [__ia64__] (__NR_set_tid_address): Define.
10859 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10860 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10861 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10862 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10863 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10864 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10865 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10866 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10867 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10868 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10869 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10870 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10871 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10872 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10873 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10874 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10875 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10876 * sysdeps/ia64/bits/atomic.h: New file.
10877 * sysdeps/ia64/Makefile: New file.
10878 * sysdeps/ia64/pthread_spin_init.c: New file.
10879 * sysdeps/ia64/pthread_spin_lock.c: New file.
10880 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10881 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10882 * sysdeps/ia64/pthreaddef.h: New file.
10883 * sysdeps/ia64/tcb-offsets.sym: New file.
10884 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10885 * sysdeps/ia64/tls.h: New file.
10887 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10888 to syscall instead of no arguments.
10890 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10892 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10893 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10894 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10895 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10897 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10900 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10902 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10903 lowlevelbarrier.sym.
10904 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10905 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10906 Include lowlevelbarrier.h and don't define offsets locally.
10907 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10910 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10911 (__lll_mutex_timedlock_wait): Likewise.
10912 (lll_mutex_lock): Adjust asm for that.
10913 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10914 (lll_lock): Adjust asm for operand order change.
10915 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10916 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10919 Reverse order of parameters.
10920 (__lll_timedwait_tid): Remove regparms attribute.
10921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10922 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10924 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10925 (__lll_timedwait_tid): Remove one unnecessary instruction.
10927 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10928 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10929 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10932 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10933 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10935 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10938 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10939 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10942 define LOCK here (if UP is not defined). The actual code is in
10945 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10946 LOCK is already defined. Don't define lll_unlock_wake_cb and
10947 __lll_timedwait_tid for libc.so.
10948 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10949 define LOCK here (if UP is not defined). The actual code is in
10952 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10953 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10954 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10955 instead of lowlevelsem.h.
10956 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10957 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10958 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10960 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10961 lowlevelrwlock.sym.
10962 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10963 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10964 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10966 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10968 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10969 last changed. D'oh.
10971 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10973 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10974 of __libc_locking_needed.
10975 (lll_trylock): Initialize %eax to zero.
10977 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10978 pthread_cond_t definition.
10980 2003-03-10 Roland McGrath <roland@redhat.com>
10982 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10983 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10984 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10985 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10986 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10988 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10989 Instead of setting PD->multiple_threads, set globals
10990 __pthread_multiple_threads and __libc_multiple_threads.
10991 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10992 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10993 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10995 * descr.h (struct pthread): Conditionalize first member on
10996 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10997 containing an anonymous tcbhead_t. Move `list' member out.
10998 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10999 * allocatestack.c: Remove use of `header.data.' prefix.
11000 * pthread_create.c: Likewise.
11001 * init.c (__pthread_initialize_minimal_internal): Likewise.
11002 * sysdeps/pthread/createthread.c (create_thread): Likewise.
11003 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
11004 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
11005 * sysdeps/x86_64/tls.h: Likewise.
11006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
11007 (SINGLE_THREAD_P): Likewise.
11008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
11009 (SINGLE_THREAD_P): Likewise.
11010 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
11011 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
11013 2003-03-09 Ulrich Drepper <drepper@redhat.com>
11015 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
11017 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
11018 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11020 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
11021 leftovers from the ia32 code.
11023 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
11025 (clear_once_control): Don't load %esi.
11027 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
11030 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11032 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
11033 * sysdeps/unix/sysv/linux/createthread.c: ...here.
11035 * Makefile (tests): Add tst-cond10.
11036 * tst-cond10.c: New file.
11038 2003-03-08 Ulrich Drepper <drepper@redhat.com>
11040 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
11041 * tst-signal3.c (do_test): Likewise.
11042 * tst-sem5.c (do_test): Likewise.
11043 * tst-kill6.c (do_test): Likewise.
11044 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
11046 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
11048 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11049 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
11050 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
11051 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
11052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11056 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
11059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
11060 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11062 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11063 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11064 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11065 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11067 * allocatestack.c (allocate_stack): If mprotect() fails free the
11070 2003-03-07 Ulrich Drepper <drepper@redhat.com>
11072 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
11074 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
11075 lll_wake_tid. This was used only to work around kernel limits in
11077 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
11078 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
11079 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11080 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11082 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11083 (__pthread_initialize_minimal_internal): Change initialization of
11084 __static_tls_align_m1 appropriately.
11085 * pthreadP.h (__static_tls_align_m1): Renamed from
11086 __static_tls_align.
11087 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11088 instead of __static_tls_align-1.
11090 2003-03-04 Ulrich Drepper <drepper@redhat.com>
11092 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11094 * pthread_create.c: Define __pthread_keys using nocommon
11095 attribute, not by placing it explicitly in bss.
11096 Remove DEFINE_DEALLOC definition. Not needed anymore.
11098 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11099 Use it in mmap call to allocate stacks.
11101 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11103 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11104 result of the thread function.
11106 2003-03-03 Ulrich Drepper <drepper@redhat.com>
11108 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
11109 version is just fine.
11111 * sysdeps/unix/sysv/linux/libc_pthread_init.c
11112 (__pthread_child_handler): Renamed from pthread_child_handler,
11113 exported, and marked hidden. Change all users.
11114 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11115 free __pthread_child_handler from child list.
11117 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
11119 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11121 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11122 Fix handling of cancellation and failing pthread_mutex_unlock call.
11123 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11124 (__pthread_cond_wait): Likewise.
11126 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11127 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11128 lll_futex_timed_wait call.
11129 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11130 (pthread_rwlock_timedwrlock): Likewise.
11132 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11133 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11134 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11136 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11137 check of lll_futex_wake return value.
11139 2003-03-03 Roland McGrath <roland@redhat.com>
11141 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11143 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11144 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11145 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11147 2003-03-02 Ulrich Drepper <drepper@redhat.com>
11149 * sysdeps/pthread/timer_create.c (timer_create): Return correct
11150 error for CPU clocks.
11152 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11153 _POSIX_MONOTONIC_CLOCK.
11154 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11156 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11159 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11161 * descr.h (struct pthread): Move cleanup field to the front.
11163 2003-03-01 Roland McGrath <roland@redhat.com>
11165 * sem_open.c (sem_open): Braino fix.
11167 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11169 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11171 __pthread_cleanup_pop functionality.
11172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11174 * descr.h (struct pthread): Move tid field to the front now that
11177 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11178 (__lll_mutex_timedlock_wait): Remove.
11179 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11180 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11181 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11182 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11183 (lll_unlock_wake_cb): Don't save and restore %esi.
11184 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11186 (__lll_timedwait_tid): Add alignment.
11187 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11188 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11190 (__lll_timedwait_tid): Removed.
11191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11192 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11193 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11194 (pthread_barrier_wait): Don't save, load, and restore %esi for
11196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11197 (__pthread_cond_signal): Don't save, load, and restore %esi.
11198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11199 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11200 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11201 Don't save, load, and restore %esi.
11203 2003-02-27 Ulrich Drepper <drepper@redhat.com>
11205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11206 Release lock before waking up the waiters.
11208 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11210 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11211 (reader_thread): Likewise.
11213 * sysdeps/pthread/pthread_rwlock_unlock.c
11214 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11215 to wake up readers if there are none.
11217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11218 Release internal lock before wake threads.
11220 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11222 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11223 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11225 * tst-rwlock9.c: Likewise.
11226 * tst-rwlock10.c: New file.
11227 * tst-rwlock11.c: New file.
11229 * Makefile (tests): Add tst-dlsym1.
11230 * tst-dlsym1.c: New file.
11232 * init.c (__pthread_initialize_minimal_internal): Set
11233 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11234 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11236 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11238 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11240 * tst-cond2.c: Fix sychronization with child.
11242 * tst-rwlock8.c (reader_thread): Remove unused variable.
11244 * Makefile: Add rules to build and run tst-tls3.
11245 * tst-tls3.c: New file.
11246 * tst-tls3mod.c: New file.
11248 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11249 * tst-rwlock8.c: New file.
11250 * tst-rwlock9.c: New file.
11251 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11252 complete broken rwlock implementation.
11253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11257 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11259 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11260 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11261 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11262 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11263 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11265 2003-02-23 Roland McGrath <roland@redhat.com>
11267 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11269 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11271 * Makefile (tests): Add tst-context1.
11272 * tst-context1.c: New file.
11274 * Makefile (tests): Add tst-tls1 and tst-tls2.
11275 * tst-tls1.c: New file.
11276 * tst-tls2.c: New file.
11278 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11279 for failed cmpxchg.
11281 * pthread_create.c (start_thread): Set EXITING_BIT early.
11283 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11284 (THREAD_GETMEM_NC): Likewise.
11286 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11288 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11289 off 3 more bytes by using offset-less instructions when possible.
11291 * Makefile: Add dependency for $(objpfx)version.d.
11293 * eintr.c (eintr_source): Add unnecessary return but the compiler
11296 * tst-kill3.c: Include <unistd.h>.
11298 2003-02-21 Roland McGrath <roland@redhat.com>
11300 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11302 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11304 * Makefile (tests): Add tst-eintr1.
11305 (distribute): Add eintr.c.
11306 * tst-eintr1.c: New file.
11307 * eintr.c: New file.
11309 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11311 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11312 Disallow sending SIGCANCEL.
11314 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11315 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11316 * tst-kill1.c: New file.
11317 * tst-kill2.c: New file.
11318 * tst-kill3.c: New file.
11319 * tst-kill5.c: New file.
11320 * tst-kill6.c: New file.
11321 * tst-basic7.c: Renamed to...
11322 * tst-kill4.c: ...this.
11324 2003-02-21 Roland McGrath <roland@redhat.com>
11326 * Makefile (install-lib-ldscripts): New variable.
11328 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11330 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11331 * pthread_cancel.c: Use INVALID_TD_P.
11332 * pthread_detach.c: Likewise.
11333 * pthread_getschedparam.c: Likewise.
11334 * pthread_setschedparam.c: Likewise.
11335 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11336 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11337 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11338 * pthread_timedjoin.c: Likewise.
11340 * tst-basic7.c: Include <signal.h>.
11342 * pthread_join.c (pthread_join): Limited checking for invalid
11344 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11346 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11348 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11349 beginning of the loop. Clear the entire first block of TSD.
11350 * Makefile (tests): Add tst-key4.
11351 * tst-key4.c: New file.
11353 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11355 * Makefile (tests): Add tst-basic7.
11356 * tst-basic7.c: New file.
11358 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11359 Add some more __builtin_expect.
11361 * pthreadP.h: Define dummy version of DEBUGGING_P.
11363 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11365 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11366 _POSIX_THREAD_PRIORITY_SCHEDULING.
11367 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11368 _XOPEN_REALTIME_THREADS.
11369 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11371 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11372 kernel returns EINVAL for PID <= 0, work around it.
11374 * Makefile (tests): Add tst-signal5.
11375 * tst-signal5.c: New file.
11377 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11378 and LOGIN_NAME_MAX.
11380 * tst-cancel1.c (tf): Block all signals.
11382 * Makefile (tests): Add tst-basic6.
11383 * tst-basic6.c: New file.
11385 * tst-basic1.c: Add test for process ID.
11387 * Makefile (tests): Add tst-cancel10.
11388 * tst-cancel10.c: New file.
11390 * Makefile (tests): Add tst-signal4.
11391 * tst-signal4.c: New file.
11393 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11394 __sigismember instead of sigismember. Add __builtin_expect.
11396 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11398 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11399 pthread_setcancelstate, and pthread_rwlock_setpshared.
11401 * tst-cancel7.c (do_test): Make sure the pid file exists before
11402 canceling the thread.
11404 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11405 pthread_rwlock_timedrdlock tests.
11406 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11408 Check for invalid tv_nsec field.
11409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11412 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11413 recursive mutex of overflow.
11415 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11417 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11418 going into an endless loop.
11419 * Makefile (tests): Add tst-cancel9.
11420 * tst-cancel9.c: New file.
11422 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11424 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11426 * tst-mutex5.c (do_test): Add more timedlock tests.
11428 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11429 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11431 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11432 use INLINE_SYSCALL. Error number is returned, not -1.
11434 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11435 and __deallocate_stack with internal_function.
11436 * pthread_create.c: Adjust definitions appropriately.
11437 * allocatestack.c: Likewise.
11439 * pthread_join.c: Add one more __builtin_expect.
11440 * pthread_timedjoin.c: Likewise.
11442 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11443 not data of sequence number does not match.
11444 Add one __builtin_expect.
11446 * Makefile (tests): Add tst-clock1.
11447 * tst-clock1.c: New file.
11449 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11450 negative arguments.
11451 * Makefile (tests): Add tst-basic5.
11452 * tst-basic5.c: New file.
11454 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11456 * Makefile (tests): Add tst-basic4.
11457 * tst-basic4.c: New file.
11459 * pthreadP.h: Add declaraction for __nptl_nthreads.
11460 * pthread_create.c: Define __nptl_nthreads
11461 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11462 after thread is done. If then zero, call exit(0).
11463 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11464 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11465 * init.c (pthread_functions): Initialize ptr_nthreads.
11466 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11467 (__reclaim_stacks): Decrement __nptl_nthreads.
11468 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11470 * Makefile (tests): Add tst-basic3.
11471 * tst-basic3.c: New file.
11473 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11474 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11475 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11476 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11477 if asynchronous canceling is enabled.
11478 * pthread_join.c (pthread_join): When recognizing circular joins,
11479 take into account the other thread might be already canceled.
11480 * Makefile (tests): Add tst-join5.
11481 * tst-join5.c: New file.
11483 * Makefile (tests): Add tst-join4.
11484 * tst-join4.c: New file.
11486 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11488 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11490 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11492 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11493 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11494 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11496 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11498 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11499 error if lll_futex_wake failed.
11501 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11504 handling of cancellation and failung pthread_mutex_unlock call.
11505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11506 * Makefile (tests): Add tst-cond8 and tst-cond9.
11507 * tst-cond8.c: New file.
11508 * tst-cond9.c: New file.
11510 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11512 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11513 non-standard initializers with __USE_GNU.
11515 * Makefile (tests): Add tst-cleanup3.
11516 * tst-cleanup3.c: New file.
11518 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11520 * Makefile (tests): Add tst-attr1 and tst-attr2.
11521 * tst-attr1.c: New file.
11522 * tst-attr2.c: New file.
11524 * Makefile: Add rules to build and run tst-atfork2 test.
11525 * tst-atfork2.c: New file.
11526 * tst-atfork2mod.c: New file.
11528 * sysdeps/unix/sysv/linux/unregister-atfork.c
11529 (__unregister_atfork): Free the memory allocated for the handlers
11530 after removing them from the lists.
11532 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11535 * tst-atfork1.c (do_test): Wait for the child we forked.
11536 Report error in child.
11538 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11540 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11542 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11544 * Makefile (tests): Add tst-cancel8.
11545 * tst-cancel8.c: New file.
11547 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11548 clearing of control variable.
11549 * Makefile (tests): Add tst-once3 and tst-once4.
11550 * tst-once3.c: New file.
11551 * tst-once4.c: New file.
11553 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11555 * sysdeps/sh/Makefile: New file.
11556 * sysdeps/sh/bits/atomic.h: New file.
11557 * sysdeps/sh/pthread_spin_init.c: New file.
11558 * sysdeps/sh/pthread_spin_lock.c: New file.
11559 * sysdeps/sh/pthread_spin_trylock.S: New file.
11560 * sysdeps/sh/pthread_spin_unlock.S: New file.
11561 * sysdeps/sh/pthreaddef.h: New file.
11562 * sysdeps/sh/tcb-offsets.sym: New file.
11563 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11564 * sysdeps/sh/tls.h: New file.
11565 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11566 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11567 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11568 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11569 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11570 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11571 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11572 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11573 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11574 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11575 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11576 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11577 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11578 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11579 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11580 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11581 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11582 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11583 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11584 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11585 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11587 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11588 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11589 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11590 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11591 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11592 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11593 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11594 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11596 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11598 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11599 according to POSIX.
11601 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11603 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11605 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11606 (TLS_GET_FS): New #define.
11607 (TLS_SET_FS): New #define.
11608 Correct value of __NR_set_thread_area.
11610 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11612 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11614 * Makefile (tests): Add tst-popen1.
11615 * tst-popen1.c: New file.
11617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11618 but inactive generalization.
11619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11620 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11621 Minor optimization, remove one instruction.
11622 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11624 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11626 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11628 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11630 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11631 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11632 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11633 * sysdeps/pthread/pthread_cond_signal.c: New file.
11634 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11635 * sysdeps/pthread/pthread_cond_wait.c: New file.
11636 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11637 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11638 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11639 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11640 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11641 * sysdeps/s390/Makefile: New file.
11642 * sysdeps/s390/bits/atomic.h: New file.
11643 * sysdeps/s390/pthread_spin_init.c: New file.
11644 * sysdeps/s390/pthread_spin_lock.c: New file.
11645 * sysdeps/s390/pthread_spin_trylock.c: New file.
11646 * sysdeps/s390/pthread_spin_unlock.c: New file.
11647 * sysdeps/s390/pthreaddef.h: New file.
11648 * sysdeps/s390/tcb-offsets.sym: New file.
11649 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11650 * sysdeps/s390/tls.h: New file.
11651 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11652 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11653 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11654 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11655 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11656 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11657 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11658 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11659 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11660 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11661 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11662 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11663 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11664 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11665 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11666 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11667 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11668 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11669 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11670 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11671 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11672 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11673 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11675 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11677 * atomic.h: Add a couple more default implementations.
11678 (atomic_compare_and_exchange_acq): Use
11679 __arch_compare_and_exchange_32_acq in return value definition. It
11681 (atomic_bit_set): Renamed from atomic_set_bit.
11682 Add missing atomic_ prefixes.
11684 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11685 thread library is available, use correct value to mark initialized
11688 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11690 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11691 __sysconf to determine pagesize.
11693 * pthread_create.c: Include <atomic.h>.
11694 * allocatestack.c (allocate_stack): Implement coloring of the
11695 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11696 size minus one. Adjust users.
11697 * sysdeps/i386/i686/Makefile: New file.
11699 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11701 * allocatestack.c: Improve comment throughout the file.
11703 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11704 (__lll_lock_wait): Add branch prediction.
11705 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11706 (__lll_lock_wait): Likewise.
11707 (lll_unlock_wake_cb): Removed.
11709 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11711 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11712 _POSIX_THREAD_PRIORITY_SCHEDULING.
11714 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11716 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11717 Fix return type of ptr___pthread_getspecific.
11719 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11721 * Makefile (tests): Add tst-umask1.
11722 (tst-umask1-ARGS): Define.
11723 * tst-umask1.c: New file.
11725 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11727 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11728 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11729 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11730 pthread_rwlock_unlock.
11731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11732 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11733 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11734 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11741 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11742 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11744 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11745 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11747 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11748 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11749 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11751 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11752 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11754 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11756 * Makefile (libpthread-routines): Remove lowlevelcond and
11757 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11758 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11759 and pthread_cond_broadcast.
11760 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11761 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11762 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11763 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11764 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11765 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11766 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11767 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11768 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11769 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11771 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11774 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11775 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11776 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11777 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11778 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11779 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11780 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11781 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11782 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11783 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11784 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11785 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11786 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11787 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11788 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11789 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11790 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11792 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11793 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11794 of the code is moved to ...
11795 * sysdeps/pthread/createthread.c: ...here. New file.
11797 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11800 (__new_sem_post): Clear %eax before returning.
11801 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11803 * Makefile (tests): Add tst-cleanup2.
11804 * tst-cleanup2.c: New file.
11806 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11807 Interpret first parameter correctly.
11809 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11811 * Makefile (headers): Add bits/semaphore.h.
11813 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11815 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11818 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11820 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11821 must be used and mapping failed.
11822 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11824 * Makefile (CFLAGS-pthread_self.os): Define this, not
11825 CFLAGS-pthread_self.c.
11827 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11829 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11830 lll_unlock_wake_cb.
11832 * Makefile (libpthread-routines): Add version. Add rules to build
11833 version.os and banner.h.
11834 * version.c: New file.
11836 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11838 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11839 the alias unconditional.
11840 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11842 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11844 * Makefile (CFLAGS-pthread_self.c): New definition.
11846 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11848 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11849 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11850 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11851 * init.c (__pthread_initialize_minimal_internal): Likewise.
11853 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11855 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11857 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11858 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11859 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11860 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11861 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11862 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11864 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11866 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11867 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11868 * tst-cancel-wrappers.sh: Remove all exceptions.
11870 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11872 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11873 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11875 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11876 Use __libc_pthread_functions array if SHARED.
11878 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11879 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11881 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11882 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11883 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11884 __libc_ptf_call instead of __libc_maybe_call.
11885 (PTF): New #define.
11886 (__libc_cleanup_region_start): Wrap function name with PTF call.
11887 (__libc_cleanup_region_end): Likewise.
11888 (__libc_cleanup_end): Likewise.
11890 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11891 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11892 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11893 * pthreadP.h: Add prototypes.
11895 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11896 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11897 __pthread_rwlock_unlock aliases.
11898 * pthreadP.h: Add prototypes for new aliases.
11900 * pthreadP.h (struct pthead_functions): Moved to...
11901 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11902 * init.c (pthread_functions): Add initializers for new elements.
11904 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11905 __pthread_cleanup_pop_restore aliases.
11906 * pthreadP.h: Add prototypes.
11908 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11909 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11910 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11911 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11912 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11913 * pthreadP.h: Adjust prototypes and callers.
11915 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11917 * Makefile (tests): Add tst-cancel7.
11918 (tst-cancel7-ARGS): New variable.
11919 * tst-cancel7.c: New file.
11921 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11922 around gcc defficiencies.
11923 * old_pthread_cond_signal.c: Likewise.
11924 * old_pthread_cond_timedwait.c: Likewise.
11925 * old_pthread_cond_wait.c: Likewise.
11927 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11929 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11931 * Makefile (tests): Add tst-cond7.
11932 * tst-cond7.c: New file.
11934 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11935 (condvar_cleanup): Get condvar address from the right place.
11937 * atomic.h: Correct definitions of atomic_full_barrier,
11938 atomic_read_barrier, atomic_write_barrier.
11940 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11942 * old_pthread_cond_signal.c: Likewise.
11943 * old_pthread_cond_timedwait.c: Likewise.
11944 * old_pthread_cond_wait.c: Likewise.
11946 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11948 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11950 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11952 * pthreadP.h (pthread_cond_2_0_t): New type.
11953 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11954 Use new type for the 2.0 condvar function prototypes.
11955 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11956 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11958 * old_pthread_cond_destroy.c: Likewise.
11959 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11960 * old_pthread_cond_signal.c: Likewise.
11961 * old_pthread_cond_timedwait.c: Likewise.
11962 * old_pthread_cond_wait.c: Likewise.
11964 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11965 (__pthread_cond_wait): Don't save cancellation mode and seq value
11968 * herrno.c (__h_errno_location): Don't define as weak.
11970 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11972 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11973 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11974 and pthread_cond_wait.
11975 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11977 (__pthread_cond_broadcast_2_0): ... this.
11978 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11980 (__pthread_cond_destroy_2_0): ... this.
11981 * old_pthread_cond_init.c (__old_pthread_cond_init):
11983 (__pthread_cond_init_2_0): ... this.
11984 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11986 (__pthread_cond_signal_2_0): ... this.
11987 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11989 (__pthread_cond_wait_2_0): ... this.
11990 * pthread_cond_destroy.c: Include shlib-compat.h.
11991 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11992 * pthread_cond_init.c: Include shlib-compat.h.
11993 (pthread_cond_init): Change strong_alias into versioned_symbol.
11994 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11995 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11997 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11998 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11999 __pthread_cond_wait_2_0): New prototypes.
12000 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
12001 __old_pthread_cond_init, __old_pthread_cond_signal,
12002 __old_pthread_cond_wait): Removed.
12003 * init.c: Include shlib-compat.h.
12004 (pthread_functions): Guard ptr___pthread_attr_init_2_0
12005 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
12006 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
12007 ptr___pthread_cond_*_2_0 fields.
12008 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
12009 pthread_cond_*@GLIBC_2.0 compatibility symbols.
12011 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
12012 LIBC_SIGACTION was not yet defined.
12013 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
12014 [!defined LIBC_SIGACTION] (__sigaction): New function and
12016 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
12017 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
12019 2003-01-02 Jakub Jelinek <jakub@redhat.com>
12021 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
12023 2003-01-02 Ulrich Drepper <drepper@redhat.com>
12025 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
12026 New, larger type definition.
12027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
12029 * Versions [libpthread]: Add definitions for new pthread_cond_*
12030 interfaces for version GLIBC_2.3.2.
12031 * pthread_cond_init.c: Update initialization for new type definition.
12032 * Makefile (libpthread-routines): Remove pthread_cond_wait,
12033 pthread_cond_timedwait, pthread_cond_signal, and
12034 pthread_cond_broadcast. Add old_pthread_cond_init,
12035 old_pthread_cond_destroy, old_pthread_cond_wait,
12036 old_pthread_cond_timedwait, old_pthread_cond_signal, and
12037 old_pthread_cond_broadcast.
12038 * old_pthread_cond_broadcast.c: New file.
12039 * old_pthread_cond_destroy.c: New file.
12040 * old_pthread_cond_init.c: New file.
12041 * old_pthread_cond_signal.c: New file.
12042 * old_pthread_cond_timedwait.c: New file.
12043 * old_pthread_cond_wait.c: New file.
12044 * pthreadP.h: Add prototypes for the compatibility interfaces.
12046 * pthread_cond_destroy.c: Don't include <errno.h>.
12048 2003-01-01 Ulrich Drepper <drepper@redhat.com>
12050 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
12051 unnecessary zero offset when addressing MUTEX.
12053 2002-12-31 Ulrich Drepper <drepper@redhat.com>
12055 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
12057 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
12058 for __register_atfork.
12060 2002-12-31 Jakub Jelinek <jakub@redhat.com>
12062 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
12063 instead of ASSEMBLER test macro.
12065 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
12066 __libc_current_sigrtmax): Add libc_hidden_def.
12068 * sysdeps/pthread/list.h: Remove assert.h include.
12070 2002-12-31 Ulrich Drepper <drepper@redhat.com>
12072 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
12073 __pthread_initialize_minimal_internal not
12074 __pthread_initialize_minimal.
12076 2002-12-30 Ulrich Drepper <drepper@redhat.com>
12078 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
12079 __pthread_initialize_minimal as hidden.
12081 * init.c (__pthread_initialize_minimal_internal): Don't mark as
12084 2002-12-31 Jakub Jelinek <jakub@redhat.com>
12086 * Makefile ($(inst_libdir)/libpthread.so): Depend on
12087 $(common-objpfx)format.lds, include that into the output script.
12089 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12091 2002-12-28 Andreas Jaeger <aj@suse.de>
12093 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12094 nsec resolution changes.
12095 (xstat64_conv): Likewise.
12096 (xstat32_conv): Likewise.
12097 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12098 struct kernel_stat.
12099 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12100 structs stat and stat64.
12101 * time/time.h (__timespec_defined): Define for __USE_MISC.
12102 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12104 2002-12-30 Jakub Jelinek <jakub@redhat.com>
12106 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
12108 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12109 (pthread_exit): Use strong_alias to avoid warnings.
12110 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12111 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12112 ptr___pthread_attr_init_2_*.
12113 * init.c (pthread_functions): Adjust.
12115 2002-12-29 Ulrich Drepper <drepper@redhat.com>
12117 * forward.c: Make all functions available by default again. It
12118 caused too much trouble.
12120 * pt-siglongjmp.c: Removed.
12122 2002-12-28 Jakub Jelinek <jakub@redhat.com>
12124 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12125 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12126 * sysdeps/i386/Makefile: New file.
12127 * sysdeps/i386/tcb-offsets.sym: New file.
12128 * sysdeps/pthread/tcb-offsets.h: New file.
12129 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12130 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12132 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12133 __register_atfork...
12134 (GLIBC_2.3.2): ...here.
12136 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12138 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12139 pthread_attr_setstackaddr with __attribute_deprecated__.
12141 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12143 * pt-system.c (system): Remove cancellation handling.
12144 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12145 cancellation routines.
12147 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12149 * descr.h: Include <dl-sysdep.h>.
12150 (struct pthread): Move header.data.list to the back of the struct.
12151 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12152 (MULTIPLE_THREADS_OFFSET): Adjust offset.
12153 (SYSINFO_OFFSEET): Likewise.
12155 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12157 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12159 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12160 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12161 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12162 (USE_DL_SYSINFO): Undef.
12164 2002-12-22 Jakub Jelinek <jakub@redhat.com>
12166 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12167 $(common-objpfx)libc.so.
12168 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12169 it is bigger than pipe buffer size even on arches with bigger
12171 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12173 2002-12-25 Ulrich Drepper <drepper@redhat.com>
12175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12176 correct errno access for case that USE___THREAD is not defined.
12178 2002-12-24 Ulrich Drepper <drepper@redhat.com>
12180 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12181 Patch by Marijn Ros <marijn@mad.scientist.com>.
12183 2002-12-22 Roland McGrath <roland@redhat.com>
12185 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12187 2002-12-20 Ulrich Drepper <drepper@redhat.com>
12189 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12191 2002-12-19 Ulrich Drepper <drepper@redhat.com>
12193 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12194 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12195 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12197 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12199 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12200 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12201 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12202 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12203 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12204 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12205 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12206 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12208 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12210 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12212 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12214 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12216 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12217 that sysinfo is properly initialized.
12218 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12219 to 1 only for ld.so.
12221 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12222 RTLD_CORRECT_DYNAMIC_WEAK.
12224 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12226 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12227 Use return 0 as 6th argument to FORWARD4.
12228 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12230 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12232 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12233 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12234 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12235 (INIT_SYSINFO): New #define.
12236 (TLS_TP_INIT): Use INIT_SYSINFO.
12237 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12238 At test to make sure SYSINFO_OFFSET value is correct.
12239 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12241 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12243 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12244 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12245 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12246 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12247 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12248 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12249 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12251 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12253 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12254 macro instead of using int $0x80 directly.
12256 * sysdeps/pthread/bits/stdio-lock.h: New file.
12257 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12258 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12259 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12260 * Makefile (routines): Add libc-lowlevelmutex.
12262 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12263 __i686.get_pc_thunk.dx.
12265 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12267 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12268 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12269 ($(objpfx)tst-cancel-wrappers.out): New rule.
12270 * tst-cancel-wrappers.sh: New test.
12271 * tst-locale1.c: Include signal.h.
12272 (uselocale): Test static linking of __libc_current_sigrt*.
12274 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12276 * Makefile (tests): Add tst-cancel6.
12277 * tst-cancel6.c: New file
12279 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12281 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12282 Define meaningfully for assembler as well.
12283 * pthreadP.h (struct pthread_functions): Remove
12284 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12285 and ptr_pthread_attr_init_2_1 fields.
12286 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12287 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12288 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12289 (FORWARD3): Define using FORWARD4.
12290 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12292 * pt-system.c: Remove duplicate stdlib.h include.
12294 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12296 * sem_init.c: Define sem_init@GLIBC_2.0.
12297 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12298 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12300 * flockfile.c: Moved to...
12301 * sysdeps/pthread/flockfile.c: ...here. New file.
12302 * funlockfile.c: Moved to...
12303 * sysdeps/pthread/funlockfile.c: ...here. New file.
12304 * ftrylockfile.c: Moved to...
12305 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12307 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12309 * libc-cancellation.c: Guard both function with
12310 #if !defined NOT_IN_libc.
12311 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12312 automatically provided pthread wrappers.
12313 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12314 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12316 * pt-open.c: Removed.
12317 * pt-fcntl.c: Removed.
12318 * pt-fsync.c: Removed.
12319 * pt-lseek.c: Removed.
12320 * pt-msgrcv.c: Removed.
12321 * pt-msgsnd.c: Removed.
12322 * pt-msync.c: Removed.
12323 * pt-nanosleep.c: Removed.
12324 * pt-open64.c: Removed.
12325 * pt-pause.c: Removed.
12326 * pt-pread.c: Removed.
12327 * pt-pread64.c: Removed.
12328 * pt-pwrite.c: Removed.
12329 * pt-pwrite64.c: Removed.
12330 * pt-read.c: Removed.
12331 * pt-recv.c: Removed.
12332 * pt-recvfrom.c: Removed.
12333 * pt-recvmsg.c: Removed.
12334 * pt-send.c: Removed.
12335 * pt-sendto.c: Removed.
12336 * pt-sigtimedwait.c: Removed.
12337 * pt-sigwait.c: Removed.
12338 * pt-wait.c: Removed.
12339 * pt-waitpid.c: Removed.
12340 * pt-write.c: Removed.
12341 * pt-accept.c: Removed.
12342 * pt-close.c: Removed.
12343 * pt-connect.c: Removed.
12344 * pt-lseek64.c: Removed.
12345 * pt-sendmsg.c: Removed.
12346 * pt-tcdrain.c: Removed.
12348 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12350 * init.c (__pthread_initialize_minimal_internal): Renamed from
12351 __pthread_initialize_minimal. Make old name an alias. This
12352 converts a normal relocation into a relative relocation.
12354 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12356 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12357 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12358 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12359 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12360 pt-sigwaitinfo, pt-waitid, and pt-writev.
12361 * pt-creat.c: Removed.
12362 * pt-poll.c: Removed.
12363 * pt-pselect.c: Removed.
12364 * pt-readv.c: Removed.
12365 * pt-select.c: Removed.
12366 * pt-sigpause.c: Removed.
12367 * pt-sigsuspend.c: Removed.
12368 * pt-sigwaitinfo.c: Removed.
12369 * pt-waitid.c: Removed.
12370 * pt-writev.c: Removed.
12372 * init.c (pthread_functions): New variable.
12373 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12374 (or NULL) to __libc_pthread_init.
12375 * forward.c: Rewrite to use __libc:pthread_functions array to get
12376 function addresses.
12377 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12379 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12380 Take new parameter. Copy content of variable pointed to by it
12381 to __libc_pthread_init.
12383 * pthreadP.h (struct pthread_functions): New type.
12384 (__libc_pthread_init): Declare.
12386 * pthread_attr_destroy.c: Add namespace protected alias.
12387 * pthread_attr_getdetachstate.c: Likewise.
12388 * pthread_attr_getinheritsched.c: Likewise.
12389 * pthread_attr_getschedparam.c: Likewise.
12390 * pthread_attr_getschedpolicy.c: Likewise.
12391 * pthread_attr_getscope.c: Likewise.
12392 * pthread_attr_setdetachstate.c: Likewise.
12393 * pthread_attr_setinheritsched.c: Likewise.
12394 * pthread_attr_setschedparam.c: Likewise.
12395 * pthread_attr_setschedpolicy.c: Likewise.
12396 * pthread_attr_setscope.c: Likewise.
12397 * pthread_cond_broadcast.c: Likewise.
12398 * pthread_cond_destroy.c: Likewise.
12399 * pthread_cond_init.c: Likewise.
12400 * pthread_cond_signal.c: Likewise.
12401 * pthread_cond_wait.c: Likewise.
12402 * pthread_condattr_destroy.c: Likewise.
12403 * pthread_condattr_init.c: Likewise.
12404 * pthread_equal.c: Likewise.
12405 * pthread_exit.c: Likewise.
12406 * pthread_getschedparam.c: Likewise.
12407 * pthread_self.c: Likewise.
12408 * pthread_setcancelstate.c: Likewise.
12409 * pthread_setschedparam.c: Likewise.
12410 * pthread_mutex_destroy.c: Likewise.
12411 * pthread_mutex_init.c: Likewise.
12412 * pthreadP.h: Add prototypes for the aliases.
12414 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12415 multiple_threads member in correct TCB to 1.
12417 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12418 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12419 member of thread decriptor, otherwise return unconditionally 1.
12421 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12423 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12424 regular Linux version. Remove file.
12425 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12426 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12427 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12428 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12429 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12430 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12431 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12432 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12433 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12434 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12435 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12436 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12437 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12438 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12439 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12440 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12441 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12442 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12443 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12444 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12445 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12446 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12447 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12448 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12449 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12450 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12451 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12452 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12453 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12454 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12456 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12458 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12459 * sysdeps/unix/sysv/linux/open.c: Removed.
12460 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12461 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12462 * sysdeps/unix/sysv/linux/msync.c: Removed.
12463 * sysdeps/unix/sysv/linux/read.c: Removed.
12464 * sysdeps/unix/sysv/linux/close.c: Removed.
12465 * sysdeps/unix/sysv/linux/creat.c: Removed.
12466 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12467 * sysdeps/unix/sysv/linux/pause.c: Removed.
12468 * sysdeps/unix/sysv/linux/select.c: Removed.
12469 * sysdeps/unix/sysv/linux/write.c: Removed.
12471 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12473 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12474 element in TCB to see whether locking is needed.
12476 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12477 MULTIPLE_THREADS_OFFSET value is correct.
12479 * sysdeps/unix/sysv/linux/close.c: New file.
12480 * sysdeps/unix/sysv/linux/connect.S: New file.
12481 * sysdeps/unix/sysv/linux/creat.c: New file.
12482 * sysdeps/unix/sysv/linux/fsync.c: New file.
12483 * sysdeps/unix/sysv/linux/llseek.c: New file.
12484 * sysdeps/unix/sysv/linux/lseek.c: New file.
12485 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12486 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12487 * sysdeps/unix/sysv/linux/msync.c: New file.
12488 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12489 * sysdeps/unix/sysv/linux/open.c: New file.
12490 * sysdeps/unix/sysv/linux/open64.c: New file.
12491 * sysdeps/unix/sysv/linux/pause.c: New file.
12492 * sysdeps/unix/sysv/linux/poll.c: New file.
12493 * sysdeps/unix/sysv/linux/pread.c: New file.
12494 * sysdeps/unix/sysv/linux/pread64.c: New file.
12495 * sysdeps/unix/sysv/linux/pselect.c: New file.
12496 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12497 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12498 * sysdeps/unix/sysv/linux/readv.c: New file.
12499 * sysdeps/unix/sysv/linux/recv.S: New file.
12500 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12501 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12502 * sysdeps/unix/sysv/linux/select.c: New file.
12503 * sysdeps/unix/sysv/linux/send.S: New file.
12504 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12505 * sysdeps/unix/sysv/linux/sendto.S: New file.
12506 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12507 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12508 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12509 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12510 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12511 * sysdeps/unix/sysv/linux/system.c: New file.
12512 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12513 * sysdeps/unix/sysv/linux/wait.c: New file.
12514 * sysdeps/unix/sysv/linux/waitid.c: New file.
12515 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12516 * sysdeps/unix/sysv/linux/writev.c: New file.
12517 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12519 * pt-readv.c: Fix comment.
12521 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12523 * tst-cleanup1.c: Include stdlib.h.
12525 * tst-cancel5.c: New test.
12526 * Makefile (tests): Add tst-cancel5.
12527 (tst-cancel5): Link against libc.so libpthread.so in that order.
12529 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12531 * forward.c (test_loaded): Prevent recursive calls.
12533 * Makefile (routines): Add libc-cancellation.
12534 * libc-cancellation.c: New file.
12535 * descr.h (struct pthread): Add multiple_threads field.
12536 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12537 new thread descriptor to 1.
12538 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12539 Initialize multiple_thread field after successful thread creation.
12540 * cancellation.c (__do_cancel): Move to pthreadP.h.
12541 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12542 (__pthread_disable_asynccancel): Add internal_function attribute.
12543 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12544 * pthread_setcancelstate.c: Likewise.
12545 * pthread_setcanceltype.c: Likewise.
12546 * pthread_exit.c: Likewise.
12547 * pthreadP.h (CANCELLATION_P): Likewise.
12548 (__do_cancel): Define as static inline.
12549 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12550 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12552 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12553 fields. Define MULTIPLE_THREADS_OFFSET.
12554 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12556 * sysdeps/unix/sysv/linux/accept.S: New file.
12557 * sysdeps/unix/sysv/linux/read.c: New file.
12558 * sysdeps/unix/sysv/linux/write.c: New file.
12559 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12560 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12561 initialization of __libc_locking_needed.
12562 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12563 __libc_locking_needed, use multiple_threads field in TCB.
12564 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12566 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12568 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12570 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12572 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12573 access to __libc_locking_needed for PIC.
12575 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12577 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12578 declare for libc.so.
12579 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12581 (__libc_lock_lock): Put into statement expression.
12582 (__libc_lock_unlock): Remove trailing semicolon.
12583 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12585 2002-12-12 Roland McGrath <roland@redhat.com>
12587 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12588 "m" constraint to refer to __libc_locking_needed. Declare it here.
12590 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12592 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12593 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12594 Initialize __libc_locking_needed.
12595 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12596 instead of __register_pthread_fork_handler.
12597 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12598 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12599 fork-gen with libc_pthread_init.
12600 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12601 of __register_pthread_fork_handler.
12602 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12603 of __register_pthread_fork_handler.
12604 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12605 __libc_locking_needed to determine whether lock prefix can be avoided.
12606 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12608 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12610 * Makefile (tests): Add tst-cleanup1.
12611 * tst-cleanup1.c: New file.
12612 * cancellation.c (__cleanup_thread): Removed.
12613 (__do_cancel): Remove call to __cleanup_thread.
12614 * pthreadP.h: Remove __cleanup_thread prorotype.
12616 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12617 Remember function and argument even if cancellation handler
12618 function is not available.
12619 (__libc_cleanup_region_end): Execute registered function directly if
12620 pthread functions are not available.
12621 (__libc_cleanup_end): Likewise.
12623 * init.c (__pthread_initialize_minimal): Fix initialization in
12624 static lib by preventing gcc from being too clever.
12626 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12628 * init.c (__pthread_initialize_minimal): Remove unneccesary
12631 * Makefile (tests): We can run tst-locale2 now.
12633 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12635 * Versions: Remove duplicated sigwait entry.
12637 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12639 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12642 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12644 * pthreadP.h: Declare __pthread_enable_asynccancel and
12645 __pthread_disable_asynccancel.
12646 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12647 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12648 * cancellation.c (__pthread_enable_asynccancel): New function.
12649 (__pthread_disable_asynccancel): New function.
12650 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12651 * pt-close.c: Likewise.
12652 * pt-connect.c: Likewise.
12653 * pt-creat.c: Likewise.
12654 * pt-fcntl.c: Likewise.
12655 * pt-fsync.c: Likewise.
12656 * pt-lseek.c: Likewise.
12657 * pt-lseek64.c: Likewise.
12658 * pt-msgrcv.c: Likewise.
12659 * pt-msgsnd.c: Likewise.
12660 * pt-msync.c: Likewise.
12661 * pt-nanosleep.c: Likewise.
12662 * pt-open.c: Likewise.
12663 * pt-open64.c: Likewise.
12664 * pt-pause.c: Likewise.
12665 * pt-poll.c: Likewise.
12666 * pt-pread.c: Likewise.
12667 * pt-pread64.c: Likewise.
12668 * pt-pselect.c: Likewise.
12669 * pt-pwrite.c: Likewise.
12670 * pt-pwrite64.c: Likewise.
12671 * pt-read.c: Likewise.
12672 * pt-readv.c: Likewise.
12673 * pt-recv.c: Likewise.
12674 * pt-recvfrom.c: Likewise.
12675 * pt-recvmsg.c: Likewise.
12676 * pt-select.c: Likewise.
12677 * pt-send.c: Likewise.
12678 * pt-sendmsg.c: Likewise.
12679 * pt-sendto.c: Likewise.
12680 * pt-sigpause.c: Likewise.
12681 * pt-sigsuspend.c: Likewise.
12682 * pt-sigtimedwait.c: Likewise.
12683 * pt-sigwait.c: Likewise.
12684 * pt-sigwaitinfo.c: Likewise.
12685 * pt-system.c: Likewise.
12686 * pt-tcdrain.c: Likewise.
12687 * pt-wait.c: Likewise.
12688 * pt-waitid.c: Likewise.
12689 * pt-waitpid.c: Likewise.
12690 * pt-write.c: Likewise.
12691 * pt-writev.c: Likewise.
12692 * pthread_join.c: Likewise.
12693 * pthread_timedjoin.c: Likewise.
12695 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12696 (__xpg_sigpause): New function.
12697 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12699 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12701 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12703 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12704 _GI_pthread_cleanup_pop to pthreadP.h.
12706 * ftrylockfile.c: Use _IO_lock_trylock instead of
12707 pthread_mutex_trylock.
12709 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12710 (CANCEL_RESET): Likewise.
12711 (__pthread_setcanceltype_): Declare.
12712 (__pthread_mutex_lock_internal): Declare.
12713 (__pthread_mutex_unlock_internal): Declare.
12714 (__pthread_once_internal): Declare.
12715 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12716 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12718 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12719 and pthread_mutex_unlock.
12720 * pthread_cond_wait.c: Likewise.
12721 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12722 * pthread_mutex_unlock.c: Likewise.
12724 * pthread_setcanceltype.c: Add additional alias
12725 __pthread_setcanceltype.
12727 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12728 * sem_open.c (sem_open): Likewise.
12729 Use __libc_open, __libc_write, and __libc_close instead of
12730 open, write, and close respectively.
12732 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12733 Rewrite as statement expression since it must return a value.
12735 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12736 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12739 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12740 alias __pthread_once_internal.
12742 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12744 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12746 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12747 * tst-stdio1.c: New file.
12748 * tst-stdio2.c: New file.
12750 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12752 * Makefile (tests): Comment out tst-locale2 for now.
12753 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12755 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12757 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12758 Use _IO_lock_init instead of explicit assignment.
12760 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12761 Define __libc_lock_* and __libc_lock_recursive macros with
12762 lowlevellock macros, not pthread mutexes.
12764 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12765 of pthread_mutex_lock.
12766 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12767 instead of pthread_mutex_unlock.
12769 2002-12-06 Roland McGrath <roland@redhat.com>
12771 * allocatestack.c (__stack_user): Use uninitialized defn.
12772 * init.c (__pthread_initialize_minimal): Initialize it here.
12774 2002-12-05 Roland McGrath <roland@redhat.com>
12776 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12778 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12780 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12781 missing & here too.
12783 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12785 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12787 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12788 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12789 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12790 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12791 for __libc_lock_* macros.
12792 * Makefile (routines): Add libc-lowlevellock.
12794 2002-10-09 Roland McGrath <roland@redhat.com>
12796 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12797 Under [__PIC__], call the function via the pointer fetched for
12798 comparison rather than a call by name that uses the PLT.
12799 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12800 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12801 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12802 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12803 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12805 2002-12-04 Roland McGrath <roland@redhat.com>
12807 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12809 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12810 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12812 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12814 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12816 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12817 a completely opaque, non-integer type.
12818 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12820 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12822 * sysdeps/i386/tls.h: Include stdlib.h.
12823 * sysdeps/x86_64/tls.h: Likewise.
12825 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12827 * Makefile (tests): Add tst-locale2.
12828 (tests-static): Likewise.
12829 * tst-locale2.c: New file.
12831 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12832 volatile and add memory clobbers to lock operations.
12834 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12836 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12837 * sysdeps/i386/i486/bits/atomic.h: New file.
12838 * sysdeps/i386/i586/bits/atomic.h: New file.
12839 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12840 include i486 version.
12841 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12842 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12843 Patch by Marijn Ros <marijn@mad.scientist.com>.
12845 * allocatestack.c (get_cached_stack): Don't crash if we first
12846 found a stack with a larger size then needed.
12847 Reported by Hui Huang <hui.huang@sun.com>.
12849 * Makefile (tests): Add tst-sysconf.
12850 * tst-sysconf.c: New file.
12852 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12853 PTHREAD_THREADS_MAX.
12855 2002-12-02 Roland McGrath <roland@redhat.com>
12857 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12858 Declare using hidden_proto instead of attribute_hidden, so there are
12859 non-.hidden static symbols for gdb to find.
12860 (__pthread_keys): Likewise.
12861 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12862 * allocatestack.c (__stack_user): Likewise.
12863 * pthread_create.c (__pthread_keys): Likewise.
12864 (__nptl_threads_events, __nptl_last_event): Make these static instead
12866 * pthread_key_create.c (__pthread_pthread_keys_max,
12867 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12869 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12871 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12873 * tst-locale1.c: New file.
12875 * pthread_cond_timedwait.c: Include <stdlib.h>.
12877 * Makefile (tests): Add tst-fork2 and tst-fork3.
12878 * tst-fork2.c: New file.
12879 * tst-fork3.c: New file.
12881 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12883 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12885 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12886 require it to 200112L.
12888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12889 instruction only if HAVE_CMOV is defined.
12890 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12892 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12894 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12896 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12898 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12900 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12902 * sysdeps/x86_64/bits/atomic.h: New file.
12904 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12907 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12908 possible since gettid cannot fail.
12910 * sysdeps/x86_64/pthreaddef.h: New file.
12912 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12914 * sysdeps/x86_64/pthread_spin_init.c: New file.
12915 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12916 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12917 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12919 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12920 Add missing lock prefix. Minute optimization.
12922 * tst-spin2.c (main): Also check successful trylock call.
12924 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12925 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12927 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12928 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12930 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12931 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12932 value in case of an error. Add support for INTERNAL_SYSCALL.
12934 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12935 value in case of an error.
12937 * sysdeps/x86_64/tls.h: New file.
12939 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12941 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12942 takes the array member name and the index as parameters.
12943 (THREAD_SETMEM_NC): Likewise.
12944 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12945 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12948 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12949 to decide which code to use.
12950 (THREAD_SETMEM_NC): Likewise.
12952 * allocatestack.c (queue_stack): Don't remove stack from list here.
12953 Do it in the caller. Correct condition to prematurely terminate
12954 loop to free stacks.
12955 (__deallocate_stack): Remove stack from list here.
12957 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12959 * Makefile (tests): Add tst-stack1.
12960 * tst-stack1.c: New file.
12962 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12965 * pthread_attr_getstack.c: Return bottom of the thread area.
12967 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12969 * Makefile (libpthread-routines): Add pt-allocrtsig and
12970 pthread_kill_other_threads.
12971 * pt-allocrtsig.c: New file.
12972 * pthread_kill_other_threads.c: New file.
12973 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12974 all three functions.
12975 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12977 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12978 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12979 and __libc_allocate_rtsig_private.
12980 * Versions (libpthread): Export pthread_kill_other_threads_np,
12981 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12983 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12985 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12986 the end of the stack. Adjust computations.
12987 When mprotect call fails dequeue stack and free it.
12988 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12990 * pthread_getattr_np.c: Likewise.
12992 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12995 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12997 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12998 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
13000 2002-11-22 Ulrich Drepper <drepper@redhat.com>
13002 * pthread_getspecific.c: Optimize access to first 2nd-level array.
13003 * pthread_setspecific.c: Likewise.
13005 2002-11-21 Ulrich Drepper <drepper@redhat.com>
13007 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
13008 definitions. Get them from the official place.
13009 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
13011 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
13012 Use new CLONE_ flags in clone() calls.
13014 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
13015 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
13017 * Versions: Add pthread_* functions for libc.
13018 * forward.c: New file.
13020 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
13022 * herrno.c: New file.
13025 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
13026 sem_trywait, and sem_timedwait. Add herrno and res.
13027 * sem_init.c: Don't initialize lock and waiters members.
13028 * sem_open.c: Likewise.
13029 * sem_post.c: Removed.
13030 * sem_wait.c: Removed.
13031 * sem_trywait.c: Removed.
13032 * sem_timedwait.c: Removed.
13033 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
13034 Includes full implementations of sem_post, sem_wait, sem_trywait,
13036 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
13037 for new implementation.
13038 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
13039 and waiters fields.
13041 * tst-sem3.c: Improve error message.
13042 * tst-signal3.c: Likewise.
13044 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
13045 to tell the kernel about the termination futex and to initialize tid
13046 member. Don't initialize main_thread.
13047 * descr.h (struct pthread): Remove main_thread member.
13048 * cancelllation.c (__do_cancel): Remove code handling main thread.
13049 The main thread is not special anymore.
13051 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
13052 size of the stacks to stack_cache_actsize.
13054 * pt-readv.c: Add missing "defined".
13055 * pt-sigwait.c: Likewise.
13056 * pt-writev.c: Likewise.
13058 2002-11-09 Ulrich Drepper <drepper@redhat.com>
13060 * Versions: Export __connect from libpthread.
13061 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13063 * Makefile (libpthread-routines): Add pt-raise.
13064 * sysdeps/unix/sysv/linux/raise.c: New file.
13065 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
13066 * sysdeps/generic/pt-raise.c: New file.
13068 * pthread_cond_init.c: Initialize all data elements of the condvar
13069 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
13071 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
13072 * pthread_create.c: Likewise.
13074 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
13075 * tst-key1.c: New file.
13076 * tst-key2.c: New file.
13077 * tst-key3.c: New file.
13079 * Versions: Export pthread_detach for version GLIBC_2.0.
13080 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13082 2002-11-08 Ulrich Drepper <drepper@redhat.com>
13084 * pthread_key_create.c: Terminate search after an unused key was found.
13085 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13087 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13088 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13090 2002-10-10 Ulrich Drepper <drepper@redhat.com>
13092 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13093 dynamic lookup for errno in PIC.
13095 * allocatestack.c (get_cached_stack): Rearrange code slightly to
13096 release the stack lock as soon as possible.
13097 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13098 the static TLS block.
13099 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13101 * cancellation.c: Renamed from cancelation.c.
13102 * Makefile: Adjust accordingly.
13103 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13104 * cleanup_defer.c: Use CANCELLATION_P.
13105 * pthread_testcancel.c: Likewise.
13106 * descr.h: Fix spelling in comments.
13107 * init.c: Likewise.
13108 * pthread_getattr_np.c: Likewise.
13109 * pthread_getschedparam.c: Likewise.
13110 * pthread_setschedparam.c: Likewise.
13111 * Versions: Likewise.
13113 * pt-pselect.c: New file.
13114 * Makefile (libpthread-routines): Add pt-pselect.
13115 * Versions: Add pselect.
13117 * tst-cancel4.c: New file.
13118 * Makefile (tests): Add tst-cancel4.
13120 2002-10-09 Ulrich Drepper <drepper@redhat.com>
13122 * pthread_mutex_lock.c: Always record lock ownership.
13123 * pthread_mutex_timedlock.c: Likewise.
13124 * pthread_mutex_trylock.c: Likewise.
13126 * pt-readv.c: New file.
13127 * pt-writev.c: New file.
13128 * pt-creat.c: New file.
13129 * pt-msgrcv.c: New file.
13130 * pt-msgsnd.c: New file.
13131 * pt-poll.c: New file.
13132 * pt-select.c: New file.
13133 * pt-sigpause.c: New file.
13134 * pt-sigsuspend.c: New file.
13135 * pt-sigwait.c: New file.
13136 * pt-sigwaitinfo.c: New file.
13137 * pt-waitid.c: New file.
13138 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13139 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13140 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13141 * Versions: Add all the new functions.
13143 * tst-exit1.c: New file.
13144 * Makefile (tests): Add tst-exit1.
13146 * sem_timedwait.c: Minor optimization for more optimal fastpath.
13148 2002-10-08 Ulrich Drepper <drepper@redhat.com>
13150 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13152 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13153 call. pthread_join is an official cancellation point.
13154 * pthread_timedjoin.c: Likewise.
13156 * pthread_cond_wait.c: Revert order in which internal lock are dropped
13157 and the condvar's mutex are retrieved.
13158 * pthread_cond_timedwait.c: Likewise.
13159 Reported by dice@saros.East.Sun.COM.
13161 2002-10-07 Ulrich Drepper <drepper@redhat.com>
13163 * pthreadP.h: Cut out all type definitions and move them...
13164 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
13165 * pthreadP.h: Include <internaltypes.h>.
13167 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13168 performance tweaks.
13170 * sem_trywait.c: Shuffle #includes around to get right order.
13171 * sem_timedwait.c: Likewise.
13172 * sem_post.c: Likewise.
13173 * sem_wait.c: Likewise.
13175 * nptl 0.3 released.
13177 * Makefile (tests): Add tst-signal3.
13178 * tst-signal3.c: New file.
13180 2002-10-05 Ulrich Drepper <drepper@redhat.com>
13182 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13183 the asms modify the sem object.
13184 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13186 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13187 the actual members.
13188 * pthreadP.h (struct sem): New type. Actual semaphore type.
13189 * semaphoreP.h: Include pthreadP.h.
13190 * sem_getvalue.c: Adjust to sem_t change.
13191 * sem_init.c: Likewise.
13192 * sem_open.c: Likewise.
13193 * sem_post.c: Likewise.
13194 * sem_timedwait.c: Likewise.
13195 * sem_trywait.c: Likewise.
13196 * sem_wait.c: Likewise.
13198 2002-10-04 Ulrich Drepper <drepper@redhat.com>
13200 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13201 * tst-basic2.c: New file.
13202 * tst-exec1.c: New file.
13203 * tst-exec2.c: New file.
13204 * tst-exec3.c: New file.
13206 * tst-fork1.c: Remove extra */.
13208 * nptl 0.2 released. The API for IA-32 is complete.