PowerPC: Fix gettimeofday ifunc selection
[glibc.git] / nptl / ChangeLog
blob0defc9a871a28ad2c5166c8fa05a9354c11bcdbb
1 2014-01-18  H.J. Lu  <hongjiu.lu@intel.com>
3         [BZ #14782]
4         * tst-cancel-wrappers.sh: Remove system.
6 2014-01-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
8         * tst-tls7.c (action): New function.
9         (do_test): Call it.
10         * tst-tls7mod.c (action): Move sem_post to caller.
12 2014-01-03  Andrew Hunter  <ahh@google.com>
14         * nptl/Makefile (tst-tls7): New test.
15         * nptl/tst-tls7.c: New file.
16         * nptl/tst-tls7mod.c: New file.
17         * nptl/allocatestack.c (init_one_static_tls): Use atomic barrier.
19 2013-12-12  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
21         * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
22         * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
24 2013-12-09  Carlos O'Donell  <carlos@redhat.com>
26         * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
27         * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
29 2013-12-09  Andreas Schwab  <schwab@suse.de>
31         [BZ #15843]
32         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
33         (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
34         before __condvar_tw_cleanup2 label.
36 2013-12-04  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
38         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
39         (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
40         into our own stack frame instead of the caller's.
41         (PSEUDO): Use them.  Use symbolic stack frame offsets.
42         (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
43         (DOCARGS_2, UNDOCARGS_2): Likewise.
44         (DOCARGS_3, UNDOCARGS_3): Likewise.
45         (DOCARGS_4, UNDOCARGS_4): Likewise.
46         (DOCARGS_5, UNDOCARGS_5): Likewise.
47         (DOCARGS_6, UNDOCARGS_6): Likewise.
49 2013-11-26  Ondřej Bílka  <neleai@seznam.cz>
51         * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
52         * sysdeps/x86_64/tls.h: Likewise.
54 2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>
56         [BZ #11214]
57         * Makefile (tst-getpid2-ENV): New variable.
59 2013-11-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
61         * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
63 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
65         * sysdeps/pthread/configure.in: Moved to ...
66         * sysdeps/pthread/configure.ac: ... here.
67         * sysdeps/x86_64/configure.in: Moved to ...
68         * sysdeps/x86_64/configure.ac: ... here.
69         * sysdeps/pthread/configure: Regenerated.
70         * sysdeps/x86_64/configure: Likewise.
72 2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
74         * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
75         from pthread_mutex_init.
77 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
79         [BZ #15988]
80         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
81         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
82         USE_REQUEUE_PI.
83         * pthread_cond_signal.c (__pthread_cond_signal)
84         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
86 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
88         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
89         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
90         member of the argument.
91         (__libc_lock_trylock_recursive): Likewise.
92         (__libc_lock_unlock_recursive): Likewise.
94 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
96         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
97         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
98         [SHARED && !NO_HIDDEN].
100 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
102         [BZ #15921]
103         * tst-cleanup2.c (do_test): New volatile variable RET to
104         return success.
106 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
108         * sysdeps/pthread/pthread.h: Fix typos.
109         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
110         * tst-cancel4.c: Likewise.
112 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
114         * pthread_getschedparam.c: Fix typos.
115         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
117 2013-07-23  David S. Miller  <davem@davemloft.net>
119         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
121 2013-07-22  David S. Miller  <davem@davemloft.net>
123         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
125 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
127         * pthread_mutex_lock.c: Fix whitespace.
128         * pthread_mutex_trylock.c: Likewise.
129         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
130         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
131         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
132         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
133         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
134         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
135         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
136         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
137         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
138         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
139         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
140         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
142         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
143         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
144         (elision_init): Don't set __rwlock_rtm_enabled.
145         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
146         Remove __rwlock_rtm_enabled.
148 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
150         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
151         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
153 2013-07-02  Andi Kleen <ak@linux.intel.com>
155         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
156           Check ENABLE_LOCK_ELISION.
158 2013-07-02  Andi Kleen  <ak@linux.intel.com>
160         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
161           Disable elision for PTHREAD_MUTEX_DEFAULT.
163 2013-07-02  Andi Kleen  <ak@linux.intel.com>
164             Hongjiu Lu  <hongjiu.lu@intel.com>
166         * pthread_mutex_lock.c
167         (__pthread_mutex_lock): Add lock elision support.
168         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
169         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
170         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
171         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
172         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
173         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
174         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
175         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
176         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
177         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
178         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
179         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
181 2013-07-02  Andi Kleen  <ak@linux.intel.com>
183         * tst-mutex5.c: Include config.h.
184           (do_test): Add checks for ENABLE_LOCK_ELISION.
185         * tst-mutex8.c: Include config.h
186           (tf): Add checks for ENABLE_LOCK_ELISION.
187           (check_type): Likewise.
189 2013-07-02  Andi Kleen  <ak@linux.intel.com>
191         * pthreadP.h: Add elision types.
192           (PTHREAD_MUTEX_TYPE_ELISION): Add.
193         * sysdeps/pthread/pthread.h: Add elision initializers.
194           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
195            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
196           (__PTHREAD_SPINS): Add.
198 2013-07-02  Andi Kleen  <ak@linux.intel.com>
199             Hongjiu Lu  <hongjiu.lu@intel.com>
201         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
202           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
203           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
204           lll_trylock_elision): Add.
205         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
206         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
207         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
208         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
209         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
210         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
211         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
212         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
213           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
214           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
215           lll_trylock_elision): Add.
216         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
217         * elision-conf.h: New file.
219 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
221         [BZ #12310]
222         * pthread_exit.c: Add reference to pthread_create.
224 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
226         * pthread_getattr_default_np.c: Include <string.h>.
228 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
230         * Versions (libpthread): Add GLIBC_2.18.
231         (GLIBC_2.18): Add pthread_setattr_default_np and
232         pthread_getattr_default_np.
233         * allocatestack.c (allocate_stack): Synchronize read from
234         __default_pthread_attr.
235         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
236         * nptl-init.c (__pthread_initialize_minimal_internal):
237         Synchronize write to __default_pthread_attr.
238         * pthreadP.h (__default_pthread_attr_lock): Declare.
239         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
240         Synchronize read from __default_pthread_attr.
241         * pthread_create.c (__pthread_create_2_1): Make a local copy of
242         __default_pthread_attr.  Check value of flags in IATTR even if
243         input ATTR is NULL.
244         * pthread_getattr_default_np.c: New file.
245         * pthread_setattr_default_np.c: New file.
246         * sysdeps/pthread/pthread.h [__USE_GNU]
247         (pthread_getattr_default_np, pthread_setattr_default_np):
248         Declare.
249         * tst-default-attr.c: New test case.
250         * Makefile (libpthread-routines): Add
251         pthread_setattr_default_np and pthread_getattr_default_np.
252         (tests): Add tst-default-attr.
253         * vars.c (__default_pthread_attr_lock): Declare and initialize.
255 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
256             Carlos O'Donell  <carlos@redhat.com>
258         [BZ #15618]
259         * tst-pthread-attr-affinity: New test case.
260         * Makefile (tests): Add it.
261         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
262         (__pthread_attr_getaffinity_new): Copy minimum of source and
263         destination sizes to avoid a buffer overrun.
265 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
267         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
268         (lll_futex_wake): Return syscall error.
269         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
270         (lll_futex_wake): Return syscall error.
272 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
274         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
276 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
278         * tst-cond22.c: Fix leading whitespaces.
279         * tst-umask1.c: Likewise.
281 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
283         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
284         trailing whitespace.
285         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
286         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
287         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
288         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
289         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
290         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
291         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
292         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
293         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
294         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
295         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
296         * tst-mutexpp10.c: Likewise.
297         * tst-stackguard1.c: Likewise.
299 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
301         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
302         and ld.so.
304 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
306         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
307         uint32_t usage.
308         * sysdeps/pthread/createthread.c: Likewise.
310 2013-05-14  Andreas Jaeger  <aj@suse.de>
312         [BZ #10686]
313         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
314         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
316 2013-05-09  Andi Kleen  <ak@linux.intel.com>
318         * tst-mutex8.c (do_test): Check for ENABLE_PI.
320 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
322         * pthreadP.h (check_sched_policy_attr): New inline function.
323         (check_sched_priority_attr): Likewise.
324         (check_stacksize_attr): Likewise.
325         (__kernel_cpumask_size, __determine_cpumask_size): Declare
326         extern.
327         (check_cpuset_attr): New inline function.
328         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
329         Use check_sched_priority_attr.
330         * pthread_attr_setschedpolicy.c
331         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
332         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
333         check_stacksize_attr.
334         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
335         Likewise.
336         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
337         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
339 2013-04-11  Andreas Schwab  <schwab@suse.de>
341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
342         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
343         directly use absolute timeout.
345 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
347         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
349 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
351         [BZ #15337]
352         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
353         [IS_IN_libpthread]
354         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
355         __pthread_unwind hidden.
357 2013-03-28  Roland McGrath  <roland@hack.frob.com>
359         * pthread_create.c (start_thread) [!SHARED]:
360         Call __call_tls_dtors only if it's not NULL.
362 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
364         * allocatestack.c (allocate_stack): Use __default_pthread_attr
365         instead of __default_stacksize.
366         * nptl-init.c (__pthread_initialize_minimal_internal):
367         Likewise.  Initialize guardsize.
368         * pthreadP.h (__default_pthread_attr): Declare.
369         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
370         Use __default_pthread_attr instead of __default_stacksize.
371         * pthread_create.c (default_attr): Remove.
372         (__pthread_create_2_1): Use __default_pthread_attr instead of
373         default_attr.
374         * vars.c (__default_stacksize): Remove.
375         (__default_pthread_attr): New static variable to store
376         default thread attributes.
378 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
380         * pthread_barrier_init.c (default_attr): Rename to
381         default_barrierattr.
382         (pthread_barrier_init): Adjust for the rename.
383         * pthread_mutex_init.c (default_attr): Rename to
384         default_mutexattr.
385         (__pthread_mutex_init): Adjust for the rename.
386         * pthread_rwlock_init.c (default_attr): Rebane to
387         default_rwlockattr.
388         (__pthread_rwlock_init): Adjust for the rename.
390 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
392         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
394 2013-03-04  Roland McGrath  <roland@hack.frob.com>
396         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
397         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
398         Use #include_next.
399         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
400         (RTLD_PRIVATE_ERRNO): Likewise.
401         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
402         Move macros and associated declaration to ...
403         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
404         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
405         Use #include_next.
407 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
409         * Makefile (tests): Revert last change.
410         (tst-pthread-stack-env-ENV): Likewise.
411         * nptl-init.c (set_default_stacksize): Likewise.
412         (__pthread_initialize_minimal_internal): Likewise.
413         * tst-pthread-stack-env.c: Likewise.
415 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
417         * tst-oddstacklimit.c: Include stdlib.h.
419         * Makefile (tests): Add tst-pthread-stack-env.
420         (tst-pthread-stack-env-ENV): Set environment for test.
421         * nptl-init.c (set_default_stacksize): New function.
422         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
423         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
424         * tst-pthread-stack-env.c: New test case.
426 2013-02-21  David S. Miller  <davem@davemloft.net>
428         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
429         (FUTEX_WAIT_REQUEUE_PI): Define.
430         (FUTEX_CMP_REQUEUE_PI): Likewise.
431         (lll_futex_wait_requeue_pi): Likewise.
432         (lll_futex_timed_wait_requeue_pi): Likewise.
433         (lll_futex_cmp_requeue_pi): Likewise.
435 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
437         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
439 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
441         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
442         of exit.
443         * tst-barrier4.c: Likewise.
444         * tst-robust7.c: Likewise.
446         [BZ #14920]
447         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
448         PI-aware.
449         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
450         PI-aware futex operations if available and mutex is PI-aware.
451         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
452         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
453         Likewise.
454         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
455         cancellation occurred just after futex returned successfully
456         from a PI operation with the mutex held.
457         (__pthread_cond_wait): Use PI-aware futex operations if
458         available and mutex is PI-aware.
459         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
460         (FUTEX_WAIT_REQUEUE_PI): Define.
461         (FUTEX_CMP_REQUEUE_PI): Likewise.
462         (lll_futex_wait_requeue_pi): Likewise.
463         (lll_futex_timed_wait_requeue_pi): Likewise.
464         (lll_futex_cmp_requeue_pi): Likewise.
465         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
466         (FUTEX_WAIT_REQUEUE_PI): Define.
467         (FUTEX_CMP_REQUEUE_PI): Likewise.
468         (lll_futex_wait_requeue_pi): Likewise.
469         (lll_futex_timed_wait_requeue_pi): Likewise.
470         (lll_futex_cmp_requeue_pi): Likewise.
471         * sysdeps/unix/sysv/linux/kernel-features.h: Define
472         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
474 2013-02-04  Andreas Schwab  <schwab@suse.de>
476         [BZ #14142]
477         * tst-cancel14.c: Include <sys/time.h>.
478         * tst-cancel15.c: Likewise.
479         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
480         * tst-stackguard1.c: Include <tls.h>
482 2013-01-16  Andreas Schwab  <schwab@suse.de>
484         [BZ #14327]
485         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
487 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
489         * allocatestack.c (allocate_stack): Add comment. Remove assert
490         on attr.
492 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
494         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
495         with $(host-test-program-cmd).
496         (tst-exec4-ARGS): Likewise.
497         (tst-stackguard1-ARGS): Likewise.
498         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
499         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
500         * tst-tls6.sh (elf_objpfx): Removed.
501         (rtld_installed_name): Renamed to ...
502         (test_via_rtld_prefix): This.
503         (tst_tls5): Prepend ${test_via_rtld_prefix}.
505 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
507         * All files with FSF copyright notices: Update copyright dates
508         using scripts/update-copyrights.
510 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
512         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
513         copyright notice.
515 2012-12-28  Andi Kleen  <ak@linux.intel.com>
517         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
518         to prototype.
519         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
520         Likewise.
522 2012-12-27  David S. Miller  <davem@davemloft.net>
524         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
525         (lll_futex_timed_wait_bitset): New macro.
527 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
529         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
530         Remove definition.
531         (lll_futex_timed_wait): Replace assembly code with
532         INTERNAL_SYSCALL.
533         (lll_futex_timed_wait_bitset): Likewise.
534         (lll_futex_wake): Likewise.
535         (lll_futex_requeue): Likewise.
536         (lll_futex_wake_unlock): Likewise.
538 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
540         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
541         Declare LOCAL_VAR as char.
543 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
545         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
546         Cast result of atomic_increment_val to (void) instead of storing
547         in otherwise-unused variable.
549 2012-12-03  Allan McRae  <allan@archlinux.org>
551         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
553 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
555         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
556         to THREAD_SETMEM.
557         * sysdeps/i386/tls.h: Include <libc-internal.h>.
558         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
559         (THREAD_SETMEM_NC): Likewise.
560         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
561         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
562         (THREAD_SETMEM_NC): Likewise.
564 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
566         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
567         of atomic_increment_val to (void) instead of storing in
568         otherwise-unused variable.
570         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
571         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
572         instead of storing in otherwise-unused variable.
574 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
576         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
577           (CFLAGS-recv.c, CFLAGS-send.c): Define.
579 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
581         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
582         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
584 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
586         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
587         if absolute timeout is negative.
588         [__ASSUME_FUTEX_CLOCK_REALTIME &&
589         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
590         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
591         Likewise.
592         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
593         Likewise.
594         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
595         (__lll_robust_timedlock_wait): Likewise.
596         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
597         (lll_futex_timed_wait_bitset): New macro.
598         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
599         (lll_futex_timed_wait_bitset): Likewise.
601 2012-11-03  David S. Miller  <davem@davemloft.net>
603         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
604         Add missing spaces.
605         (__cpu_relax): Likewise.
607 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
609         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
610         (__128bits): New struct typedef.
611         (tcbhead_t): Replace __m128 with __128bits.
613 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
614             Joseph Myers  <joseph@codesourcery.com>
616         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
618 2012-10-28  David S. Miller  <davem@davemloft.net>
620         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
621         Define when we have v9 instructions available.
622         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
623         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
624         file.
625         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
626         file.
627         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
628         to libpthread-routines.
630 2012-10-25  Roland McGrath  <roland@hack.frob.com>
632         * tst-cond-except.c (TEST_FUNCTION): New macro.
634 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
636         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
637         run tst-tls6.sh.
638         * tst-tls6.sh: Use /bin/bash not /bin/sh.
640 2012-10-25  Roland McGrath  <roland@hack.frob.com>
642         * tst-basic2.c (do_test): Return RESULT, not always zero.
644         * tst-cond25.c: Include <stdint.h>
645         (waiter): Add casts to uintptr_t between casting integer<->pointer.
646         (timed_waiter): Likewise.
647         (do_test_wait): Likewise.
648         * tst-cond-except.c (thr): Likewise.
649         (do_test): Use prototype definition.
651 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
652             Jim Blandy  <jimb@codesourcery.com>
654         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
655         tst-tls6.sh.
656         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
657         programs with LD_PRELOAD set.
659 2012-10-24  Roland McGrath  <roland@hack.frob.com>
661         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
662         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
663         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
664         ($(objpfx)tst-rwlock14): Likewise.
666 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
668         * Makefile (tests): Remove tst-oddstacklimit.
669         (test-srcs): New variable.
670         (tst-oddstacklimit-ENV): Remove.
671         [$(run-built-tests) = yes] (tests): Depend on
672         $(objpfx)tst-oddstacklimit.out.
673         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
674         target.
675         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
676         setrlimit before executing tst-basic1 test passed to --command.
678 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
680         * Makefile [$(cross-compiling) = no]: Change condition to
681         [$(run-built-tests) = yes].
683 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
684             Joseph Myers  <joseph@codesourcery.com>
686         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
687         (tst-exec4-ARGS): Likewise.
688         (tst-stackguard1-ARGS): Likewise.
690 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
691             Joseph Myers  <joseph@codesourcery.com>
693         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
694         tst-cancel-wrappers.sh.
695         * tst-cancel-wrappers.sh: Use nm program given as first argument,
696         not hardcoded "nm".
698 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
700         * tst-cond25.c (do_test_wait): Don't check for return value from
701         pthread_cancel.
703 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
705         [BZ #14652]
706         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
707         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
708         was locked by FUTEX_WAIT_REQUEUE_PI.
709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
710         (__condvar_w_cleanup): Likewise.
711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
712         (__condvar_cleanup2): Likewise.
713         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
714         (__condvar_cleanup1): Likewise.
716 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
718         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
719         defined __EXCEPTIONS) && defined __USE_GNU]
720         (pthread_cleanup_push_defer_np): Fix formatting.
722 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
724         [BZ #14652]
725         * Makefile (tests): New test case tst-cond25.
726         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
728         (__condvar_tw_cleanup): Lock mutex only if we don't already
729         own it.
730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
731         (__condvar_w_cleanup): Likewise.
732         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
734         (__condvar_cleanup2): Lock mutex only if we don't already
735         own it.
736         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
737         (__condvar_cleanup1): Likewise.
738         * tst-cond25.c: New test case.
740 2012-10-09  Roland McGrath  <roland@hack.frob.com>
742         * sysdeps/pthread/configure: Regenerated.
743         * sysdeps/x86_64/configure: Regenerated.
745 2012-10-05  David S. Miller  <davem@davemloft.net>
747         [BZ #14568]
748         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
749         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
750         the case of a 64-bit debugger with a 32-bit inferior.
752 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
754         [BZ #14557]
755         * Makefile (tests-static): Add tst-cancel24-static,
756         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
757         tst-sem11-static and tst-sem12-static.
758         (tests): Likewise.
759         (LDLIBS-tst-cancel24-static): New macro.
760         * tst-cancel24-static.cc: New file.
761         * tst-cond8-static.c: Likewise.
762         * tst-mutex8-static.c: Likewise.
763         * tst-mutexpi8-static.c: Likewise.
764         * tst-sem11-static.c: Likewise.
765         * tst-sem12-static.c: Likewise.
767 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
769         [BZ #14417]
770         * Makefile (tests): New test case tst-cond24.
771         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
773         (__pthread_cond_timedwait): Unlock mutex before going back to
774         wait in PI case.
775         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
776         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
777         return from futex_wait.
778         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
779         (__pthread_cond_timedwait): Unlock mutex before going back to
780         wait in PI case.  Set requeue_pi flag only if wait returned 0.
781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
782         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
783         return from futex_wait.
784         * tst-cond24.c: New test case.
786 2012-10-04  Roland McGrath  <roland@hack.frob.com>
788         * pthread_create.c (start_thread): Use __madvise, not madvise.
790 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
792         * sysdeps/i386/tls.h: Update copyright years.
794 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
796         * pthread_create.c (start_thread): Fix clone flag name in
797         comment to CLONE_CHILD_CLEARTID.
798         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
799         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
800         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
801         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
802         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
803         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
805 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
807         [BZ #14477]
808         * Makefile (tests): Add tst-cond-except.
809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
810         (__pthread_cond_timedwait): Mark instructions where %ebx is
811         incremented in PI case.
812         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
813         for the marked PI case instructions.
814         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
815         (__pthread_cond_wait): Mark instructions where %ebx is
816         incremented in PI case.
817         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
818         for the marked PI case instructions.
819         * tst-cond-except.c: New test case.
821 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
823         * tst-tls6.sh: Add "set -e".
824         * Makefile: Do not specify -e option when running testsuite
825         shell scripts.
827         * tst-tls6.sh: Add copyright header.
829 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
831         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
832         to uint64_t for 64-bit store.
833         (THREAD_SETMEM_NC): Likewise.
835 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
837         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
838         64-bit store.
839         (THREAD_SETMEM_NC): Likewise.
841 2012-09-14  Jeff Law  <law@redhat.com>
843         [BZ #14583]
844         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
846 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
848         [BZ #14576]
849         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
850         Removed.
852 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
854         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
855         (LDLIBS-tst-cancel24): This.
857 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
859         [BZ #14545]
860         * Makefile (tests-static): Add tst-cancel21-static.
861         (tests): Likewise.
862         * tst-cancel21-static.c: New file.
864 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
866         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
867         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
868         [__NR_clock_getres]: Make code unconditional.
869         (pthread_getcpuclockid): Remove code left unreachable by removal
870         of conditionals.
872 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
874         [BZ #14532]
875         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
876         atomic_compare_and_exchange_bool_rel.
877         * tst-sem14.c: New file.
878         * Makefile (tests): Add tst-sem14.
880 2012-08-15  Roland McGrath  <roland@hack.frob.com>
882         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
883         of -D_IO_MTSAFE_IO.
884         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
885         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
887 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
889         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
890         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
891         * pthread_condattr_setclock.c (pthread_condattr_setclock)
892         [!__ASSUME_POSIX_TIMERS]: Likewise.
893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
894         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
895         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
896         [!__ASSUME_POSIX_TIMERS]: Likewise.
897         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
898         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
899         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
900         code unconditional.
901         [!__NR-timer_create]: Remove conditional code.
902         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
903         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
904         code unconditional.
905         [!__NR_timer_delete]: Remove conditional code.
906         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
907         * sysdeps/unix/sysv/linux/timer_getoverr.c
908         [__NR_timer_getoverrun]: Make code unconditional.
909         [!__NR_timer_getoverrun]: Remove conditional code.
910         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
911         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
912         Make code unconditional.
913         [!__NR_timer_gettime]: Remove conditional code.
914         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
915         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
916         Make code unconditional.
917         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
918         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
919         Make code unconditional.
920         [!__NR_timer_settime]: Remove conditional code.
921         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
923         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
924         conditional code.
926 2012-08-15  Tom de Vries  <vries@codesourcery.com>
927             Maxim Kuvyrkov  <maxim@codesourcery.com>
929         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
930         (__libc_lock_trylock): Allow pre-existing definitions.
932 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
934         * pthread_spin_lock.c: New file.
935         * pthread_spin_trylock.c: New file.
937 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
939         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
940         code unconditional.
941         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
942         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
943         unconditional.
944         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
945         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
946         Make code unconditional.
947         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
948         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
949         __NR_tgkill]: Make code unconditional.
950         (raise) [__ASSUME_TGKILL]: Likewise.
951         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
952         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
953         [__ASSUME_TGKILL]: Make code unconditional.
954         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
955         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
956         __NR_tgkill]: Make code unconditional.
957         (raise) [__ASSUME_TGKILL]: Likewise.
958         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
960 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
962         * sysdeps/pthread/createthread.c (create_thread)
963         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
965 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
967         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
968         code unconditional.
969         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
971 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
973         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
974         (pagesize): New static variable.
975         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
976         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
977         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
978         halfway up the stack top page.  Verify that the top page was
979         written into.
980         (do_test): Get pagesize using sysconf.
982 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
984         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
985         label.
986         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
987         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
988         Likewise.
990 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
992         * tst-pthread-getattr.c: Revert last change.
994 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
996         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
997         size.
998         (_MIN): New macro.
999         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
1000         of MEM to test.
1001         (check_stack_top): Read valued written into STACKADDR in
1002         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
1004 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
1006         * nptl-init.c (sighandler_setxid): Fix the comment that
1007         describes it.
1009 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
1011         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1012         (__lll_robust_timedlock_wait): Simplify CFI directives.
1014 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
1016         [BZ #12416]
1017         * Makefile (tests): Add test case.
1018         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1019         the __libc_stack_end page from stacksize.  Truncate stacksize to
1020         make it page aligned when it is computed from RLIMIT_STACK.
1021         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1022         accessible.
1024 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
1026         [BZ #14205]
1027         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1028         branches.
1030 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
1031             Jakub Jelinek  <jakub@redhat.com>
1033         [BZ #14188]
1034         * sysdeps/pthread/pthread.h
1035         [!(defined __GNUC__ && defined __EXCEPTIONS)]
1036         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1037         __libc_unlikely instead of __builtin_expect.
1039 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
1041         [BZ #14117]
1042         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1043         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1044         * sysdeps/unix/sysv/linux/i386/Implies: New file.
1045         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1046         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1047         to ...
1048         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1049         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1050         to ...
1051         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1053 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
1055         [BZ #14132]
1056         * nptl-init.c (pthread_functions): Remove use of INTUSE and
1057         _internal aliases.
1058         (__pthread_initialize_minimal_internal): Likewise.
1059         * sem_open.c: Likewise.
1060         * sem_unlink.c: Likewise.
1061         * pthreadP.h: Replace _internal aliases by hidden_proto
1062         declarations.
1063         * pthread_getspecific.c: Replace _internal alias by hidden_def.
1064         * pthread_key_create.c: Likewise.
1065         * pthread_mutex_destroy.c: Likewise.
1066         * pthread_mutex_init.c: Likewise.
1067         * pthread_mutex_lock.c: Likewise.
1068         * pthread_mutex_unlock.c: Likewise.
1069         * pthread_once.c: Likewise.
1070         * pthread_rwlock_rdlock.c: Likewise.
1071         * pthread_rwlock_unlock.c: Likewise.
1072         * pthread_rwlock_wrlock.c: Likewise.
1073         * pthread_setspecific.c: Likewise.
1074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1075         Likewise.
1076         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1077         Likewise.
1078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1079         Likewise.
1080         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1081         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1082         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1083         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1084         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1085         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1086         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1087         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1088         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1089         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1090         Likewise.
1091         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1092         Likewise.
1093         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1094         Likewise.
1096 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1098         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1099         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1101         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1102         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1103         directives.
1104         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1105         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1106         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1107         (pthread_barrier_wait): Likewise.
1108         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1109         (__pthread_cond_broadcast): Likewise.
1110         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1111         (__pthread_cond_signal): Likewise.
1112         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1113         (__pthread_cond_timedwait): Likewise.
1114         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1115         Likewise.
1116         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1117         (__pthread_rwlock_rdlock): Likewise.
1118         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1119         (pthread_rwlock_timedrdlock): Likewise.
1120         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1121         (pthread_rwlock_timedwrlock): Likewise.
1122         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1123         (__pthread_rwlock_unlock): Likewise.
1124         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1125         (__pthread_rwlock_wrlock): Likewise.
1126         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1127         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1128         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1129         Likewise.
1130         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1132 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1134         [BZ #12416]
1135         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1136         __libc_stack_end rounded to the end of containing page as the
1137         real stack end.
1139 2012-05-25  Rayson Ho  <rho@redhat.com>
1141         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1142         probes for i386.
1143         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1144         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1148         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1150         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1152 2012-05-25  Rayson Ho  <rho@redhat.com>
1153             Roland McGrath  <roland@hack.frob.com>
1155         * DESIGN-systemtap-probes.txt: New file.
1156         * pthread_cond_broadcast.c: SystemTap probes.
1157         * pthread_cond_init.c: Likewise.
1158         * pthread_cond_signal.c: Likewise.
1159         * pthread_cond_wait.c: Likewise.
1160         * pthread_cond_destroy.c: Likewise.
1161         * pthread_create.c: Likewise.
1162         * pthread_join.c: Likewise.
1163         * pthread_mutex_destroy.c: Likewise.
1164         * pthread_mutex_init.c: Likewise.
1165         * pthread_mutex_lock.c: Likewise.
1166         * pthread_mutex_timedlock.c: Likewise.
1167         * pthread_mutex_unlock.c: Likewise.
1168         * pthread_rwlock_destroy.c: Likewise.
1169         * pthread_rwlock_rdlock.c: Likewise.
1170         * pthread_rwlock_unlock.c: Likewise.
1171         * pthread_rwlock_wrlock.c: Likewise.
1172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1173         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1174         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1175         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1179         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1181 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1183         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1185 2012-05-17  Andreas Jaeger  <aj@suse.de>
1187         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1188         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1189         only for older kernels.
1191 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1193         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1194         not define.
1196 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1199         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1200         (lll_robust_lock): Likewise.
1201         (lll_cond_lock): Likewise.
1202         (lll_robust_cond_lock): Likewise.
1203         (lll_timedlock): Likewise.
1204         (lll_robust_timedlock): Likewise.
1205         (lll_unlock): Likewise.
1206         (lll_robust_unlock): Likewise.
1208 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1211         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1213 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1215         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1216         on NWAITERS.
1217         (__gcc_personality_v0): Replace 8-byte data alignment with
1218         LP_SIZE alignment and .quad with ASM_ADDR.
1220 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1222         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1223         on NWAITERS.
1224         (__gcc_personality_v0): Replace 8-byte data alignment with
1225         LP_SIZE alignment and .quad with ASM_ADDR.
1227 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1229         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1230         NWAITERS, which is unsigned long int.
1232 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1234         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1235         (__gcc_personality_v0): Replace 8-byte data alignment with
1236         LP_SIZE alignment and .quad with ASM_ADDR.
1238 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1240         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1241         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1242         __vdso_clock_gettime pointer into RAX_LP.
1243         (__gcc_personality_v0): Replace 8-byte data alignment with
1244         LP_SIZE alignment and .quad with ASM_ADDR.
1246 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1249         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1250         __vdso_clock_gettime pointer into RAX_LP.
1251         (__gcc_personality_v0): Replace 8-byte data alignment with
1252         LP_SIZE alignment and .quad with ASM_ADDR.
1254 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1257         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1259 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1261         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1262         to update pointer in memory.  Load pointer into RDI_LP.
1264 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1266         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1267         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1268         of 8.
1269         (LLL_STUB_UNWIND_INFO_END): Likewise.
1270         (lll_timedlock): Load timeout pointer into RDX_LP.
1271         (lll_robust_timedlock): Likewise.
1273 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1274             Jakub Jelinek  <jakub@redhat.com>
1276         [BZ #13613]
1277         * Makefile (tests): Add test cases.
1278         * descr.h (struct pthread): Add a comment describing multiple_threads.
1279         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1280         single-process case.
1281         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1282         before setting cancelstate of the thread.
1283         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1284         (__libc_multiple_threads): Add explanatory comment.
1285         * tst-cancel-self-cancelstate.c: New test case.
1286         * tst-cancel-self-canceltype.c: Likewise.
1287         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1288         * tst-cancel-self-testcancel.c: New test case.
1289         * tst-cancel-self.c: Likewise.
1290         * vars.c: Expand comment to include single-process case.
1292 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1294         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1295         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1296         to 32 bytes.
1298 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1300         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1301         New.
1302         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1303         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1305 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1307         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1308         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1309         * sysdeps/x86_64/x32/shlib-versions: New file.
1311 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1313         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1314         __SIZEOF_PTHREAD_XXX_T.
1315         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1316         (pthread_mutex_t): Likewise.
1317         (pthread_rwlock_t): Likewise.
1318         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1319         is defined.
1321 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1323         * sysdeps/x86_64/x32/tls.h: New file.
1325 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1327         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1328         integer.
1329         (THREAD_SETMEM_NC): Likewise.
1331 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1333         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1334         mov/%0.
1336 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1338         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1339         (__cleanup_fct_attribute): Check __x86_64__ instead of
1340         __WORDSIZE.
1342 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1344         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1345         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1346         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1347         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1348         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1350 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1352         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1353         instead of __WORDSIZE.
1355 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1357         [BZ #3748]
1358         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1360 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1362         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1363         (__pthread_cond_timedwait): Use CFI directives.
1364         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1365         (__pthread_cond_wait): Likewise.
1366         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1367         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1369 2012-05-03  David S. Miller  <davem@davemloft.net>
1371         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1372         always have to return 0, especially for the pthread_spin_init
1373         alias.
1374         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1375         newline.
1376         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1377         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1379 2012-05-02  David S. Miller  <davem@davemloft.net>
1381         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1382         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1383         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1384         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1385         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1386         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1387         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1388         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1389         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1390         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1391         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1392         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1393         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1394         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1395         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1396         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1397         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1398         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1400 2012-05-02  Allan McRae  <allan@archlinux.org>
1402         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1403         (LDFLAGS-tst-cancel24): Likewise.
1405 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1407         * sysdeps/i386/pthread_spin_lock.S: New.
1408         * sysdeps/i386/pthread_spin_lock.c: Delete.
1409         * sysdeps/x86_64/pthread_spin_lock.S: New.
1410         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1412 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1414         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1415         run when cross-compiling.
1417 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1419         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1420         instead of libgcc_s.h.
1422 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1424         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1426 2012-03-27  David S. Miller  <davem@davemloft.net>
1428         * tst-cond16.c (do_test): Use a thread stack size which is either
1429         PTHREAD_STACK_MIN or the page size, whichever is larger.
1430         * tst-cond18.c (do_test): Likewise.
1432 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1434         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1435         register char * __asm__("rsp") to get stack frame.
1437 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1439         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1440         __NR_futex directly.
1442 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1444         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1445         _Unwind_Ptr first.
1447 2012-03-16  David S. Miller  <davem@davemloft.net>
1449         [BZ #13844]
1450         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1451         instead of "...".
1452         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1453         Delete, not needed.
1455 2012-03-15  David S. Miller  <davem@davemloft.net>
1457         [BZ #13844]
1458         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1460 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1462         [BZ #13673]
1463         * pt-crti.S: Replace FSF snail mail address with URL.
1465 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1467         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1468         Do not define before including <time.h>.
1470 2012-03-08  David S. Miller  <davem@davemloft.net>
1472         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1474 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1476         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1477         Check for timestamp before the Epoch.
1479         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1480         updating nwaiters.
1482         * tst-sem13.c (do_test): Add another test case.
1483         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1484         Fix updating nwaiters.
1486 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1488         [BZ #10545]
1489         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1490         link test to a compile test.
1491         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1492         <stdio.h>.
1493         * sysdeps/pthread/configure: Regenerated.
1495 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1497         * Makefile (distribute): Remove variable.
1499 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1501         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1502         superfluous assignment.
1503         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1504         Likewise.
1505         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1506         (sem_timedwait): Likewise.
1508 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1510         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1511         installed headers to...
1512         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1514 2012-03-06  David S. Miller  <davem@davemloft.net>
1516         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1517         atomic_increment and remove unused local variable.
1518         (__old_sem_post): Likewise.
1520 2012-02-27  David S. Miller  <davem@davemloft.net>
1522         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1523         non-existing __pthread_attr.
1524         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1525         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1526         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1527         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1528         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1530 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1532         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1534         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1535         <time.h>.
1536         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1537         union.
1538         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1539         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1540         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1541         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1542         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1544 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1546         [BZ #13695]
1547         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1548         pt-initfini.s.
1549         [crti.S not in sysdirs] (omit-deps): Do not append.
1550         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1551         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1552         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1553         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1554         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1555         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1556         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1557         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1558         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1559         unconditionally.
1560         * sysdeps/pthread/pt-initfini.c: Remove file.
1562 2012-02-16  Richard Henderson  <rth@twiddle.net>
1564         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1565         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1567 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1569         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1571 2012-02-16  David S. Miller  <davem@davemloft.net>
1573         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1575 2012-02-15  Marek Polacek  <polacek@redhat.com>
1577         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1579 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1581         Replace FSF snail mail address with URLs, as per GNU coding standards.
1583 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1585         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1587 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1589         Support crti.S and crtn.S provided directly by architectures.
1590         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1591         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1592         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1593         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1594         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1595         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1596         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1597         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1598         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1599         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1600         * pt-crti.S: New file.
1601         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1603 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1606         macros for PIC register setup.
1607         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1608         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1609         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1610         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1611         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1613 2012-01-11  Marek Polacek  <polacek@redhat.com>
1615         * forward.c (FORWARD_NORETURN): Define macro.
1616         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1617         (__pthread_exit): Likewise.
1619 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1621         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1623         * pthreadP.h: Add noreturn to __pthread_exit.
1624         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1626 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1628         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1629         Call pthread_attr_setstacksize() with result of
1630         __pthread_get_minstack() to account for application TLS usage.
1632 2012-01-08  Marek Polacek  <polacek@redhat.com>
1634         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1636 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1638         [BZ #13553]
1639         * pthreadP.h: Use const instead of __const.
1640         * semaphore.h: Likewise.
1641         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1642         * sysdeps/pthread/bits/sigthread.h: Likewise.
1643         * sysdeps/pthread/pthread.h: Likewise.
1645         * Makefile: Remove elf=yes test, only ELF is supported.
1647         * shlib-versions: Remove entries for ports architectures.
1649         In case anyone cares, the IA-64 architecture could move to ports.
1650         * sysdeps/ia64/*: Removed.
1651         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1653 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1655         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1656         __pthread_get_minstack.
1657         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1659         [BZ #13088]
1660         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1661         through __pthread_get_minstack.
1662         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1663         directly from _rtld_global_ro.
1664         (__pthread_get_minstack): New function.
1665         * pthreadP.h: Declare __pthread_get_minstack.
1666         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1668 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1670         [BZ #13515]
1671         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1672         Correct reading name from file.
1674 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1676         * allocatestack.c (allocate_stack): Return errno on failure.
1678 2011-12-14  Jeff Law  <law@redhat.com>
1680         [BZ #5245]
1681         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1683 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1685         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1686         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1687         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1689 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1691         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1692         /proc/self/maps.
1694 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1696         [BZ #13358]
1697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1698         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1699         path for kernels with FUTEX_CLOCK_REALTIME.
1700         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1702 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1704         [BZ #13344]
1705         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1706         for memory synchronization functions.
1707         * semaphore.h: Likewise.
1709 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1711         * tst-cancel7.c: Avoid warning.
1712         * tst-mutex6.c: Likewise.
1713         * tst-mutex9.c: Likewise.
1714         * tst-mutexpi6.c: Likewise.
1716 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1718         * sysdeps/i386/tls.h: Remove #include <list.h>.
1720 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1722         * pthread_create.c (start_thread): Call __ctype_init.
1724 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1726         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1727         defined.
1728         (list_add): Add atomic_write_barrier.
1729         * descr.h: Define __need_list_t before including <list.h>.
1730         * nptl-init.c: Include <list.h>
1731         * allocatestack.c: Likewise.
1733 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1735         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1736         * sysdeps/ia64/tls.h: Likewise.
1737         * sysdeps/powerpc/tls.h: Likewise.
1738         * sysdeps/s390/tls.h: Likewise.
1739         * sysdeps/sh/tls.h: Likewise.
1740         * sysdeps/sparc/tls.h: Likewise.
1741         * sysdeps/x86_64/tls.h: Likewise.
1743 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1745         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1747         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1748         !USE___THREAD.
1749         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1750         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1751         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1752         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1753         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1754         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1755         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1756         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1757         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1758         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1759         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1760         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1762         * tst-tls1.c: Support for __thread is now mandatory.
1763         * tst-tls2.c: Likewise.
1764         * tst-tls3.c: Likewise.
1765         * tst-tls3mod.c: Likewise.
1766         * tst-tls4.c: Likewise.
1767         * tst-tls4moda.c: Likewise.
1768         * tst-tls4modb.c: Likewise.
1769         * tst-tls5.h: Likewise.
1771 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1773         [BZ #12403]
1774         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1775         (pthread_rwlock_timedwrlock): Use correct macro in test.
1776         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1778 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1780         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1781         use gettimeofday vsyscall, just call gettimeofday.
1782         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1783         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1784         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1785         Likewise.
1786         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1787         Likewise.
1788         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1789         Simplify __vdso_clock_gettime use.
1791 2011-09-05  David S. Miller  <davem@davemloft.net>
1793         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1794         New function.
1795         (sem_timedwait): Call it to force an exception region around
1796         the async cancel enable and the futex operation.
1797         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1798         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1799         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1800         (__new_sem_wait): Call it to force an exception region around
1801         the async cancel enable and the futex operation.
1802         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1803         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1805 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1807         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1808         thread is woken up.
1810 2011-08-20  David S. Miller  <davem@davemloft.net>
1812         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1814 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1816         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1817         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1819 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1821         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1822         stack.
1823         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1826 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1828         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1829         barrier.
1830         (__gcc_personality_v0): Likewise.
1831         (_Unwind_ForcedUnwind): Likewise.
1832         (_Unwind_GetCFA): Likewise.
1834 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1836         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1837         UINTMAX_C.
1839 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1841         * nptl-init.c (__nptl_set_robust): New function.
1842         (pthread_functions): Add reference.
1843         * npthreadP.h: Declare __nptl_set_robust.
1844         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1845         ptr_set_robust member.
1846         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1847         child if threads are used.
1849 2011-06-14  Andreas Jaeger  <aj@suse.de>
1851         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1853 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1855         [BZ #386]
1856         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1858 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1860         [BZ #12650]
1861         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1862         clearing memory.
1863         Patch partly by Robert Rex <robert.rex@exasol.com>.
1865 2011-01-19  Roland McGrath  <roland@redhat.com>
1867         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1868         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1869         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1870         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1871         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1872         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1874 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1876         * Makefile (test-extras): Add tst-cleanup4aux.
1878 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1880         [BZ #10563]
1881         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1882         (__SETXID_2): Likewise.
1883         (__SETXID_3): Likewise.
1885 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1887         [BZ #10484]
1888         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1889         * alloca_cutoff.c: Add libc_hidden_def.
1891 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1893         [BZ #12113]
1894         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1895         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1896         of "struct pthread".
1898 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1900         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1901         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1902         (pthread_cleanup_push_defer_np): Likewise.
1904 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1906         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1907         small.
1909 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1910             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1912         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1913         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1915 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1917         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1919 2010-05-01  Alan Modra  <amodra@gmail.com>
1921         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1922         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1923         to save temps.  Correct cfi for possible later frame manipulation.
1924         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1925         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1926         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1927         (DOCARGS_6, UNDOCARGS_6): Likewise.
1928         (CENABLE, CDISABLE): Add nops for non-shared calls.
1930 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1932         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1933         Fix type mismatch.
1935 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1937         * tst-abstime.c (do_test): Some more cleanups
1939 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1941         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1943 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1944             Ulrich Drepper  <drepper@redhat.com>
1946         * Makefile (tests): Add tst-abstime.
1947         * tst-abstime.c: New file.
1948         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1949         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1950         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1951         (__lll_timedlock_wait): Likewise.
1952         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1953         (__lll_robust_timedlock_wait): Likewise.
1954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1955         (__pthread_cond_timedwait): Likewise.
1956         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1957         (pthread_rwlock_timedrdlock): Likewise.
1958         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1959         (pthread_rwlock_timedwrlock): Likewise.
1960         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1961         Likewise.
1963 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1965         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1967 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1969         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1970         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1972 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1974         [BZ #11390]
1975         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1976         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1977         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1978         pthread_setname.
1979         * Makefile (libpthread-routines): Add pthread_getname and
1980         pthread_setname.
1981         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1983 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1985         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1986         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1987         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1988         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1990 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1992         * pthread_cond_timedwait.c: Add check for
1993         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1994         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1995         INTERNAL_SYSCALL.
1997 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1999         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2000         and the call fails wake eventually waiting setxid threads.  Don't free
2001         stack here if we try starting a thread.
2002         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2003         if the clone call failed.
2005 2010-03-08  Andreas Schwab  <schwab@redhat.com>
2007         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2008         * allocatestack.c (get_cached_stack): Set setxid_futex.
2009         (allocate_stack): Likewise.
2011 2010-03-05  Andreas Schwab  <schwab@redhat.com>
2012             Ulrich Drepper  <drepper@redhat.com>
2014         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2015         it is creating a thread or it is just being created.
2016         * pthread_create.c (start_thread): Wake setxid thread if it is
2017         waiting.
2018         (__pthread_create_2_1): Initialize setxid_futex.
2019         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2020         is waiting.
2022 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
2024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2025         Fix unwind info.
2026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2028 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
2030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2031         Fix pthread_cond_timedwait with requeue-PI.
2032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2033         Fix pthread_cond_wait with requeue-PI.
2035 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
2037         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2038         and pthread_mutexattr_setrobust for GLIBC_2.12.
2039         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2040         * pthread_mutexattr_getrobust.c: Define alias
2041         pthread_mutexattr_getrobust.
2042         * pthread_mutexattr_setrobust.c: Define alias
2043         pthread_mutexattr_setrobust.
2045 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
2047         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
2049 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
2051         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2053 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
2055         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2056         call __gmon_start__.
2057         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2059 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
2061         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2062         using memset.
2064 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
2066         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2067         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2069         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2072         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2075 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2077         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2078         Don't update nwaiters after invalid timeout is recognized.
2080 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2082         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2083         __gmon_start__.
2085 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2087         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2088         THREAD_SELF->cancelhandling after returning from futex call.
2090 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2092         * tst-sem13.c: New file.
2093         * Makefile (tests): Add tst-sem13.
2095 2009-11-22  Roland McGrath  <roland@redhat.com>
2097         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2098         instead of recapitulating its contents.
2100 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2103         optimizations and cleanups.
2105 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2107         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2108         Remove redundant code. Fix cfi offsets.
2109         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2110         Fix cfi offsets.
2112 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2115         reduce size of unwind info.
2117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2118         cfi directives.
2119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2120         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2122 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2124         [BZ #4457]
2125         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2126         LIBGCC_S_SO.
2127         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2129 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2131         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2133         [BZ #3270]
2134         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2135         steps to avoid races with creation and terminations.
2136         * nptl-init.c (sighandler_setxid): Adjust.
2137         Patch by Daniel Jacobowitz.
2139 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2141         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2143 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2144             Joseph Myers  <joseph@codesourcery.com>
2146         [BZ #7094]
2147         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2148         Initialize the sigev_notify field for newly created timer to make sure
2149         the timer gets deleted from the active timer's list upon timer_delete.
2151 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2153         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2154         Correct a logic error.
2156 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2158         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2159         of the field in local variables.
2160         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2161         variable and don't unconditionally clear it.
2163 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2165         * pthread_create.c (start_thread): Hint to the kernel that memory for
2166         the stack can be reused.  We do not mark all the memory.  The part
2167         still in use and some reserve are kept.
2169 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2171         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2173 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2175         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2176         directives.
2178 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2181         directives.
2182         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2184 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2186         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2187         (__pthread_cond_signal): Don't clobber register used for syscall
2188         number.
2190 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2192         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2193         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2196         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2197         register.
2199 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2201         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2202         enabled by the special *_asynccancel functions.
2203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2206         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2208 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2210         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2211         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2212         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2213         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2214         since we can assume the special __*_{en,dis}able_asynccancel
2215         functions.
2216         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2217         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2218         and PTHREAD_CANCELED.
2220 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2222         * descr.h: Better definition of *_BITMASK macros for cancellation.
2224 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2226         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2228         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2229         dynamic linker might have to save.
2230         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2231         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2232         printing.
2234         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2236 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2238         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2239         New function.
2240         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2241         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2243         requeue_pi for robust mutexes.
2244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2246         Don't only skip __pthread_mutex_cond_lock.  Call instead
2247         __pthread_mutex_cond_lock_adjust.
2248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2250         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2251         optimization of PI mutex handling.
2253 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2255         [BZ #10418]
2256         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2257         instead of of _acq variants of cmpxchg.
2259 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2261         * sysdeps/x86_64/configure.in: New file.
2263         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2264         path when not using absolute timeout futex.
2266 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2269         optimizations of last changes.
2270         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2272 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2274         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2275         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2277         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2278         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2279         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2280         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2283         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2284         (__pthread_cond_timedwait): Make more robust.
2286 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2288         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2289         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2290         directly use absolute timeout.
2292         * tst-sem5.c (do_test): Add test for premature timeout.
2293         * Makefile: Linu tst-sem5 with librt.
2295         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2296         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2297         directly use absolute timeout.
2298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2299         (pthread_rwlock_timedrdlock): Likewise.
2301         * tst-cond11.c (run_test): Add test to check that the timeout is
2302         long enough.
2304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2305         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2306         directly use absolute timeout.
2308         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2309         (__pthread_cond_wait): Convert to using exception handler instead of
2310         registered unwind buffer.
2311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2312         (__pthread_cond_timedwait): Likewise.
2314 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2316         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2317         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2318         use absolute timeout.
2320         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2321         handling of uncontested semaphore.
2323         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2324         (__condvar_cleanup): Rewrite to use cfi directives instead of
2325         hand-coded unwind tables.
2326         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2327         Likewise.
2328         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2329         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2330         Likewise.
2332 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2334         * Makefile (libpthread-routines): Add pthread_sigqueue.
2335         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2336         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2337         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2339 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2341         [BZ #10262]
2342         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2343         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2344         cannot be assumed.
2345         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2347 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2349         * libc-cancellation.c: Move __libc_cleanup_routine to...
2350         * libc-cleanup.c: ...here.  New file.
2351         * Makefile (routines): Add libc-cleanup.
2353         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2354         test.
2355         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2356         * sysdeps/pthread/librt-cancellation.c: Likewise.
2358         [BZ #9924]
2359         * nptl-init.c: Renamed from init.c.
2360         * Makefile: Change all occurences of init.c to nptl-init.c.
2362 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2364         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2365         to test when deciding on the delay.
2366         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2367         * pthread_cancel.c: Close race between deciding on sending a signal
2368         and setting the CANCELING_BIT bit.
2370         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2371         thread is canceled.
2372         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2374 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2376         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2377         is available.
2378         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2379         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2380         * sysdeps/i386/tls.h: Likewise.
2381         (tcbhead_t): Add __private_tm member.
2383 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2385         * sem_open.c (sem_open): Rewrite initialization of initsem to
2386         avoid warnings.
2388         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2389         Avoid warning by using may_alias attribute on ptrhack.
2391 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2393         [BZ #10090]
2394         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2395         Check policy and priority for validity.
2396         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2398 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2400         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2401         (__pthread_cond_timedwait): Change to use cfi directives instead of
2402         hand-coded unwind sections.
2404 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2406         * init.c (nptl_freeres): Compile only for SHARED.
2408 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2410         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2411         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2412         FUTEX_BITSET_MATCH_ANY.
2414 2009-02-27  Roland McGrath  <roland@redhat.com>
2416         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2417         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2419 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2421         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2422         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2423         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2424         200112L to 200809L.
2426 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2428         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2429         POSIX 2008.
2431 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2433         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2434         Unify name of include protector macro.
2436 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2438         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2439         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2441 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2443         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2444         pointer variables.
2446         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2447         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2448         * init.c (nptl_freeres): New function.
2449         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2450         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2451         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2452         variable.
2453         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2454         load DSO.  Assign last.
2455         (__unwind_freeres): New function.
2457         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2458         for better debugging.  No need to use stack_list_add here.
2460 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2462         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2463         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2464         instead of computing relative timeout.
2465         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2466         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2468 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2470         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2472 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2474         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2475         (list_add_tail): Removed.
2477 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2479         * (in_flight_stack): New variable.
2480         (stack_list_del): New function.  Use instead of list_del.
2481         (stack_list_add): New function.  Use instead of list_add when adding to
2482         stack_cache and stack_used lists.
2483         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2484         when the fork call interrupted another thread.
2486 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2488         * init.c (__pthread_initialize_minimal_internal): Optimize test
2489         FUTEX_CLOCK_REALTIME a bit.
2491 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2493         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2494         only passing five parameters to FUTEX_WAIT_BITSET call.
2496         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2497         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2498         instead of computing relative timeout.
2500 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2502         * init.c (__pthread_initialize_minimal_internal): Check for
2503         FUTEX_CLOCK_REALTIME flag.
2504         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2505         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2506         relative timeout.
2508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2509         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2510         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2511         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2512         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2513         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2515 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2517         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2518         loop body instead of ; to avoid gcc warnings.
2519         (pthread_cleanup_pop_restore_np): Likewise.
2520         Patch by Caolán McNamara <caolanm@redhat.com>.
2522 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2524         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2525         fast path here, for robust/PI/PP mutexes call
2526         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2527         of ifs according to their probability.
2528         (__pthread_mutex_lock_full): New function.
2529         * pthread_mutex_unlock.c: Include assert.h.
2530         (__pthread_mutex_unlock_usercnt): Handle only the
2531         fast path here, for robust/PI/PP mutexes call
2532         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2533         of ifs according to their probability.
2534         (__pthread_mutex_unlock_full): New function.
2535         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2536         (__pthread_mutex_lock_full): Define.
2538 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2540         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2541         implementation.  Add necessary padding and.
2542         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2543         words.
2545 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2547         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2548         and FUTEX_WAKE_BITSET.
2550 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2552         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2553         and FUTEX_WAKE_BITSET.
2554         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2555         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2556         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2557         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2559 2008-11-25  Roland McGrath  <roland@redhat.com>
2561         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2562         Subdirectories moved to ports repository as
2563         sysdeps/.../nptl subdirectories.
2565 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2567         [BZ #7008]
2568         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2569         of old value.
2570         * pthread_cond_init.c (__pthread_cond_init): Fix
2571         cond->__data.__nwaiters initialization.
2572         * Makefile (tests): Add tst-cond23.
2573         * tst-cond23.c: New test.
2575 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2577         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2578         arguments.
2579         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2580         arguments.
2582 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2584         [BZ #6955]
2585         * pthread_mutex_lock.c: Add support for private PI mutexes.
2586         * pthread_mutex_timedlock.c: Likewise.
2587         * pthread_mutex_trylock.c: Likewise.
2588         * pthread_mutex_unlock.c: Likewise.
2589         Patch mostly by Ben Jackson <ben@ben.com>.
2591 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2593         [BZ #6843]
2594         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2595         Increase stack size for helper thread.
2597 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2599         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2600         assembly with a clobber list for access registers a0 and a1.
2602 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2604         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2605         to force runp->refcntr to be read from memory.
2607 2008-09-08  Richard Guenther  <rguenther@suse.de>
2609         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2610         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2611         lll_timedlock, lll_robust_timedlock, lll_unlock,
2612         lll_robust_unlock): Promote private to int.
2614 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2616         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2617         ARCH_RETRY_MMAP definitions.
2618         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2619         Define MAP_STACK when not defined.
2620         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2621         handling of ARCH_RETRY_MMAP.
2623 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2625         * tst-align2.c (f): Print message that f is reached.
2627 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2629         [BZ #6740]
2630         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2631         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2633 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2635         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2636         SOCK_CLOEXEC if possible.
2638 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2640         * Makefile (tests): Add tst-rwlock2a.
2641         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2642         * tst-rwlock2a.c: New file.
2644 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2646         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2648 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2650         * sysdeps/pthread/pthread.h: Fix typo in comment.
2652 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2654         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2655         of CPU set to the kernel.
2657 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2659         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2660         cfi directives.
2661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2663         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2664         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2665         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2666         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2668 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2671         cfi directives.
2672         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2673         Likewise.
2674         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2675         Likewise.
2676         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2677         Likewise.
2679 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2681         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2683 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2685         David S. Miller  <davem@davemloft.net>
2687         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2689 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2692         __pshared correctly.
2693         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2694         Likewise.
2695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2696         Likewise.
2697         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2698         Likewise.
2699         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2700         Likewise.
2701         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2703 2008-04-14  David S. Miller  <davem@davemloft.net>
2705         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2706         (__old_sem_wait): Fix argument to lll_futex_wait().
2708 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2710         * pthread_create.c: Require pthread_mutex_trylock and
2711         pthread_key_delete for libgcc.
2713 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2715         [BZ #6020]
2716         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2717         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2718         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2720 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2722         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2723         <linux/limits.h> has defined it.
2724         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2725         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2726         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2727         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2729 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2731         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2732         of ASSEMBLER.
2733         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2734         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2736 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2738         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2739         HAVE_DL_DISCOVER_OSVERSION.
2740         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2741         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2743 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2745         [BZ #5778]
2746         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2747         _POSIX_CHOWN_RESTRICTED value to zero.
2749 2008-01-31  Roland McGrath  <roland@redhat.com>
2751         * Makefile (omit-deps): Variable removed.
2753 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2755         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2756         unnecessary addr32 prefix.
2758 2008-01-29  Roland McGrath  <roland@redhat.com>
2760         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2762 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2764         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2766 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2768         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2769         a scratch register.
2770         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2771         (__lll_lock_wait_private): Fix typo.
2772         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2773         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2774         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2775         Adjust XADD use.
2776         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2777         (pthread_rwlock_timedrdlock): Return correct return value.
2778         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2779         (pthread_rwlock_timedwrlock): Likewise.
2781 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2783         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2784         thread returns the program exits with an error code.
2786 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2788         * pthread-errnos.sym: Add EOVERFLOW.
2789         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2790         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2791         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2792         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2794 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2796         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2797         parameter.  Passed it as permission to mmap.
2798         * allocatestack.c (allocate_stack): Pass prot as second parameter
2799         to ARCH_RETRY_MMAP.
2801 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2803         * tst-basic7.c: Allocate memory for the stack.
2805         [BZ #5465]
2806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2807         (__pthread_cond_timedwait): Don't use VDSO.
2808         Patch by Michal Januszewski.
2810 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2812         [BZ #5455]
2813         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2814         Allow label before pthread_cleanup_pop.
2815         (pthread_cleanup_pop_restore_np): Likewise.
2817 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2819         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2820         Store 2 before returning ETIMEDOUT.
2822 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2824         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2825         Store 2 before returning ETIMEDOUT.
2826         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2827         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2828         (__lll_lock_wait_private): Optimize.
2829         (__lll_lock_wait): Likewise.
2831 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2833         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2834         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2835         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2837 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2839         [BZ #5240]
2840         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2841         If we time out, try one last time to lock the futex to avoid
2842         losing a wakeup signal.
2843         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2844         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2846         [BZ #5245]
2847         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2848         if necessary.
2850 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2852         [BZ #5245]
2853         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2854         mmap failed to EAGAIN.
2855         * Makefile (tests): Add tst-basic7.
2856         * tst-basic7.c: New file.
2858 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2860         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2861         Use __linkin_atfork.
2863 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2865         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2866         missing line continuations.
2867         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2868         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2870 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2872         [BZ #5220]
2873         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2874         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2875         (struct timer): Add next element.
2876         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2877         enqueue timer structure into __active_timer_sigev_thread list.
2878         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2879         remove timer struct from __active_timer_sigev_thread.
2880         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2881         Before using timer structure make sure it is still on the
2882         __active_timer_sigev_thread list.  Keep lock until done.
2883         Define __active_timer_sigev_thread and
2884         __active_timer_sigev_thread_lock.
2886 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2888         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2889         Redefine thread_atfork for use of ATFORK_MEM.
2890         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2891         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2892         function.
2893         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2894         Use atomic operation when removing first element of list.
2896 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2898         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2899         routine instead of an alias to __new_sem_post.
2901 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2903         * init.c (__pthread_initialize_minimal): Initialize word to appease
2904         valgrind.
2906 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2908         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2909         libc.so just clear NAME.
2910         (__libc_rwlock_fini): Nop inside of libc.so.
2911         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2912         all zeros.
2914 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2917         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2918         unlocking failed.
2919         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2921 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2923         [BZ #4938]
2924         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2925         reclaimed stack if necessary.
2926         * Makefile (tests): Add tst-tsd6.
2927         * tst-tsd6.c: New file.
2929 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2931         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2932         Add private argument.
2934 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2937         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2939 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2941         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2942         (__lll_robust_timedlock): Pass private as last argument to
2943         __lll_robust_timedlock_wait.
2944         (__lll_unlock): Fix a pasto.
2946 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2948         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2949         sparc_old_sem): New structs.
2950         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2951         (__sem_wait_cleanup): New function.
2952         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2953         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2954         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2955         lll_futex_wait.
2956         (__old_sem_wait): New function.
2957         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2958         nptl/sysdeps/unix/sysv/linux/sparc version.
2959         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2960         Likewise.
2961         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2962         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2963         (__new_sem_trywait): Use sparc_old_sem structure.
2964         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2965         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2966         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2967         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2968         lll_futex_timed_wait.
2969         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2970         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2971         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2972         lll_futex_wake.
2973         (__old_sem_post): New function.
2974         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2975         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2976         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2977         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2978         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2979         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2981 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2983         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2984         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2985         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2986         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2987         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2988         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2989         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2990         Use FUTEX_WAKE_OP.
2991         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2992         kernel-features.h and tcb-offsets.h.
2993         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2994         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2995         process private.
2996         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2997         tcb-offsets.h.
2998         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2999         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3000         process private.
3001         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3002         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3003         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3004         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3005         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3006         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3007         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3009 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
3011         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3012         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3013         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3014         lll_futex_timed_wait.
3016         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3017         __lll_robust_unlock): Rewrite as macros instead of inline functions.
3018         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3019         __lll_robust_unlock, __lll_wait_tid): Likewise.
3021 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3023         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3024         Fix a pasto.
3025         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3026         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3027         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3028         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3030         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3031         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3033         kernel-features.h.
3034         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3035         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3036         process private.  Switch DW_CFA_advance_loc1 and some
3037         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3039         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3040         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3041         process private.  Switch DW_CFA_advance_loc{1,2} and some
3042         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3043         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3044         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3045         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3046         Likewise.
3047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3048         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3049         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3050         Likewise.
3051         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3052         (__pthread_cond_broadcast): Compare %r8 instead of
3053         dep_mutex-cond_*(%rdi) with $-1.
3054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3055         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3056         of oring.
3058 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3060         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3062 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3064         * allocatestack.c: Include kernel-features.h.
3065         * pthread_create.c: Likewise.
3066         * pthread_mutex_init.c: Likewise.
3067         * init.c: Likewise.
3068         * pthread_cond_timedwait.c: Likewise.
3069         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3070         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3071         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3072         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3073         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3074         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3075         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3076         Likewise.
3077         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3078         Likewise.
3079         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3080         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3081         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3082         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3084 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3086         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3087         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3088         byte elements.  One of them is the new __shared element.
3089         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3090         adjust names of other padding elements.
3091         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3092         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3093         byte elements.  One of them is the new __shared element.
3094         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3095         adjust names of other padding elements.
3096         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3097         Renamed __pad1 element to __shared, adjust names of other padding
3098         elements.
3099         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3100         (pthread_rwlock_t): Likewise.
3101         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3102         typo.
3104 2007-08-09  Anton Blanchard  <anton@samba.org>
3106         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3108 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3111         <kernel-features.h>.
3112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3114 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3116         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3117         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3118         dealing with robust mutexes.
3119         * pthread_mutex_timedlock.c: Likewise.
3120         * pthread_mutex_trylock.c: Likewise.
3121         * pthread_mutex_unlock.c: Likewise.
3122         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3124 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3126         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3127         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3128         (PTHREAD_MUTEX_PSHARED): Define.
3129         * pthread_mutex_init.c (__pthread_mutex_init): Set
3130         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3131         mutexes.
3132         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3133         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3134         as second argument to lll_lock.
3135         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3136         instead of its __data.__lock field.
3137         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3138         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3139         to lll_robust_lock.
3140         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3141         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3142         instead of mutex->__data.__kind directly, pass
3143         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3144         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3145         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3146         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3147         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3148         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3149         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3150         of mutex->__data.__kind directly.
3151         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3152         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3153         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3154         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3155         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3156         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3157         and lll_futex_wake.
3158         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3159         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3160         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3161         directly.
3162         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3163         Take mutex as argument instead of its __data.__lock field, pass
3164         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3165         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3166         __data.__lock field.
3167         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3168         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3169         to lll_robust_cond_lock.
3170         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3171         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3172         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3173         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3174         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3175         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3176         lll_futex_wait.
3177         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3178         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3179         lll_futex_wake.
3180         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3181         pshared variable, pass it to lll_lock, lll_unlock,
3182         lll_futex_timedwait and lll_futex_wake.
3183         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3184         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3185         and lll_futex_wake.
3186         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3187         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3188         macro.
3189         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3190         lll_futex_wake_unlock): Likewise.
3191         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3192         Likewise.
3193         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3194         lll_futex_wake_unlock): Likewise.
3195         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3196         Likewise.
3197         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3198         lll_futex_wake_unlock): Likewise.
3199         (lll_futex_wake): Fix a typo.
3200         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3201         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3202         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3203         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3204         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3206         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3207         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3209         (__pthread_cond_timedwait): Likewise.
3210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3211         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3213 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3215         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3216         Don't use CGOTSETUP and CGOTRESTORE macros.
3217         (CGOTSETUP, CGOTRESTORE): Remove.
3218         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3219         @local symbol.
3221 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3223         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3224         definitions for private futexes.
3225         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3226         kernel-features.h and lowlevellock.h.  Use private futexes if
3227         they are available.
3228         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3229         (__lll_mutex_lock_wait): Rename to
3230         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3231         (__lll_mutex_timedlock_wait): Rename to ...
3232         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3233         Don't compile in for libc.so.
3234         (__lll_mutex_unlock_wake): Rename to ...
3235         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3236         (__lll_timedwait_tid): Use __NR_gettimeofday.
3237         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3238         the header from assembler.  Renamed all lll_mutex_* resp.
3239         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3240         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3241         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3242         Define.
3243         (__lll_lock_wait_private): Add prototype.
3244         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3245         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3246         __lll_unlock_wake): Likewise.
3247         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3248         if private is constant LLL_PRIVATE.
3249         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3250         lll_timedlock, lll_robust_timedlock): Add private argument.
3251         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3252         if private is constant LLL_PRIVATE.
3253         (lll_robust_unlock, lll_robust_dead): Add private argument.
3254         (lll_lock_t): Remove.
3255         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3256         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3257         lll_cond_wake, lll_cond_broadcast): Remove.
3258         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3259         kernel-features.h and lowlevellock.h.
3260         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3261         (LOAD_FUTEX_WAIT): Define.
3262         (__lll_robust_mutex_lock_wait): Rename to ...
3263         (__lll_robust_lock_wait): ... this.  Add private argument.
3264         Use LOAD_FUTEX_WAIT macro.
3265         (__lll_robust_mutex_timedlock_wait): Rename to ...
3266         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3267         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3268         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3269         lowlevellock.h.
3270         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3271         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3272         __lll_mutex_{lock,unlock}_*.
3273         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3274         lowlevellock.h and pthread-errnos.h.
3275         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3276         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3277         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3278         __lll_mutex_{lock,unlock}_*.
3279         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3280         lowlevellock.h and pthread-errnos.h.
3281         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3282         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3283         __lll_mutex_{lock,unlock}_*.
3284         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3285         lowlevellock.h.
3286         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3287         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3288         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3289         (__condvar_tw_cleanup): Likewise.
3290         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3291         lowlevellock.h.
3292         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3293         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3294         __lll_mutex_{lock,unlock}_*.
3295         ( __condvar_w_cleanup): Likewise.
3296         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3297         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3299         lowlevellock.h.
3300         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3301         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3302         __lll_mutex_{lock,unlock}_*.
3303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3304         lowlevellock.h.
3305         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3306         FUTEX_PRIVATE_FLAG): Remove.
3307         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3308         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3309         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3310         lowlevellock.h.
3311         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3312         FUTEX_PRIVATE_FLAG): Remove.
3313         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3314         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3315         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3316         lowlevellock.h.
3317         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3318         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3319         __lll_mutex_{lock,unlock}_*.
3320         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3321         lowlevellock.h.
3322         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3323         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3324         __lll_mutex_{lock,unlock}_*.
3325         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3326         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3327         (__new_sem_post): Use standard initial exec code sequences.
3328         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3329         lowlevellock.h.
3330         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3331         FUTEX_PRIVATE_FLAG): Remove.
3332         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3333         exec code sequences.
3334         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3335         (__new_sem_trywait): Use standard initial exec code sequences.
3336         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3337         (__new_sem_wait): Use standard initial exec code sequences.
3339 2007-07-31  Anton Blanchard  <anton@samba.org>
3341         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3342         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3343         atomic_full_barrier.
3345 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3347         * allocatestack.c (stack_cache_lock): Change type to int.
3348         (get_cached_stack, allocate_stack, __deallocate_stack,
3349         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3350         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3351         as second argument to lll_lock and lll_unlock macros on
3352         stack_cache_lock.
3353         * pthread_create.c (__find_in_stack_list): Likewise.
3354         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3355         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3356         as second argument.
3357         * descr.h (struct pthread): Change lock and setxid_futex field
3358         type to int.
3359         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3360         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3361         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3362         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3363         Likewise.
3364         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3365         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3366         * pthreadP.h (__attr_list_lock): Change type to int.
3367         * pthread_attr_init.c (__attr_list_lock): Likewise.
3368         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3369         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3370         lll_{,un}lock.
3371         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3372         also for lll_futex_{wake,wait}.
3373         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3374         a pointer to const.
3375         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3376         LLL_SHARED as second argument to lll_{,un}lock.
3377         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3378         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3379         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3380         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3381         Likewise.
3382         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3383         as second argument to lll_{,un}lock macros on pd->lock.
3384         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3385         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3386         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3387         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3388         Likewise.
3389         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3390         Likewise.
3391         * pthread_once.c (once_lock): Change type to int.
3392         (__pthread_once): Pass LLL_PRIVATE as second argument to
3393         lll_{,un}lock macros on once_lock.
3394         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3395         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3396         rwlock->__data.__shared as second argument to them and similarly
3397         for lll_futex_w*.
3398         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3399         Likewise.
3400         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3401         Likewise.
3402         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3403         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3404         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3405         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3406         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3407         to lll_{,un}lock macros on __sem_mappings_lock.
3408         * sem_open.c (check_add_mapping): Likewise.
3409         (__sem_mappings_lock): Change type to int.
3410         * semaphoreP.h (__sem_mappings_lock): Likewise.
3411         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3412         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3413         instead of lll_*mutex_*, pass LLL_SHARED as last
3414         argument.
3415         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3416         pass LLL_SHARED as last argument.
3417         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3418         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3419         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3420         pass LLL_SHARED as last argument.
3421         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3422         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3423         LLL_SHARED as last argument.
3424         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3425         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3426         Similarly.
3427         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3428         __libc_lock_lock_recursive, __libc_lock_unlock,
3429         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3430         argument to lll_{,un}lock.
3431         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3432         _IO_lock_unlock): Likewise.
3433         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3434         compound literal.
3435         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3436         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3437         __fork_lock.
3438         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3439         free_mem): Likewise.
3440         (__fork_lock): Change type to int.
3441         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3442         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3443         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3444         lll_futex_wake.
3445         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3446         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3447         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3448         New function.
3449         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3450         pass it through to lll_futex_*wait, only compile in when
3451         IS_IN_libpthread.
3452         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3453         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3454         argument and pass it through to lll_futex_*wait.
3455         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3456         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3457         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3458         inline functions to __lll_* resp. __lll_robust_*.
3459         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3460         (lll_mutex_dead): Add private argument.
3461         (__lll_lock_wait_private): New prototype.
3462         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3463         __lll_robust_lock_timedwait): Add private argument to prototypes.
3464         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3465         call __lll_lock_wait_private, otherwise pass private to
3466         __lll_lock_wait.
3467         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3468         __lll_robust_timedlock): Add private argument, pass it to
3469         __lll_*wait functions.
3470         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3471         call __lll_unlock_wake_private, otherwise pass private to
3472         __lll_unlock_wake.
3473         (__lll_robust_unlock): Add private argument, pass it to
3474         __lll_robust_unlock_wake.
3475         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3476         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3477         argument, pass it through to __lll_* inline function.
3478         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3479         (lll_lock_t): Remove.
3480         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3481         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3482         lll_cond_wake, lll_cond_broadcast): Remove.
3483         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3484         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3485         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3486         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3487         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3488         the header from assembler.  Renamed all lll_mutex_* resp.
3489         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3490         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3491         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3492         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3493         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3494         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3495         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3496         Remove prototype.
3497         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3498         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3499         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3500         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3501         MULTIPLE_THREADS_OFFSET as another asm operand.
3502         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3503         MULTIPLE_THREADS_OFFSET as last asm operand, call
3504         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3505         otherwise pass private as another argument to __lll_lock_wait.
3506         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3507         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3508         private as another argument to __lll_*lock_wait call.
3509         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3510         MULTIPLE_THREADS_OFFSET as another asm operand, call
3511         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3512         otherwise pass private as another argument to __lll_unlock_wake.
3513         (lll_robust_unlock): Add private argument, pass private as another
3514         argument to __lll_unlock_wake.
3515         (lll_robust_dead): Add private argument, use __lll_private_flag
3516         macro.
3517         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3518         LLL_MUTEX_LOCK_INITIALIZER.
3519         (lll_lock_t): Remove.
3520         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3521         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3522         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3523         lll_cond_wake, lll_cond_broadcast): Remove.
3524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3525         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3526         2007-05-2{3,9} changes.
3527         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3528         kernel-features.h and lowlevellock.h.
3529         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3530         (LOAD_FUTEX_WAIT): Rewritten.
3531         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3532         define.
3533         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3534         (__lll_mutex_lock_wait): Rename to ...
3535         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3536         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3537         (__lll_mutex_timedlock_wait): Rename to ...
3538         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3539         contains private argument.  Don't compile in for libc.so.
3540         (__lll_mutex_unlock_wake): Rename to ...
3541         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3542         Don't compile in for libc.so.
3543         (__lll_timedwait_tid): Use __NR_gettimeofday.
3544         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3545         kernel-features.h and lowlevellock.h.
3546         (LOAD_FUTEX_WAIT): Define.
3547         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3548         define.
3549         (__lll_robust_mutex_lock_wait): Rename to ...
3550         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3551         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3552         macro.
3553         (__lll_robust_mutex_timedlock_wait): Rename to ...
3554         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3555         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3556         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3557         lowlevellock.h.
3558         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3559         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3560         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3561         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3562         to __lll_lock_wait in %edx.
3563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3564         Include lowlevellock.h and pthread-errnos.h.
3565         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3566         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3567         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3568         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3569         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3570         __lll_unlock_wake.
3571         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3572         Include lowlevellock.h and pthread-errnos.h.
3573         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3574         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3575         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3576         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3577         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3578         __lll_unlock_wake.
3579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3580         Include lowlevellock.h.
3581         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3582         Don't define.
3583         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3584         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3585         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3586         __lll_unlock_wake.  Use __NR_gettimeofday.
3587         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3588         Include lowlevellock.h.
3589         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3590         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3591         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3592         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3593         and __lll_unlock_wake.
3594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3595         Include lowlevellock.h.
3596         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3597         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3598         MUTEX(%ebx) address in %edx rather than %ecx to
3599         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3600         and __lll_unlock_wake.  Move return value from %ecx to %edx
3601         register.
3602         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3603         Include lowlevellock.h.
3604         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3605         Don't define.
3606         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3607         MUTEX(%ebp) address in %edx rather than %ecx to
3608         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3609         and __lll_unlock_wake.  Move return value from %ecx to %edx
3610         register.  Use __NR_gettimeofday.
3611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3612         Include lowlevellock.h.
3613         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3614         Don't define.
3615         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3616         MUTEX(%ebp) address in %edx rather than %ecx to
3617         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3618         and __lll_unlock_wake.  Move return value from %ecx to %edx
3619         register.  Use __NR_gettimeofday.
3620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3621         Include lowlevellock.h.
3622         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3623         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3624         MUTEX(%edi) address in %edx rather than %ecx to
3625         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3626         and __lll_unlock_wake.
3627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3628         Include lowlevellock.h.
3629         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3630         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3631         MUTEX(%ebx) address in %edx rather than %ecx to
3632         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3633         and __lll_unlock_wake.  Move return value from %ecx to %edx
3634         register.
3635         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3636         lowlevellock.h.
3637         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3638         define.
3639         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3640         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3641         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3642         lowlevellock.h.
3643         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3644         (sem_timedwait): Use __NR_gettimeofday.
3645         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3646         lowlevellock.h.
3647         (LOCK): Don't define.
3648         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3649         lowlevellock.h.
3650         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3651         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3652         are waiters.
3653         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3654         2007-05-2{3,9} changes.
3655         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3656         kernel-features.h and lowlevellock.h.
3657         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3658         (LOAD_FUTEX_WAIT): Rewritten.
3659         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3660         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3661         (__lll_mutex_lock_wait): Rename to ...
3662         (__lll_lock_wait): ... this.  %esi is now private argument.
3663         Don't compile in for libc.so.
3664         (__lll_mutex_timedlock_wait): Rename to ...
3665         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3666         Don't compile in for libc.so.
3667         (__lll_mutex_unlock_wake): Rename to ...
3668         (__lll_unlock_wake): ... this.  %esi contains private argument.
3669         Don't compile in for libc.so.
3670         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3671         kernel-features.h and lowlevellock.h.
3672         (LOAD_FUTEX_WAIT): Define.
3673         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3674         (__lll_robust_mutex_lock_wait): Rename to ...
3675         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3676         Use LOAD_FUTEX_WAIT macro.
3677         (__lll_robust_mutex_timedlock_wait): Rename to ...
3678         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3679         private, use LOAD_FUTEX_WAIT macro.
3680         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3681         lowlevellock.h.
3682         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3683         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3684         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3685         __lll_lock_wait and __lll_unlock_wake.
3686         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3687         Include lowlevellock.h and pthread-errnos.h.
3688         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3689         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3690         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3691         pass LLL_SHARED in %esi to both __lll_lock_wait and
3692         __lll_unlock_wake.
3693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3694         Include lowlevellock.h and pthread-errnos.h.
3695         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3696         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3697         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3698         pass LLL_SHARED in %esi to both __lll_lock_wait and
3699         __lll_unlock_wake.
3700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3701         Include lowlevellock.h.
3702         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3703         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3704         pass LLL_SHARED in %esi to both __lll_lock_wait and
3705         __lll_unlock_wake.
3706         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3707         Include lowlevellock.h.
3708         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3709         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3710         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3711         and __lll_unlock_wake.
3712         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3713         Include lowlevellock.h.
3714         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3715         Don't define.
3716         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3717         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3718         and __lll_unlock_wake.
3719         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3720         Include lowlevellock.h.
3721         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3722         Don't define.
3723         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3724         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3725         and __lll_unlock_wake.
3726         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3727         Include lowlevellock.h.
3728         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3729         Don't define.
3730         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3731         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3732         and __lll_unlock_wake.
3733         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3734         Include lowlevellock.h.
3735         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3736         Don't define.
3737         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3738         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3739         and __lll_unlock_wake.
3740         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3741         Include lowlevellock.h.
3742         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3743         Don't define.
3744         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3745         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3746         and __lll_unlock_wake.
3747         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3748         lowlevellock.h.
3749         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3750         define.
3751         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3752         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3753         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3754         lowlevellock.h.
3755         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3756         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3757         lowlevellock.h.
3758         (LOCK): Don't define.
3759         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3760         lowlevellock.h.
3761         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3762         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3763         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3764         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3765         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3766         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3767         (__lll_lock_wait_private): New function.
3768         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3769         it to lll_futex_*wait.  Don't compile in for libc.so.
3770         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3771         Remove.
3772         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3773         (struct sparc_pthread_barrier): Remove.
3774         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3775         struct sparc_pthread_barrier.  Pass
3776         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3777         and lll_futex_wait macros.
3778         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3779         Remove.
3780         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3781         Include sparc pthread_barrier_wait.c instead of generic one.
3783 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3785         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3787         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3788         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3789         %ecx.
3790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3791         (pthread_rwlock_timedwrlock): Likewise.
3792         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3793         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3795 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3797         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3799 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3801         * tst-locale2.c (useless): Add return statement.
3803 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3805         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3806         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3807         * pthread_create.c (start_thread): Likewise.
3808         * init.c (sighandler_setxid): Likewise.
3809         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3810         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3811         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3812         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3813         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3814         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3815         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3816         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3817         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3818         Likewise.
3819         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3820         Likewise.
3821         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3822         Likewise.
3823         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3824         __rtld_notify): Likewise.
3825         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3826         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3827         __pthread_once): Likewise.
3828         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3829         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3830         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3831         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3832         (lll_futex_wait): Add private argument, define as wrapper around
3833         lll_futex_timed_wait.
3834         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3835         use __lll_private_flag macro.
3836         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3837         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3838         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3839         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3840         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3841         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3842         (lll_futex_wait): Add private argument, define as wrapper around
3843         lll_futex_timed_wait.
3844         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3845         use __lll_private_flag macro.
3846         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3847         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3848         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3849         Define.
3850         (lll_futex_timed_wait, lll_futex_wake): Use it.
3851         (lll_private_futex_wait, lll_private_futex_timed_wait,
3852         lll_private_futex_wake): Removed.
3853         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3854         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3855         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3856         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3857         (lll_futex_wait): Add private argument, define as wrapper around
3858         lll_futex_timed_wait.
3859         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3860         use __lll_private_flag macro.
3861         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3862         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3863         to lll_futex_*.
3864         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3865         (lll_private_futex_wait, lll_private_futex_timed_wait,
3866         lll_private_futex_wake): Removed.
3867         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3868         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3869         (lll_private_futex_wait, lll_private_futex_timed_wait,
3870         lll_private_futex_wake): Removed.
3871         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3872         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3873         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3874         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3875         (lll_futex_wait): Add private argument, define as wrapper around
3876         lll_futex_timed_wait.
3877         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3878         use __lll_private_flag macro.
3879         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3880         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3881         to lll_futex_*.
3882         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3883         Define.
3884         (lll_futex_timed_wait, lll_futex_wake): Use it.
3885         (lll_private_futex_wait, lll_private_futex_timed_wait,
3886         lll_private_futex_wake): Removed.
3888 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3890         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3891         of the structure for sparc32.
3893 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3895         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3897 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3899         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3900         code used when private futexes are assumed.
3901         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3902         Likewise.
3904 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3906         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3907         (__lll_private_flag): Define.
3908         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3909         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3910         __lll_private_flag.
3911         (lll_private_futex_wait, lll_private_futex_timedwait,
3912         lll_private_futex_wake): Define as wrapper around non-_private
3913         macros.
3914         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3915         (__lll_private_flag): Define.
3916         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3917         (lll_private_futex_wait, lll_private_futex_timedwait,
3918         lll_private_futex_wake): Define as wrapper around non-_private
3919         macros.
3921 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3923         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3924         parameter to lll_futex_wait call.
3925         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3927         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3928         Replace lll_futex_wait with lll_private_futex_wait.
3929         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3930         Add LLL_SHARED parameter to lll_futex_wake().
3932         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3933         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3934         lll_private_futex_wake.
3935         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3936         bit from private parm before syscall.
3937         (lll_futex_timed_wait): Likewise.
3938         (lll_futex_wake): Likewise.
3939         (lll_futex_wake_unlock): Likewise.
3940         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3941         (lll_robust_mutex_unlock): Likewise.
3942         (lll_mutex_unlock_force): Likewise.
3943         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3945 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3947         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3948         compilation when unconditionally using private futexes.
3949         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3950         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3951         Likewise.
3952         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3953         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3955 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3957         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3958         Define.
3960 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3962         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3963         kernel-features.h.
3965 2007-05-16  Roland McGrath  <roland@redhat.com>
3967         * init.c (__nptl_initial_report_events): New variable.
3968         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3969         to that.
3971 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3973         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3974         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3976 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3978         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3979         implementation.
3981 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3983         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3984         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3985         * pthread_mutex_timedlock.c: Likewise.
3986         * pthread_mutex_trylock.c: Likewise.
3987         * pthread_mutex_unlock.c: Likewise.
3989 2007-06-17  Andreas Schwab  <schwab@suse.de>
3991         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3992         sections.
3994 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3996         * allocatestack.c (allocate_stack): Make code compile if
3997         __ASSUME_PRIVATE_FUTEX is set.
3999 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4001         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4002         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4003         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4004         (__pthread_rwlock_wrlock): Likewise.
4005         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4006         (pthread_rwlock_timedrdlock): Likewise.
4007         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4008         (pthread_rwlock_timedwrlock): Likewise.
4009         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4010         (__pthread_rwlock_unlock): Likewise.
4012 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4014         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4015         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4016         Split __flags into __flags, __shared, __pad1 and __pad2.
4017         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4018         futexes if they are available.
4019         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4020         in libc-lowlevellock.S allow using private futexes.
4021         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4022         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
4023         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
4024         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
4025         lll_private_futex_timed_wait and lll_private_futex_wake.
4026         (lll_robust_mutex_unlock): Fix typo.
4027         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4028         field in futex command setup.
4029         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4030         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4031         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4032         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4033         if they are available.  Remove clear_once_control.
4034         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4035         futexes if they are available.
4036         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4037         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4038         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4039         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4040         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4041         Wake only when there are waiters.
4042         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4043         support.  Indicate that there are waiters.  Remove unnecessary
4044         extra cancellation test.
4045         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
4046         left-over duplication of __sem_wait_cleanup.
4048 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
4050         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4051         parameter to lll_futex_wait, lll_futex_timed_wait, and
4052         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
4053         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4054         lll_private_futex_wake.
4055         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4056         * allocatestack.c: Adjust use of lll_futex_* macros.
4057         * init.c: Likewise.
4058         * lowlevellock.h: Likewise.
4059         * pthread_barrier_wait.c: Likewise.
4060         * pthread_cond_broadcast.c: Likewise.
4061         * pthread_cond_destroy.c: Likewise.
4062         * pthread_cond_signal.c: Likewise.
4063         * pthread_cond_timedwait.c: Likewise.
4064         * pthread_cond_wait.c: Likewise.
4065         * pthread_create.c: Likewise.
4066         * pthread_mutex_lock.c: Likewise.
4067         * pthread_mutex_setprioceiling.c: Likewise.
4068         * pthread_mutex_timedlock.c: Likewise.
4069         * pthread_mutex_unlock.c: Likewise.
4070         * pthread_rwlock_timedrdlock.c: Likewise.
4071         * pthread_rwlock_timedwrlock.c: Likewise.
4072         * pthread_rwlock_unlock.c: Likewise.
4073         * sysdeps/alpha/tls.h: Likewise.
4074         * sysdeps/i386/tls.h: Likewise.
4075         * sysdeps/ia64/tls.h: Likewise.
4076         * sysdeps/powerpc/tls.h: Likewise.
4077         * sysdeps/pthread/aio_misc.h: Likewise.
4078         * sysdeps/pthread/gai_misc.h: Likewise.
4079         * sysdeps/s390/tls.h: Likewise.
4080         * sysdeps/sh/tls.h: Likewise.
4081         * sysdeps/sparc/tls.h: Likewise.
4082         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4083         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4084         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4085         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4086         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4087         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4088         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4089         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4090         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4091         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4092         Likewise.
4093         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4094         * sysdeps/x86_64/tls.h: Likewise.
4096 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4098         * pthread_getattr_np.c: No need to install a cancellation handler,
4099         this is no cancellation point.
4100         * pthread_getschedparam.c: Likewise.
4101         * pthread_setschedparam.c: Likewise.
4102         * pthread_setschedprio.c: Likewise.
4103         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4104         lll_unlock_wake_cb.
4105         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4106         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4107         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4108         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4109         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4110         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4111         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4112         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4113         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4114         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4115         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4118         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4119         whether there are more than one thread makes no sense here since
4120         we only call the slow path if the locks are taken.
4121         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4123         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4124         COND_NWAITERS_SHIFT.
4125         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4126         COND_CLOCK_BITS.
4127         * pthread_cond_init.c: Likewise.
4128         * pthread_cond_timedwait.c: Likewise.
4129         * pthread_cond_wait.c: Likewise.
4130         * pthread_condattr_getclock.c: Likewise.
4131         * pthread_condattr_setclock.c: Likewise.
4132         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4133         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4134         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4138 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4140         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4141         unistd.h.
4143         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4144         insn suffix.
4145         (THREAD_GSCOPE_GET_FLAG): Remove.
4146         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4147         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4148         changes.
4149         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4150         (THREAD_GSCOPE_GET_FLAG): Remove.
4151         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4152         instead of THREAD_GSCOPE_GET_FLAG.
4153         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4154         it.
4155         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4156         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4157         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4158         THREAD_GSCOPE_WAIT): Define.
4159         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4160         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4161         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4162         THREAD_GSCOPE_WAIT): Define.
4163         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4164         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4165         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4166         THREAD_GSCOPE_WAIT): Define.
4167         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4168         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4169         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4170         THREAD_GSCOPE_WAIT): Define.
4172 2007-05-24  Richard Henderson  <rth@redhat.com>
4174         * descr.h (struct pthread): Add header.gscope_flag.
4175         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4176         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4177         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4178         THREAD_GSCOPE_WAIT): Define.
4180 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4182         * init.c: Make it compile with older kernel headers.
4184         * tst-initializers1.c: Show through exit code which test failed.
4186         * pthread_rwlock_init.c: Also initialize __shared field.
4187         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4188         element in rwlock structure into four byte elements.  One of them is
4189         the new __shared element.
4190         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4191         Likewise.
4192         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4193         __shared, adjust names of other padding elements.
4194         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4195         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4196         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4197         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4198         FUTEX_PRIVATE_FLAG.
4199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4200         futex to use private operations if possible.
4201         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4202         Likewise.
4203         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4204         Likewise.
4205         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4206         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4207         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4208         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4209         Likewise.
4210         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4211         Likewise.
4212         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4213         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4215 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4217         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4218         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4219         * pthread_rwlock_timedrdlock.c: Likewise.
4220         * pthread_rwlock_tryrdlock.c: Likewise.
4222         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4223         optimization.
4225         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4226         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4227         duplication of __sem_wait_cleanup.
4229         * allocatestack.c: Revert last change.
4230         * init.c: Likewise.
4231         * sysdeps/i386/tls.h: Likewise.
4232         * sysdeps/x86_64/tls.h: Likewise.
4233         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4234         header structure.
4235         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4237         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4238         Add private field.
4239         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4240         * pthread_barrier_init.c: Set private flag if pshared and private
4241         futexes are supported.
4242         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4243         private field in futex command setup.
4244         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4246 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4248         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4249         support.
4250         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4251         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4252         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4253         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4254         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4256         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4257         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4258         fields in the structure.
4259         (__old_sem_init): New function.
4260         * sem_open.c: Initialize all fields of the structure.
4261         * sem_getvalue.c: Adjust for renamed element.
4262         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4263         (gen-as-const-headers): Add structsem.sym.
4264         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4265         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4266         struct new_sem.  Add struct old_sem.
4267         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4268         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4269         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4270         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4271         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4272         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4273         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4274         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4275         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4276         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4277         * tst-sem10.c: New file.
4278         * tst-sem11.c: New file.
4279         * tst-sem12.c: New file.
4280         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4281         of struct sem.
4283 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4284             Jakub Jelinek  <jakub@redhat.com>
4286         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4287         Move __pthread_enable_asynccancel right before futex syscall.
4288         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4289         Likewise.
4291 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4293         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4294         THREAD_COPY_PRIVATE_FUTEX): Define.
4295         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4296         THREAD_COPY_PRIVATE_FUTEX): Define.
4297         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4298         * init.c (__pthread_initialize_minimal_internal): Use
4299         THREAD_SET_PRIVATE_FUTEX.
4301         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4302         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4303         THREAD_GSCOPE_FLAG_WAIT): Define.
4304         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4305         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4306         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4307         PTR_DEMANGLE.
4308         (THREAD_GSCOPE_GET_FLAG): Define.
4309         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4310         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4311         instead of ->header.gscope_flag directly.
4313 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4315         * init.c (__pthread_initialize_minimal_internal): Check whether
4316         private futexes are available.
4317         * allocatestack.c (allocate_stack): Copy private_futex field from
4318         current thread into the new stack.
4319         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4320         futexes if they are available.
4321         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4322         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4323         in libc-lowlevellock.S allow using private futexes.
4324         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4325         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4326         FUTEX_PRIVATE_FLAG.
4327         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4328         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4329         if they are available.
4330         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4331         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4332         * sysdeps/i386/tcb-offsets.sym: Likewise.
4333         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4334         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4336 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4338         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4339         Remove ptr_wait_lookup_done again.
4340         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4341         (__pthread_initialize_minimal_internal): Initialize
4342         _dl_wait_lookup_done pointer in _rtld_global directly.
4343         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4344         Remove code to code _dl_wait_lookup_done.
4345         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4346         encrypted for now.
4348 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4350         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4351         pthread_mutex_init failed with ENOTSUP.
4353 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4355         * allocatestack.c (__wait_lookup_done): New function.
4356         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4357         Add ptr_wait_lookup_done.
4358         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4359         * pthreadP.h: Declare __wait_lookup_done.
4360         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4361         Define macros to implement reference handling of global scope.
4362         * sysdeps/x86_64/tls.h: Likewise.
4363         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4364         Initialize GL(dl_wait_lookup_done).
4366 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4368         [BZ #4512]
4369         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4370         is detected.
4371         * pthread_mutex_timedlock.c: Likewise.
4372         * pthread_mutex_trylock.c: Likewise.
4373         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4375         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4376         * tst-robust9.c: New file.
4377         * tst-robustpi9.c: New file.
4379         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4380         unnecessary extra cancellation test.
4382 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4384         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4385         extra cancellation test.
4386         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4388 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4390         * descr.h (struct pthread): Rearrange members to fill hole in
4391         64-bit layout.
4393         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4394         (__pthread_setaffinity_new): If syscall was successful and
4395         RESET_VGETCPU_CACHE is defined, use it before returning.
4396         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4398 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4400         [BZ #4455]
4401         * tst-align2.c: Include stackinfo.h.
4402         * tst-getpid1.c: Likewise.
4404 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4406         [BZ #4455]
4407         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4408         * tst-getpid1.c (do_test): Likewise.
4410         [BZ #4456]
4411         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4412         (allocate_stack): Likewise.
4414 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4416         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4417         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4418         (__lll_robust_timedlock_wait): Likewise.
4419         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4421 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4423         [BZ #4465]
4424         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4425         * tst-cancel4.c (tf_fdatasync): New test.
4427 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4429         [BZ #4392]
4430         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4431         check mutexes like normal mutexes.
4433         [BZ #4306]
4434         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4435         Initialize the whole sigevent structure to appease valgrind.
4437 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4439         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4440         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4442 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4444         * tst-locale1.c: Avoid warnings.
4445         * tst-locale2.c: Likewise.
4447 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4449         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4450         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4452 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4454         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4455         __extern_always_inline where appropriate.
4456         * sysdeps/pthread/pthread.h: Likewise.
4458 2007-03-13  Richard Henderson  <rth@redhat.com>
4460         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4461         separate cfi regions for the two subsections.
4463 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4465         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4466         new thread, don't just decrement it.
4467         Patch by Suzuki K P <suzuki@in.ibm.com>.
4469 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4471         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4472         PTHFCT_CALL definition.
4474 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4476         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4477         available, don't use it.
4479 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4481         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4482         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4483         call into the kernel to delay.
4485 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4487         * tst-initializers1.c: We want to test the initializers as seen
4488         outside of libc, so undefined _LIBC.
4490         * pthread_join.c (cleanup): Avoid warning.
4492 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4494         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4495         (__lll_timedwait_tid): Add unwind info.
4497         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4498         function table, mangle the pointers.
4499         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4500         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4501         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4502         demangle pointers before use.
4503         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4504         demangle pointer.
4505         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4506         * sysdeps/pthread/setxid.h: Likewise.
4508 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4510         * tst-rwlock7.c: Show some more information in case of correct
4511         behavior.
4513 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4515         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4516         (lll_futex_timed_wait): Undo part of last change, don't negate
4517         return value.
4519 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4521         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4522         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4524 2006-12-28  David S. Miller  <davem@davemloft.net>
4526         * shlib-versions: Fix sparc64 linux target specification.
4528 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4530         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4531         Adjust include path for pthread_barrier_wait.c move.
4533 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4535         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4536         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4538 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4540         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4541         6 argument cancellable syscalls.
4542         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4543         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4544         6 argument cancellable syscalls.
4545         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4547 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4549         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4550         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4552 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4554         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4555         __sync_lock_release instead of __sync_lock_release_si.
4557 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4559         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4560         Define.
4561         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4562         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4563         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4564         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4565         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4566         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4567         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4568         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4569         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4570         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4571         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4573 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4575         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4576         * pthread_barrier_wait.c: ...here.
4577         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4578         * pthread_cond_broadcast.c: ...here.
4579         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4580         * pthread_cond_signal.c: ...here.
4581         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4582         * pthread_cond_timedwait.c: ...here.
4583         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4584         * pthread_cond_wait.c: ...here.
4585         * sysdeps/pthread/pthread_once.c: Move to...
4586         * pthread_once.c: ...here.
4587         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4588         * pthread_rwlock_rdlock.c: ...here.
4589         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4590         * pthread_rwlock_timedrdlock.c: ...here.
4591         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4592         * pthread_rwlock_timedwrlock.c: ...here.
4593         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4594         * pthread_rwlock_unlock.c: ...here.
4595         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4596         * pthread_rwlock_wrlock.c: ...here.
4597         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4598         * pthread_spin_destroy.c: ...here.
4599         * sysdeps/pthread/pthread_spin_init.c: Move to...
4600         * pthread_spin_init.c: ...here.
4601         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4602         * pthread_spin_unlock.c: ...here.
4603         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4604         * pthread_getcpuclockid.c: ...here.
4606         * init.c: USE_TLS support is now always enabled.
4607         * tst-tls5.h: Likewise.
4608         * sysdeps/alpha/tls.h: Likewise.
4609         * sysdeps/i386/tls.h: Likewise.
4610         * sysdeps/ia64/tls.h: Likewise.
4611         * sysdeps/powerpc/tls.h: Likewise.
4612         * sysdeps/s390/tls.h: Likewise.
4613         * sysdeps/sh/tls.h: Likewise.
4614         * sysdeps/sparc/tls.h: Likewise.
4615         * sysdeps/x86_64/tls.h: Likewise.
4617 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4619         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4620         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4621         failed.
4623         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4624         Define to THREAD_SELF->header.multiple_threads.
4625         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4626         Likewise.
4627         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4628         Likewise.
4629         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4630         (SINGLE_THREAD_P): Likewise.
4631         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4632         (SINGLE_THREAD_P): Likewise.
4633         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4634         (SINGLE_THREAD_P): Likewise.
4635         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4636         (SINGLE_THREAD_P): Likewise.
4637         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4638         Likewise.
4639         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4640         (SINGLE_THREAD_P): Likewise.
4641         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4642         (SINGLE_THREAD_P): Likewise.
4643         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4644         Likewise.
4646 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4648         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4649         by default rather than 2_3_3.
4651 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4653         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4654         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4655         atomic_* instead of catomic_* macros.
4657 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4659         [BZ #3285]
4660         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4661         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4662         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4663         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4664         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4665         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4666         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4667         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4668         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4669         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4670         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4671         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4672         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4674 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4676         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4677         cancelable syscalls with six parameters.
4679         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4680         operations instead of atomic_*.
4682 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4684         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4686 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4688         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4689         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4690         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4691         New file.
4692         * pthread_attr_setstack.c: Allow overwriting the version number of the
4693         new symbol.
4694         * pthread_attr_setstacksize.c: Likewise.
4695         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4696         it.
4697         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4698         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4700 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4702         [BZ #3251]
4703         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4704         Patch by Petr Baudis.
4706 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4708         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4710         * tst-cancel2.c (tf): Loop as long as something was written.
4712 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4714         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4715         mutexes wake all mutexes.
4716         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4717         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4718         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4720 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4722         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4723         to guarantee the thread is always canceled.
4725 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4727         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4728         Include stdlib.h.
4729         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4730         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4731         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4735 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4737         [BZ #3123]
4738         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4739         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4743         * Makefile (tests): Add tst-cond22.
4744         * tst-cond22.c: New file.
4746 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4748         [BZ #3124]
4749         * descr.h (struct pthread): Add parent_cancelhandling.
4750         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4751         cancelhandling value to child.
4752         * pthread_create.c (start_thread): If parent thread was canceled
4753         reset the SIGCANCEL mask.
4754         * Makefile (tests): Add tst-cancel25.
4755         * tst-cancel25.c: New file.
4757 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4758             Ulrich Drepper  <drepper@redhat.com>
4760         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4761         counterp if it is already zero.
4762         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4764 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4765             Roland McGrath  <roland@redhat.com>
4767         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4768         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4769         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4770         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4771         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4772         lll_robust_mutex_timedlock, lll_mutex_unlock,
4773         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4774         Add _L_*_ symbols around the subsection.
4775         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4776         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4778 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4779             Roland McGrath  <roland@redhat.com>
4781         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4782         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4783         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4784         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4785         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4786         lll_robust_mutex_timedlock, lll_mutex_unlock,
4787         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4788         Add _L_*_ symbols around the subsection.
4789         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4790         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4792 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4794         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4795         change because it can disturb too much existing code.  If real hard
4796         reader preference is needed we'll introduce another type.
4797         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4798         (pthread_rwlock_timedwrlock): Likewise.
4799         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4800         Likewise.
4802 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4804         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4805         reader preference.
4806         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4807         (pthread_rwlock_timedwrlock): Likewise.
4808         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4809         Likewise.
4811 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4813         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4814         Only define ifdef SHARED.
4816 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4818         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4819         (free_stacks): ...here.
4820         (__free_stack_cache): New function.
4821         * pthreadP.h: Declare __free_stack_cache.
4822         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4823         ptr_freeres.
4824         * init.c (pthread_functions): Initialize ptr_freeres.
4825         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4826         New freeres function.
4828 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4830         [BZ #3018]
4831         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4833 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4835         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4836         _XOPEN_REALTIME_THREADS.
4838 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4840         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4841         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4842         HAVE_CLOCK_GETTIME_VSYSCALL.
4843         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4845 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4847         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4848         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4849         * descr.h (struct priority_protection_data): New type.
4850         (struct pthread): Add tpp field.
4851         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4852         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4853         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4854         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4855         TPP mutexes.
4856         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4857         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4858         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4859         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4860         * tpp.c: New file.
4861         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4862         boosted by TPP.
4863         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4864         * pthread_mutexattr_getprioceiling.c
4865         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4866         in the SCHED_FIFO priority range.
4867         * pthread_mutexattr_setprioceiling.c
4868         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4869         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4870         if mutex is not TPP.  Ceiling is now in __data.__lock.
4871         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4872         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4873         is now in __data.__lock.  Add locking.
4874         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4875         * Makefile (libpthread-routines): Add tpp.
4876         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4877         * tst-tpp.h: New file.
4878         * tst-mutexpp1.c: New file.
4879         * tst-mutexpp6.c: New file.
4880         * tst-mutexpp10.c: New file.
4881         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4882         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4884 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4886         [BZ #2843]
4887         * pthread_join.c (pthread_join): Account for self being canceled
4888         when checking for deadlocks.
4889         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4890         (tf1): Don't print anything after pthread_join returns, this would be
4891         another cancellation point.
4892         (tf2): Likewise.
4893         * tst-join6.c: New file.
4894         * Makefile (tests): Add tst-join6.
4896 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4898         [BZ #2892]
4899         * pthread_setspecific.c (__pthread_setspecific): Check
4900         out-of-range index before checking for unused key.
4902         * sysdeps/pthread/gai_misc.h: New file.
4904 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4906         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4907         file.  Don't use sysctl.
4908         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4909         overwrite the file if this is likely not true.
4911 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4913         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4914         * Makefile (tests): Add tst-getpid3.
4915         * tst-getpid3.c: New file.
4917 2006-07-30  Roland McGrath  <roland@redhat.com>
4919         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4921         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4922         (pause_not_cancel): New macro.
4923         (nanosleep_not_cancel): New macro.
4924         (sigsuspend_not_cancel): New macro.
4925         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4926         nanosleep_not_cancel macro from <not-cancel.h>.
4927         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4928         macro from <not-cancel.h>.
4930 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4931             Jakub Jelinek  <jakub@redhat.com>
4933         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4934         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4935         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4936         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4937         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4938         * pthread_mutex_lock.c: Likewise.
4939         * pthread_mutex_timedlock.c: Likewise.
4940         * pthread_mutex_trylock.c: Likewise.
4941         * pthread_mutex_unlock.c: Likewise.
4942         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4943         all mutexes.
4944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4946         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4947         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4948         pthread-pi-defines.sym.
4949         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4950         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4952         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4953         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4954         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4955         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4956         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4957         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4958         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4959         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4960         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4961         * tst-mutex2.c: Likewise.
4962         * tst-mutex3.c: Likewise.
4963         * tst-mutex4.c: Likewise.
4964         * tst-mutex5.c: Likewise.
4965         * tst-mutex6.c: Likewise.
4966         * tst-mutex7.c: Likewise.
4967         * tst-mutex7a.c: Likewise.
4968         * tst-mutex8.c: Likewise.
4969         * tst-mutex9.c: Likewise.
4970         * tst-robust1.c: Likewise.
4971         * tst-robust7.c: Likewise.
4972         * tst-robust8.c: Likewise.
4973         * tst-mutexpi1.c: New file.
4974         * tst-mutexpi2.c: New file.
4975         * tst-mutexpi3.c: New file.
4976         * tst-mutexpi4.c: New file.
4977         * tst-mutexpi5.c: New file.
4978         * tst-mutexpi6.c: New file.
4979         * tst-mutexpi7.c: New file.
4980         * tst-mutexpi7a.c: New file.
4981         * tst-mutexpi8.c: New file.
4982         * tst-mutexpi9.c: New file.
4983         * tst-robust1.c: New file.
4984         * tst-robust2.c: New file.
4985         * tst-robust3.c: New file.
4986         * tst-robust4.c: New file.
4987         * tst-robust5.c: New file.
4988         * tst-robust6.c: New file.
4989         * tst-robust7.c: New file.
4990         * tst-robust8.c: New file.
4991         * Makefile (tests): Add the new tests.
4993         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4994         * pthread_mutex_destroy.c: Remove unneeded label.
4996 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4998         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4999         computations to compile time.
5001 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
5003         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5005 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
5007         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5009 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
5011         * pthread_key_create.c (__pthread_key_create): Do away with
5012         __pthread_keys_lock.
5014         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5015         (__kernel_cpumask_size): Mark as hidden.
5016         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5018         * sem_open.c (__sem_mappings_lock): Mark as hidden.
5019         * semaphoreP.h (__sem_mappings_lock): Likewise.
5021 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
5023         * pthread_atfork.c: Mark __dso_handle as hidden.
5025 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
5027         [BZ #2644]
5028         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5029         the reload problem.  Change the one path in pthread_cancel_init
5030         which causes the problem.  Force gcc to reload.  Simplify callers.
5031         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5032         (_Unwind_GetBSP): Undo last patch.
5034 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
5036         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5037         function pointer is reloaded after pthread_cancel_init calls.
5039         [BZ #2644]
5040         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5041         pointers are reloaded after pthread_cancel_init calls.
5043 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
5045         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5046         __always_inline.
5048 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
5050         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5051         Allocate new object which is passed to timer_sigev_thread so that
5052         the timer can be deleted before the new thread is scheduled.
5054 2006-04-26  Roland McGrath  <roland@redhat.com>
5056         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5058 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
5060         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5061         suffix for conditional jumps.
5062         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5063         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5064         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5065         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5066         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5067         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5069         * init.c (sigcancel_handler): Compare with correct PID even if the
5070         thread is in the middle of a fork call.
5071         (sighandler_setxid): Likewise.
5072         Reported by Suzuki K P <suzuki@in.ibm.com> .
5074 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5076         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5078 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5080         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5081         fails [Coverity CID 105].
5083 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5085         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5087 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5089         [BZ #2505]
5090         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5091         Define __lll_rel_instr using lwsync.
5093 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5095         * allocatestack.c (allocate_stack): Always initialize robust_head.
5096         * descr.h: Define struct robust_list_head.
5097         (struct pthread): Use robust_list_head in robust mutex list definition.
5098         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5099         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5100         (__pthread_initialize_minimal_internal): Register robust_list with
5101         the kernel.
5102         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5103         Declare __set_robust_list_avail.
5104         * pthread_create.c (start_thread): Register robust_list of new thread.
5105         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5106         waiters.
5107         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5108         number of users, it's unreliable.
5109         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5110         set_robust_list syscall is available.
5111         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5112         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5113         Set robust_head.list_op_pending before trying to lock a robust mutex.
5114         * pthread_mutex_timedlock.c: Likewise.
5115         * pthread_mutex_trylock.c: Likewise.
5116         * pthread_mutex_unlock.c: Likewise for unlocking.
5117         * Makefile (tests): Add tst-robust8.
5118         * tst-robust8.c: New file.
5120 2006-03-08  Andreas Schwab  <schwab@suse.de>
5122         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5123         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5125 2006-03-05  Roland McGrath  <roland@redhat.com>
5127         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5128         and $config_os doesn't match *linux*.
5130 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5132         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5133         Use __syscall_error.
5134         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5135         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5136         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5137         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5138         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5139         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5141 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5143         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5145 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5147         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5148         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5149         mutex.
5150         (__lll_robust_timedlock_wait): Likewise.
5151         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5152         (__lll_robust_lock_wait): Likewise.
5153         (__lll_robust_timedlock_wait): Likewise.
5154         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5155         (__lll_robust_lock_wait): Likewise.
5156         (__lll_robust_timedlock_wait): Likewise.
5158 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5160         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5161         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5162         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5163         lll_robust_mutex_unlock): Define.
5164         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5166 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5168         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5169         instead of <clone.S>.
5171 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5173         * Makefile (libpthread-routines): Add
5174         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5175         and pthread_mutex_[sg]etprioceiling.
5176         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5177         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5178         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5179         pthread_mutex_setprioceiling.
5180         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5181         PTHREAD_PRIO_PROTECT): New enum values.
5182         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5183         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5184         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5185         prototypes.
5186         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5187         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5188         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5189         Define.
5190         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5191         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5192         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5193         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5194         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5195         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5196         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5197         protocol mutexes.
5198         * pthread_mutex_getprioceiling.c: New file.
5199         * pthread_mutex_setprioceiling.c: New file.
5200         * pthread_mutexattr_getprioceiling.c: New file.
5201         * pthread_mutexattr_setprioceiling.c: New file.
5202         * pthread_mutexattr_getprotocol.c: New file.
5203         * pthread_mutexattr_setprotocol.c: New file.
5205 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5207         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5209 2006-02-27  Roland McGrath  <roland@redhat.com>
5211         * sysdeps/pthread/Subdirs: List nptl here too.
5212         * configure (libc_add_on_canonical): New variable.
5214         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5216         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5217         self to get main source tree's file.
5218         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5219         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5220         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5221         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5222         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5223         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5224         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5225         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5226         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5227         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5228         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5229         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5230         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5232         * Makefile: Use $(sysdirs) in vpath directive.
5234         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5235         (CPPFLAGS-timer_routines.c): Likewise.
5237         * Makeconfig (includes): Variable removed.
5239 2006-02-26  Roland McGrath  <roland@redhat.com>
5241         * sysdeps/generic/pt-raise.c: Moved to ...
5242         * pt-raise.c: ... here.
5243         * sysdeps/generic/lowlevellock.h: Moved to ...
5244         * lowlevellock.h: ... here.
5246 2006-02-23  Roland McGrath  <roland@redhat.com>
5248         * descr.h (struct pthread): Add final member `end_padding'.
5249         (PTHREAD_STRUCT_END_PADDING): Use it.
5251 2006-02-20  Roland McGrath  <roland@redhat.com>
5253         * sysdeps/mips: Directory removed, saved in ports repository.
5254         * sysdeps/unix/sysv/linux/mips: Likewise.
5256 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5258         * tst-robust1.c: Add second mutex to check that the mutex list is
5259         handled correctly.
5261 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5263         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5264         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5265         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5266         lll_robust_mutex_unlock): New macros.
5267         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5268         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5269         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5271         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5273 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5275         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5276         definitions.
5277         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5279 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5281         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5282         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5283         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5284         (lll_robust_mutex_unlock): Likewise.
5286 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5288         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5289         Set robust_list.__next rather than robust_list.
5290         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5291         (__pthread_list_t): New typedef.
5292         (pthread_mutex_t): Replace __next and __prev fields with __list.
5293         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5294         (__pthread_list_t): New typedef.
5295         (pthread_mutex_t): Replace __next and __prev fields with __list.
5296         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5297         (__pthread_list_t, __pthread_slist_t): New typedefs.
5298         (pthread_mutex_t): Replace __next and __prev fields with __list.
5299         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5300         (__pthread_list_t, __pthread_slist_t): New typedefs.
5301         (pthread_mutex_t): Replace __next and __prev fields with __list.
5302         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5303         (__pthread_list_t, __pthread_slist_t): New typedefs.
5304         (pthread_mutex_t): Replace __next and __prev fields with __list.
5305         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5306         (__pthread_slist_t): New typedef.
5307         (pthread_mutex_t): Replace __next field with __list.
5309 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5311         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5312         PTHREAD_MUTEX_OWNERDEAD.
5313         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5314         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5315         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5316         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5317         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5318         to PTHREAD_MUTEX_INCONSISTENT.
5319         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5320         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5321         * pthread_mutex_trylock.c: Likewise.
5322         * pthread_mutex_timedlock.c: Likewise.
5323         * pthread_mutex_unlock.c: Likewise.
5324         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5325         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5326         lowlevelrobustlock.sym.
5327         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5328         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5329         definitions.
5330         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5331         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5332         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5333         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5334         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5336 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5338         * allocatestack.c (allocate_stack): Initialize robust_list.
5339         * init.c (__pthread_initialize_minimal_internal): Likewise.
5340         * descr.h (struct xid_command): Pretty printing.
5341         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5342         robust_list.  Adjust macros.
5343         * pthread_create.c (start_thread): Adjust robust_list handling.
5344         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5345         but the owner for all robust mutex types.
5346         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5347         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5349         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5351         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5352         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5354 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5356         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5357         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5359 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5361         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5362         Return status.
5363         (lll_futex_timed_wait): Define.
5365 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5367         * tst-cancel4.c: Test ppoll.
5369 2006-01-18  Andreas Jaeger  <aj@suse.de>
5371         [BZ #2167]
5372         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5373         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5374         by Jim Gifford <patches@jg555.com>.
5376 2006-01-13  Richard Henderson  <rth@redhat.com>
5378         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5380 2006-01-10  Roland McGrath  <roland@redhat.com>
5382         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5383         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5384         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5385         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5386         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5387         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5388         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5389         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5390         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5391         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5393 2006-01-09  Roland McGrath  <roland@redhat.com>
5395         * tst-initializers1-c89.c: New file.
5396         * tst-initializers1-c99.c: New file.
5397         * tst-initializers1-gnu89.c: New file.
5398         * tst-initializers1-gnu99.c: New file.
5399         * Makefile (tests): Add them.
5400         (CFLAGS-tst-initializers1-c89.c): New variable.
5401         (CFLAGS-tst-initializers1-c99.c): New variable.
5402         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5403         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5405         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5406         Use __extension__ on anonymous union definition.
5407         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5408         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5409         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5410         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5411         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5413 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5415         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5416         Don't give the union a name because it changes the mangled name.
5417         Instead name the struct for __data.
5418         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5419         Likewise.
5420         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5421         Likewise.
5423 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5425         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5426         stack bias to mc_ftp field.
5428 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5430         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5431         being too clever and reloading the futex value where it shouldn't.
5433 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5435         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5436         correct type.
5438 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5440         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5441         Add cfi directives.
5443 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5445         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5446         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5447         rename in tcbhead_t.
5449         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5450         Don't give the union a name because it changes the mangled name.
5451         Instead name the struct for __data.
5452         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5453         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5454         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5455         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5456         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5457         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5459 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5461         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5462         Return status.
5463         (lll_futex_timed_wait): Define.
5464         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5465         * sysdeps/pthread/aio_misc.h: New file.
5467 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5469         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5471 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5473         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5474         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5475         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5477 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5479         * tst-cancel24.cc: Use C headers instead of C++ headers.
5481 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5483         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5484         sparc-linux configured glibc.
5485         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5486         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5487         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5488         atomic_compare_and_exchange_val_24_acq instead of
5489         atomic_compare_and_exchange_val_acq.
5490         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5491         instead of atomic_exchange_rel.
5492         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5493         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5494         file.
5495         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5496         file.
5497         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5498         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5499         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5500         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5501         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5502         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5503         New file.
5504         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5505         New file.
5506         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5507         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5508         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5509         file.
5510         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5511         file.
5512         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5514 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5516         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5517         mutex initializers.
5519 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5521         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5522         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5523         THREAD_COPY_POINTER_GUARD): Define.
5524         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5525         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5527 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5529         * version.c: Update copyright year.
5531 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5533         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5534         .eh_frame section, use cfi_* directives.
5535         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5537 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5539         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5540         now.
5542 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5544         * sysdeps/pthread/sigaction.c: Removed.
5545         * sigaction.c: New file.
5546         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5548 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5550         * Makefile (tests): Add tst-signal7.
5551         * tst-signal7.c: New file.
5553 2005-12-27  Roland McGrath  <roland@redhat.com>
5555         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5556         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5557         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5558         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5559         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5560         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5561         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5562         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5563         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5564         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5565         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5567 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5569         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5570         and __prev field to pthread_mutex_t.
5571         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5572         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5573         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5574         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5576         to pthread_mutex_t.
5578 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5580         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5581         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5582         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5583         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5584         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5585         and PTHREAD_MUTEXATTR_FLAG_BITS.
5586         * descr.h (struct pthread): Add robust_list field and define
5587         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5588         * pthread_mutexattr_getrobust.c: New file.
5589         * pthread_mutexattr_setrobust.c: New file.
5590         * pthread_mutex_consistent.c: New file.
5591         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5592         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5593         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5594         Adjust pthread_mutex_t initializers.
5595         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5596         field to pthread_mutex_t.
5597         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5598         and __prev field to pthread_mutex_t.
5599         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5600         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5601         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5602         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5603         * pthread_mutexattr_gettype.c: Likewise.
5604         * pthread_mutexattr_setpshared.c: Likewise.
5605         * pthread_mutexattr_settype.c: Likewise.
5606         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5607         Initialize mutex kind according to robust flag.
5608         * pthread_mutex_lock.c: Implement local robust mutex.
5609         * pthread_mutex_timedlock.c: Likewise.
5610         * pthread_mutex_trylock.c: Likewise.
5611         * pthread_mutex_unlock.c: Likewise.
5612         * pthread_create.c (start_thread): Mark robust mutexes which remained
5613         locked as dead.
5614         * tst-robust1.c: New file.
5615         * tst-robust2.c: New file.
5616         * tst-robust3.c: New file.
5617         * tst-robust4.c: New file.
5618         * tst-robust5.c: New file.
5619         * tst-robust6.c: New file.
5620         * tst-robust7.c: New file.
5621         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5622         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5623         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5624         tst-robust5, tst-robust6, and tst-robust7.
5626         * tst-typesizes.c: New file.
5627         * Makefile (tests): Add tst-typesizes.
5629         * tst-once3.c: More debug output.
5631 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5633         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5634         missing after last change.
5636         * version.c: Update copyright year.
5638 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5640         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5641         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5642         * pthread_mutex_trylock.c: Likewise.
5643         * pthread_mutex_timedlock.c: Likewise.
5644         * pthread_mutex_unlock.c: Likewise.
5646 2005-12-22  Roland McGrath  <roland@redhat.com>
5648         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5649         so that #include_next's search location is not reset to the -I..
5650         directory where <nptl/...> can be found.
5652 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5654         [BZ #1913]
5655         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5656         Fix unwind info.  Remove useless branch prediction prefix.
5657         * tst-cancel24.cc: New file.
5658         * Makefile: Add rules to build and run tst-cancel24.
5660 2005-12-21  Roland McGrath  <roland@redhat.com>
5662         * libc-cancellation.c: Use <> rather than "" #includes.
5663         * pt-cleanup.c: Likewise.
5664         * pthread_create.c: Likewise.
5665         * pthread_join.c: Likewise.
5666         * pthread_timedjoin.c: Likewise.
5667         * pthread_tryjoin.c: Likewise.
5668         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5669         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5670         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5671         * unwind.c: Likewise.
5673 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5675         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5676         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5677         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5678         THREAD_COPY_POINTER_GUARD): Define.
5680 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5682         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5683         rather than one.
5684         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5685         THREAD_COPY_POINTER_GUARD): Define.
5686         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5687         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5688         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5689         THREAD_COPY_POINTER_GUARD): Define.
5690         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5691         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5692         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5693         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5694         Use PTR_DEMANGLE for B0 if defined.
5696 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5698         * pthread_create.c (__pthread_create_2_1): Use
5699         THREAD_COPY_POINTER_GUARD if available.
5700         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5701         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5702         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5703         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5704         * sysdeps/x86_64/tls.h: Likewise.
5706 2005-12-15  Roland McGrath  <roland@redhat.com>
5708         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5710 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5712         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5713         sysdeps/generic.
5714         * errno-loc.c: New file.
5716 2005-12-12  Roland McGrath  <roland@redhat.com>
5718         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5719         adjustments before choosing stack size.  Update minimum stack size
5720         calculation to match allocate_stack change.
5722 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5724         * allocatestack.c (allocate_stack): Don't demand that there is an
5725         additional full page available on the stack beside guard, TLS, the
5726         minimum stack.
5728 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5730         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5731         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5733         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5734         compiling 32-bit code we must define __cleanup_fct_attribute.
5736 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5738         [BZ #1920]
5739         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5740         __attribute__ instead of __attribute.
5741         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5742         (__cleanup_fct_attribute): Likewise.
5744 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5746         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5747         a write barrier before writing libgcc_s_getcfa.
5749 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5751         * sysdeps/unix/sysv/linux/configure: Removed.
5753 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5755         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5756         optional init_array/fini_array support.
5758 2005-10-24  Roland McGrath  <roland@redhat.com>
5760         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5761         versioned_symbol use.
5763 2005-10-16  Roland McGrath  <roland@redhat.com>
5765         * init.c (__pthread_initialize_minimal_internal): Even when using a
5766         compile-time default stack size, apply the minimum that allocate_stack
5767         will require, and round up to page size.
5769 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5771         * Makefile ($(test-modules)): Remove static pattern rule.
5773 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5774             Ulrich Drepper  <drepper@redhat.com>
5776         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5777         alignment in callback function.
5778         * Makefile: Add rules to build and run tst-align3.
5779         * tst-align3.c: New file.
5781 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5783         * allocatestack.c (setxid_signal_thread): Add
5784         INTERNAL_SYSCALL_DECL (err).
5786 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5788         * allocatestack.c (setxid_signal_thread): Need to use
5789         atomic_compare_and_exchange_bool_acq.
5791 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5792             Jakub Jelinek  <jakub@redhat.com>
5794         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5795         CANCEL_RESTMASK.
5796         (struct pthread): Move specific_used field to avoid padding.
5797         Add setxid_futex field.
5798         * init.c (sighandler_setxid): Reset setxid flag and release the
5799         setxid futex.
5800         * allocatestack.c (setxid_signal_thread): New function.  Broken
5801         out of the bodies of the two loops in __nptl_setxid.  For undetached
5802         threads check whether they are exiting and if yes, don't send a signal.
5803         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5804         * pthread_create.c (start_thread): For undetached threads, check
5805         whether setxid bit is set.  If yes, wait until signal has been
5806         processed.
5808         * allocatestack.c (STACK_VARIABLES): Initialize them.
5809         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5811 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5813         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5814         waiters, awake all waiters on the associated mutex.
5816 2005-09-22  Roland McGrath  <roland@redhat.com>
5818         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5819         ../sysdeps/x86_64/hp-timing.h).
5821 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5823         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5824         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5825         (lll_futex_wake_unlock): Define.
5826         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5827         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5828         (lll_futex_wake_unlock): Define.
5829         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5830         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5831         (lll_futex_wake_unlock): Define.
5832         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5833         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5834         (lll_futex_wake_unlock): Define.
5835         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5836         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5837         (lll_futex_wake_unlock): Define.
5838         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5839         lll_futex_wake_unlock.
5840         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5841         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5842         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5844         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5845         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5847 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5849         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5850         Fix typo in register name.
5852 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5854         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5855         Use __sigfillset.  Document that sigfillset does the right thing wrt
5856         to SIGSETXID.
5858 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5860         [BZ #1102]
5861         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5862         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5863         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5864         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5865         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5866         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5867         in the structure.
5868         * Makefile (tests): Add tst-initializers1.
5869         (CFLAGS-tst-initializers1.c): Set.
5870         * tst-initializers1.c: New test.
5872 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5874         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5875         Make sure __flags are located at offset 48 from the start of the
5876         structure.
5878 2005-07-02  Roland McGrath  <roland@redhat.com>
5880         * Makeconfig: Comment fix.
5882 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5884         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5885         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5886         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5887         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5888         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5889         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5890         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5891         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5892         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5893         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5895 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5897         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5898         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5899         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5900         fields.
5901         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5902         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5903         field.  Put in sysinfo field unconditionally.
5904         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5905         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5906         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5907         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5908         fields.
5909         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5910         * pthread_create.c (__pthread_create_2_1): Use
5911         THREAD_COPY_STACK_GUARD macro.
5912         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5913         tests.
5914         * tst-stackguard1.c: New file.
5915         * tst-stackguard1-static.c: New file.
5917 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5919         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5920         Invoke CGOTSETUP and CGOTRESTORE.
5921         (CGOTSETUP, CGOTRESTORE): Define.
5923 2005-05-29  Richard Henderson  <rth@redhat.com>
5925         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5926         (tf_write, tf_writev): Use it.
5927         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5928         the system minimum.
5930 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5932         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5933         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5934         __librt_*_asynccancel@local.
5936 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5938         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5939         all occurrences of JUMPTARGET.  Instead append @local to labels.
5941 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5943         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5944         size/alignment of struct pthread rather than tcbhead_t.
5945         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5946         Likewise.
5947         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5948         Likewise.
5949         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5950         Likewise.
5952 2005-05-19  Richard Henderson  <rth@redhat.com>
5954         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5955         __sync_val_compare_and_swap, not explicit _si variant.
5956         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5958 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5960         [BZ #915]
5961         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5963 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5965         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5966         .eh_frame section, use cfi_* directives.
5968 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5970         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5971         of "" includes.
5973 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5975         [BZ #1075]
5976         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5977         aio_write blocks.
5979 2005-04-27  Roland McGrath  <roland@redhat.com>
5981         * Makefile (tests): Remove tst-clock2.
5983         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5984         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5985         translating to the kernel clockid_t for our own process/thread clock.
5987         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5989 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5991         * old_pthread_cond_init.c: Include <errno.h>.
5992         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5993         process shared or uses clock other than CLOCK_REALTIME.
5994         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5996 2005-04-13  David S. Miller  <davem@davemloft.net>
5998         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5999         * sysdeps/sparc/sparc64/clone.S: New file.
6001 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
6003         [BZ #1102]
6004         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6005         __inline instead of inline.
6006         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6008 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
6010         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6011         functionally equivalent, but shorter instructions.
6012         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6013         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6014         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6015         Likewise.
6016         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6017         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6018         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6019         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6021         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6022         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6023         Likewise.
6024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6025         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6026         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6027         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6028         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6030 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
6032         * sysdeps/mips/Makefile: New file.
6033         * sysdeps/mips/nptl-sysdep.S: New file.
6034         * sysdeps/mips/tcb-offsets.sym: New file.
6035         * sysdeps/mips/pthread_spin_lock.S: New file.
6036         * sysdeps/mips/pthread_spin_trylock.S: New file.
6037         * sysdeps/mips/pthreaddef.h: New file.
6038         * sysdeps/mips/tls.h: New file.
6039         * sysdeps/mips/jmpbuf-unwind.h: New file.
6040         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6041         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6042         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6043         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6044         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6045         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6046         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6047         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6048         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6049         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6051 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
6053         [BZ #1112]
6054         * pthread_create.c (__pthread_create_2_1): Rename syscall error
6055         variable to scerr.
6057 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6059         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6061 2005-02-25  Roland McGrath  <roland@redhat.com>
6063         * alloca_cutoff.c: Correct license text.
6064         * tst-unload.c: Likewise.
6065         * sysdeps/pthread/allocalim.h: Likewise.
6066         * sysdeps/pthread/pt-initfini.c: Likewise.
6067         * sysdeps/pthread/bits/libc-lock.h: Likewise.
6068         * sysdeps/pthread/bits/sigthread.h: Likewise.
6069         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6070         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6072 2005-02-16  Roland McGrath  <roland@redhat.com>
6074         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6075         Use unsigned int * for ptr_nthreads.
6077 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6079         [BZ #721]
6080         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6081         gcc4.
6083 2005-02-07  Richard Henderson  <rth@redhat.com>
6085         [BZ #787]
6086         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6087         argument.
6089 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6091         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6092         order of arguments in invocation of atomic_add_zero.
6094 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6096         [BZ #737]
6097         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6098         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6099         at least gotntpoff relocation and addition.
6100         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6101         Likewise.
6102         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6103         Likewise.
6104         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6105         Likewise.
6107 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6109         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6110         entry for static tls deallocation fix.
6111         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6112         also contains information whether the memory pointed to is static
6113         TLS or not.
6114         * sysdeps/i386/tls.h: Likewise.
6115         * sysdeps/ia64/tls.h: Likewise.
6116         * sysdeps/powerpc/tls.h: Likewise.
6117         * sysdeps/s390/tls.h: Likewise.
6118         * sysdeps/sh/tls.h: Likewise.
6119         * sysdeps/sparc/tls.h: Likewise.
6120         * sysdeps/x86_64/tls.h: Likewise.
6122 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6124         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6126 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6128         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6129         %esp.
6130         * Makefile (tests): Add tst-align2.
6131         * tst-align2.c: New test.
6132         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6133         -mpreferred-stack-boundary=4.
6135 2004-12-18  Roland McGrath  <roland@redhat.com>
6137         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6138         New file removed withdrawn for the moment.
6140 2004-12-17  Richard Henderson  <rth@redhat.com>
6142         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6143         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6145 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6147         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6148         Increased PTHREAD_STACK_MIN.
6150         * tst-context1.c (stacks): Use bigger stack size.
6152 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6154         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6155         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6157 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6159         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6160         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6161         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6163 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6165         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6167 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6169         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6170         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6172         * tst-getpid1.c: If child crashes, report this first.  Print which
6173         signal.
6175 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6177         * init.c (__pthread_initialize_minimal_internal): Also unblock
6178         SIGSETXID.
6180 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6182         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6183         _POSIX_THREAD_CPUTIME): Define to 0.
6184         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6185         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6186         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6187         __timer_signal_thread_tclk): Remove.
6188         (init_module): Remove their initialization.
6189         (thread_cleanup): Remove their cleanup assertions.
6190         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6191         __timer_signal_thread_tclk): Remove.
6192         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6193         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6194         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6196 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6198         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6199         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6201         * Makefile (tests): Add tst-getpid2.
6202         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6203         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6204         * tst-getpid2.c: New test.
6206 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6208         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6210 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6212         * Makefile (tests): Add tst-getpid1.
6213         * tst-getpid1.c: New file.
6214         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6215         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6217 2004-12-02  Roland McGrath  <roland@redhat.com>
6219         * Makefile (libpthread-nonshared): Variable removed.
6220         ($(objpfx)libpthread_nonshared.a): Target removed.
6221         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6222         These are now handled by generic magic from
6223         libpthread-static-only-routines being set.
6225 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6227         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6228         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6229         _POSIX_THREAD_PRIO_PROTECT): Define.
6230         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6231         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6232         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6234 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6236         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6237         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6238         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6239         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6240         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6241         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6242         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6244 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6246         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6248         * Makefile (libpthread-routines): Add pthread_setschedprio.
6249         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6250         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6251         * pthread_setschedprio.c: New file.
6253 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6255         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6256         * pthread_cancel.c (pthread_create): Likewise.
6258         * Makefile (libpthread-routines): Add vars.
6259         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6260         * init.c (__default_stacksize, __is_smp): Remove.
6261         * vars.c: New file.
6262         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6263         and define a wrapper macro.
6264         (PTHREAD_STATIC_FN_REQUIRE): Define.
6265         * allocatestack.c (__find_thread_by_id): Undefine.
6266         * pthread_create (__pthread_keys): Remove.
6267         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6268         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6269         PTHREAD_STATIC_FN_REQUIRE.
6271 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6273         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6274         parameter to REGISTER macro.
6276 2004-11-17  Roland McGrath  <roland@redhat.com>
6278         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6279         Make sure SIGCANCEL is blocked as well.
6281 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6283         * sysdeps/pthread/setxid.h: New file.
6284         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6285         (struct xid_command): Add forward decl.
6286         (struct pthread_functions): Change return type of __nptl_setxid hook
6287         to int.
6288         * pthreadP.h (__nptl_setxid): Change return type to int.
6289         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6290         calling thread, return its return value and set errno on failure.
6291         * descr.h (struct xid_command): Change id type to long array.
6293         * Makefile: Add rules to build and test tst-setuid1 and
6294         tst-setuid1-static.
6295         * tst-setuid1.c: New test.
6296         * tst-setuid1-static.c: New test.
6298 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6300         * Makefile (tests): Add tst-exit3.
6301         * tst-exit3.c: New test.
6303 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6305         * Makefile (tests): Add tst-exit2.
6306         * tst-exit2.c: New file.
6308 2004-11-09  Roland McGrath  <roland@redhat.com>
6310         [BZ #530]
6311         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6312         here, before calling clone.
6313         * pthread_create.c (start_thread): Don't do it here.
6315 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6317         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6319 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6321         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6322         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6323         assembler warning.
6325 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6327         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6328         if sched_priority is not between minprio and maxprio.
6330 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6332         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6333         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6335         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6336         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6338 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6340         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6341         not-cancelable I/O functions.
6343 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6345         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6346         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6347         make sure 2 is stored in the futex and we looked at the old value.
6348         Fix a few other problems to return the correct value.
6350 2004-10-14  Richard Henderson  <rth@redhat.com>
6352         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6353         make gcc4 happy.
6355 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6357         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6358         of pthread-functions.h and pthreaddef.h.
6359         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6361         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6362         Change __data.__nwaiters from int to unsigned int.
6364         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6365         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6367         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6368         before return type.
6370         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6371         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6373 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6375         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6376         test fails, remove message queue.
6377         (tf_msgsnd): Likewise.
6379 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6381         * tst-clock1.c: Change #ifdef to #if defined.
6382         * tst-clock2.c: Likewise.
6383         * tst-cond11.c: Likewise.
6385         * sysdeps/pthread/timer_create.c (timer_create): Use
6386         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6387         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6388         THREAD_CPUTIME.
6390 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6392         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6393         _POSIX_THREAD_CPUTIME): Define to 0.
6395 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6397         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6398         and _POSIX_THREAD_CPUTIME to zero.
6399         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6400         * tst-barrier2.c: Fix testing for POSIX feature.
6401         * tst-clock1.c: Likewise.
6402         * tst-clock2.c: Likewise.
6403         * tst-cond11.c: Likewise.
6404         * tst-cond4.c: Likewise.
6405         * tst-cond6.c: Likewise.
6406         * tst-flock2.c: Likewise.
6407         * tst-mutex4.c: Likewise.
6408         * tst-mutex9.c: Likewise.
6409         * tst-rwlock12.c: Likewise.
6410         * tst-rwlock4.c: Likewise.
6411         * tst-signal1.c: Likewise.
6412         * tst-spin2.c: Likewise.
6413         * sysdeps/pthread/posix-timer.h: Likewise.
6414         * sysdeps/pthread/timer_create.c: Likewise.
6415         * sysdeps/pthread/timer_routines.c: Likewise.
6417 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6419         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6420         (__lll_mutex_timedlock_wait): Address futex correctly.
6422         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6423         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6424         make sure 2 is stored in the futex and we looked at the old value.
6425         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6426         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6427         which might very well made the code not working at all before.
6428         [BZ #417]
6430 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6432         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6433         allow SIGSETXID to be sent.
6434         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6435         for SIGSETXID to be defined.
6436         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6437         SIGSETXID cannot be blocked.
6439         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6440         Add __extension__ to long long types.
6441         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6442         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6443         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6444         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6445         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6446         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6447         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6449 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6451         * descr.h (struct pthread): Add stopped_start field.
6452         * sysdeps/pthread/createthread.c (create_thread): Set
6453         start_stopped flag in descriptor for new thread appropriately.
6454         * pthread_create.c (start_thread): Only take lock to be stopped on
6455         startup if stopped_start flag says so.
6457 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6459         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6460         is created detached and if yes, do not try to free the stack in case
6461         the thread creation failed.
6462         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6463         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6464         case there has been no error.  [BZ #405]
6466         * pthread_create.c (start_thread): Don't wait for scheduler data
6467         etc to be set at the beginning of the function.  The cancellation
6468         infrastructure must have been set up.  And enable async
6469         cancellation before potentially going to sleep.  [BZ #401]
6471 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6473         * Versions: Remove exports for pthread_set*id_np functions.
6474         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6475         for now.
6476         * Makefile: Don't build pthread_set*id code for now.
6478 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6480         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6481         internal use.
6482         * allocatestack.c (__nptl_setxid): New function.
6483         * descr.h (struct xid_command): Define type.
6484         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6485         (sighandler_setxid): New function.
6486         (__pthread_initialize_minimal): Register sighandler_setxid for
6487         SIGCANCEL.
6488         * pt-allocrtsig.c: Update comment.
6489         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6490         Declare __nptl_setxid.
6491         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6492         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6493         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6494         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6495         and pthread_setresuid_np.
6496         * pthread_setgid_np.c: New file.
6497         * pthread_setuid_np.c: New file.
6498         * pthread_setegid_np.c: New file.
6499         * pthread_seteuid_np.c: New file.
6500         * pthread_setregid_np.c: New file.
6501         * pthread_setreuid_np.c: New file.
6502         * pthread_setresgid_np.c: New file.
6503         * pthread_setresuid_np.c: New file.
6504         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6505         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6506         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6507         and pthread_setresuid_np.
6508         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6509         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6510         pthread_setregid, and pthread_setresgid.
6512 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6514         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6515         ENOMEM when out of memory.
6517 2004-09-10  Roland McGrath  <roland@redhat.com>
6519         [BZ #379]
6520         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6521         code, since we don't try to use the broken CLONE_STOPPED any more.
6522         * pthread_create.c (start_thread): Likewise.
6524 2004-09-15  Richard Henderson  <rth@redhat.com>
6526         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6528 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6530         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6531         (__libc_unwind_longjmp): Delete macro and declare as function.
6532         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6533         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6534         nptl directory.
6535         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6536         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6537         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6539 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6541         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6542         for __USE_XOPEN2K.
6543         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6544         types also for __USE_XOPEN2K.
6545         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6546         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6547         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6548         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6549         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6550         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6551         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6552         [BZ #320]
6554 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/pthread/pthread.h
6557         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6558         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6559         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6560         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6561         [BZ #375]
6563 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6565         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6566         PSEUDO to be used with . prefix.
6568         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6569         Use atomic_increment instead of atomic_exchange_and_add.
6570         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6571         Likewise.
6572         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6573         Likewise.
6574         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6575         Likewise.
6577         * allocatestack.c (allocate_stack): Use atomic_increment_val
6578         instead of atomic_exchange_and_add.
6579         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6580         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6581         Likewise.
6582         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6583         Likewise.
6585         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6586         the initialization function might throw.
6588 2005-09-05  Richard Henderson  <rth@redhat.com>
6590         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6591         Move definition inside libpthread, libc, librt check.  Provide
6592         definition for rtld.
6594 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6596         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6597         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6598         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6599         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6600         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6601         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6602         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6603         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6604         * unwind.c: Use it.
6606         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6607         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6608         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6609         Likewise.
6610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6611         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6612         this is the last waiter, signal pthread_cond_destroy caller and
6613         avoid using the pthread_cond_t structure after unlock.
6614         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6615         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6616         Read clock type from the least significant bits of __nwaiters instead
6617         of __clock.
6618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6619         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6621 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6623         [BZ #342]
6624         * Makefile (tests): Add tst-cond20 and tst-cond21.
6625         * tst-cond20.c: New test.
6626         * tst-cond21.c: New test.
6627         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6628         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6629         it unsigned int.
6630         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6631         Likewise.
6632         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6633         (pthread_cond_t): Likewise.
6634         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6635         Likewise.
6636         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6637         Likewise.
6638         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6639         Likewise.
6640         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6641         (cond_nwaiters): New.
6642         (clock_bits): New.
6643         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6644         if there are waiters not signalled yet.
6645         Wait until all already signalled waiters wake up.
6646         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6647         __nwaiters.  If pthread_cond_destroy has been called and this is the
6648         last waiter, signal pthread_cond_destroy caller and avoid using
6649         the pthread_cond_t structure after unlock.
6650         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6651         decrement it when leaving.  If pthread_cond_destroy has been called
6652         and this is the last waiter, signal pthread_cond_destroy caller.
6653         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6654         Likewise.  Read clock type from the least significant bits of
6655         __nwaiters instead of __clock.
6656         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6657         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6658         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6659         clock type just from the last COND_CLOCK_BITS bits of value.
6660         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6661         instead of __clock, just from second bit of condattr's value.
6663 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6665         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6666         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6667         != 64.
6668         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6670 2004-08-15  Roland McGrath  <roland@frob.com>
6672         * pthread_atfork.c: Update copyright terms including special exception
6673         for these trivial files, which are statically linked into executables
6674         that use dynamic linking for the significant library code.
6676 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6678         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6679         pthread_rwlock_rdlock.
6680         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6681         Decrease __nr_readers_queued after reacquiring lock.
6682         * sysdeps/pthread/pthread_rwlock_timedrdlock
6683         (pthread_rwlock_timedrdlock): Likewise.
6684         Reported by Bob Cook <bobcook47@hotmail.com>.
6686 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6688         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6689         before pthread_barrier_wait.
6691 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6693         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6694         Remove unnecessary exception handling data.
6696 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6698         [BZ #284]
6699         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6700         instead of clockid_t.
6702 2004-07-21  Roland McGrath  <roland@redhat.com>
6704         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6706 2004-07-19  Roland McGrath  <roland@redhat.com>
6708         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6710 2004-07-02  Roland McGrath  <roland@redhat.com>
6712         * configure: Don't exit.
6714 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6716         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6717         (__pthread_cond_timedwait): Check for invalid nanosecond in
6718         timeout value.
6720 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6722         * Makefile: Add rules to build and run tst-fini1.
6723         * tst-fini1.c: New file.
6724         * tst-fini1mod.c: New file.
6726 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6728         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6729         if no cancellation support is needed.
6730         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6731         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6732         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6733         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6734         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6735         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6736         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6737         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6738         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6740         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6741         only if not already defined.
6743 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6745         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6746         constraint "m" instead of "0" for futex.
6748         * shlib-versions: Add powerpc64-.*-linux.*.
6750 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6752         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6753         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6754         for valid tv_nsec.
6755         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6756         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6757         bits.
6759 2004-06-29  Roland McGrath  <roland@redhat.com>
6761         * Banner: NPTL no longer has its own version number.
6762         * Makefile (nptl-version): Variable removed.
6763         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6764         using $(version), the glibc version number.
6766 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6768         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6769         Fix branch offset for a PLT entry.
6770         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6771         Likewise.
6772         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6773         Likewise.
6774         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6775         Likewise.
6776         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6777         Likewise.
6779 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6781         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6782         unconditionally.
6784 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6786         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6787         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6788         instead of tv_sec.
6789         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6790         (pthread_rwlock_timedrdlock): Likewise.
6792 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6794         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6795         Set __r7 to val, not mutex.
6797 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6799         * Makefile: Add rules to build tst-rwlock14.
6800         * tst-rwlock14.c: New file.
6802 2004-06-24  Boris Hu  <boris.hu@intel.com>
6804         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6805         check.
6806         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6808 2004-06-19  Andreas Jaeger  <aj@suse.de>
6810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6811         assembler in last patch.
6813 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6815         * sysdeps/pthread/pthread_cond_timedwait.c
6816         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6818         (__pthread_cond_timedwait): Check for invalid nanosecond in
6819         timeout value.
6820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6821         * tst-cond19.c: New file.
6822         * Makefile: Add rules to build and run tst-cond19.
6824 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6826         * tst-context1.c (GUARD_PATTERN): Defined.
6827         (tst_context_t): Define struct containing ucontext_t & guard words.
6828         (ctx): Declare as an array of tst_context_t.
6829         (fct): Verify uc_link & guard words are still valid.
6830         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6832 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6834         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6835         Add __data.__futex field, reshuffle __data.__clock.
6836         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6837         (__pthread_cond_signal): Increment __futex at the same time as
6838         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6839         address of low 32-bits of __wakeup_seq to futex syscall.
6840         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6841         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6842         releasing internal lock to FUTEX_WAIT.
6843         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6844         (__pthread_cond_timedwait): Likewise.
6845         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6846         (FUTEX_CMP_REQUEUE): Define.
6847         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6848         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6849         Pass __futex value from before the unlock and __futex address instead
6850         of address of low 32-bits of __wakeup_seq to futex syscall.
6851         Fallback to FUTEX_WAKE all on any errors.
6853 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6855         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6856         comment typo.
6857         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6858         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6859         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6860         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6861         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6863 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6865         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6866         Add memory clobber to inline assembly.
6867         (__lll_mutex_trylock): Likewise.
6868         (__lll_mutex_cond_trylock): Likewise.
6870 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6872         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6873         Pass val argument as 6th system call argument in %r7.
6875 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6877         * Makefile (tests): Add tst-cond16.
6878         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6879         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6880         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6881         Add __data.__futex field, reshuffle __data.__clock.
6882         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6883         (__pthread_cond_signal): Increment __futex at the same time as
6884         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6885         address of low 32-bits of __wakeup_seq to futex syscall.
6886         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6887         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6888         releasing internal lock to FUTEX_WAIT.
6889         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6890         (__pthread_cond_timedwait): Likewise.
6891         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6892         (FUTEX_CMP_REQUEUE): Define.
6893         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6894         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6895         Pass __futex value from before the unlock and __futex address instead
6896         of address of low 32-bits of __wakeup_seq to futex syscall.
6897         Fallback to FUTEX_WAKE all on any errors.
6898         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6899         Define.
6900         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6901         internally.  Return non-zero if error, zero if success.
6902         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6903         Add __data.__futex field, reshuffle __data.__clock.
6904         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6905         Define.
6906         (lll_futex_requeue): Add val argument, return 1 unconditionally
6907         for the time being.
6908         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6909         Add __data.__futex field, reshuffle __data.__clock.
6910         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6911         Define.
6912         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6913         internally.  Return non-zero if error, zero if success.
6914         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6915         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6916         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6917         Define.
6918         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6919         internally.  Return non-zero if error, zero if success.
6920         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6921         Add __data.__futex field, reshuffle __data.__clock.
6922         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6923         Define.
6924         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6925         internally.  Return non-zero if error, zero if success.
6926         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6927         Add __data.__futex field, reshuffle __data.__clock.
6928         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6929         Add __data.__futex field, reshuffle __data.__clock.
6930         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6931         Increment __futex at the same time as __wakeup_seq or __total_seq.
6932         Pass address of __futex instead of address of low 32-bits of
6933         __wakeup_seq to futex syscall.
6934         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6935         Pass __futex value from before releasing internal lock
6936         to FUTEX_WAIT.
6937         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6938         Likewise.  Avoid unnecessary shadowing of variables.
6939         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6940         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6941         unlock and __futex address instead of address of low 32-bits of
6942         __wakeup_seq to futex_requeue macro, adjust for new return value
6943         meaning.
6944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6945         (__pthread_cond_signal): Increment __futex at the same time as
6946         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6947         address of low 32-bits of __wakeup_seq to futex syscall.
6948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6949         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6950         releasing internal lock to FUTEX_WAIT.
6951         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6952         (__pthread_cond_timedwait): Likewise.
6953         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6954         (FUTEX_CMP_REQUEUE): Define.
6955         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6956         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6957         Pass __futex value from before the unlock and __futex address instead
6958         of address of low 32-bits of __wakeup_seq to futex syscall.
6959         Fallback to FUTEX_WAKE all on any errors.
6961 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6963         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6964         Add nop to align the end of critical section.
6965         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6967 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6969         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6970         Add __broadcast_seq field.
6971         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6972         all waiters as woken with woken_seq and bump broadcast counter.
6973         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6974         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6975         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6976         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6978 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6981         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6982         Reported by Kaz Kojima.
6984 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6986         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6988 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6990         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6991         __broadcast_seq with bc_seq after acquiring internal lock instead of
6992         before it.
6994 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6996         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6997         compilation.
6998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6999         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7000         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7001         (pthread_cond_t): Add __data.__broadcast_seq field.
7002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7003         (FRAME_SIZE): Define.
7004         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
7005         Comment typo fixes.
7006         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7007         Define.
7008         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
7009         typo fixes.
7010         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7011         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
7012         fixes.
7014 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
7016         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7017         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7018         Add __broadcast_seq field.
7019         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7020         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7021         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7022         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7023         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7025         all waiters as woken with woken_seq and bump broadcast counter.
7026         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7028         __broadcast_seq field.
7029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7030         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7031         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7032         * pthread_cond_init.c: Initialize __broadcast_seq field.
7033         * Makefile (tests): Add tst-cond17 and tst-cond18.
7034         Add .NOTPARALLEL goal.
7035         * tst-cond16.c: New file.  From Jakub.
7036         * tst-cond17.c: New file.  From Jakub.
7037         * tst-cond18.c: New file.  From Jakub.
7039 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7042         unwind info.
7044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7045         Parametrize frame size.  Correct some unwind info.
7046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7048 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7050         * tst-stack3.c: Note testing functionality beyond POSIX.
7052 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7054         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7055         Change conditional from ifdef to if.
7057 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
7059         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7060         SYSDEP_CANCEL_ERROR): Define.
7061         (PSEUDO): Use it.
7063 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
7065         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7067 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
7069         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7071 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7073         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7074         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7075         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7076         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7078 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7080         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7081         thread has all signals blocked.
7083 2004-04-18  Andreas Jaeger  <aj@suse.de>
7085         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7086         (SEM_VALUE_MAX): Add missing brace.
7088 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7090         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7091         in rt subdir.
7092         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7093         * sysdeps/pthread/tst-mqueue8x.c: New test.
7094         * tst-cancel4.c: Update comment about message queues.
7096         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7097         return it_value { 0, 0 }.
7098         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7099         like SIGEV_SIGNAL.
7100         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7101         assertion for SIGEV_NONE.
7102         (thread_attr_compare): Compare all attributes, not just a partial
7103         subset.
7105 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7107         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7109 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7111         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7112         Just use a plain number.
7113         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7114         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7115         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7116         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7117         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7118         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7119         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7121 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7123         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7124         frame info.
7125         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7127 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7129         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7130         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7131         of calling sigwaitinfo.
7133 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7135         * allocatestack.c (allocate_stack): Set reported_guardsize
7136         unconditionally.
7137         * pthread_getattr_np.c (pthread_getattr_np): Use
7138         reported_guardsize instead of guardsize.
7139         * descr.h (struct pthread): Add reported_guardsize field.
7141 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7143         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7145 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7147         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7149 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7151         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7152         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7153         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7154         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7155         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7156         Define.
7157         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7158         (_POSIX_MESSAGE_PASSING): Define.
7159         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7160         (_POSIX_MESSAGE_PASSING): Define.
7161         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7162         (_POSIX_MESSAGE_PASSING): Define.
7164 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7166         * tst-context1.c (fct): Check whether correct stack is used.
7168 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7170         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7171         matching constraints for asm mem parameters.
7173         * tst-clock2.c (tf): Don't define unless needed.
7175 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7177         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7178         $(gnulib).
7180 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7182         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7183         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7184         * pthreadP.h: Declare __nptl_deallocate_tsd.
7185         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7186         Adjust caller.
7188         * Makefile (tests): Add tst-tsd5.
7189         * tst-tsd5.c: New file.
7191 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7193         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7194         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7195         is SHLIB_COMPAT check.
7196         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7197         (__pthread_attr_getaffinity_old): Likewise.
7198         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7199         (__pthread_getaffinity_old): Likewise.
7200         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7201         (__pthread_setaffinity_old): Likewise.
7203 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7205         * allocatestack.c (_make_stacks_executable): Call
7206         _dl_make_stack_executable first.
7208 2004-03-24  Roland McGrath  <roland@redhat.com>
7210         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7211         constraint instead of "0".
7213 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7215         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7216         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7218         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7219         code to avoid warning.
7221 2004-03-24  Andreas Jaeger  <aj@suse.de>
7223         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7224         (__pthread_attr_setaffinity_old): Remove const.
7226 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7228         * sysdeps/unix/sysv/linux/smp.h: New file.
7229         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7230         * init.c: Define __is_smp.
7231         (__pthread_initialize_minimal_internal): Call is_smp_system to
7232         initialize __is_smp.
7233         * pthreadP.h: Declare __is_smp.
7234         Define MAX_ADAPTIVE_COUNT is necessary.
7235         * pthread_mutex_init.c: Add comment regarding __spins field.
7236         * pthread_mutex_lock.c: Implement adaptive mutex type.
7237         * pthread_mutex_timedlock.c: Likewise.
7238         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7239         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7240         Add __spins field.
7241         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7242         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7243         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7244         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7245         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7246         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7247         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7248         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7249         lll_mutex_cond_trylock.
7250         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7251         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7252         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7253         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7254         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7255         Define BUSY_WAIT_NOP.
7256         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7257         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7259         * tst-mutex5.c: Add support for testing adaptive mutexes.
7260         * tst-mutex7.c: Likewise.
7261         * tst-mutex5a.c: New file.
7262         * tst-mutex7a.c: New file.
7263         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7265         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7266         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7267         vgettimeofday call might destroy the content.
7269         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7270         @pause in the loop.
7272         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7273         No need to restrict type of ret.  Make it int.  Add comment.
7275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7276         Remove unnecessary setne instruction.
7278 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7280         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7281         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7282         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7283         If realloc fails, break out of the loop.
7285 2004-03-20  Andreas Jaeger  <aj@suse.de>
7287         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7288         (__pthread_setaffinity_old): Fix interface.
7289         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7290         (__pthread_getaffinity_old): Likewise.
7292         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7293         (__pthread_setaffinity_new): Remove duplicate declaration.
7295 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7297         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7298         the return value to a safe register.
7299         (CDISABLE): Set the function argument correctly.
7301 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7303         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7304         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7305         Rewrite so that only one locked memory operation per round is needed.
7306         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7307         (pthread_barrier_wait): After wakeup, release lock only when the
7308         last thread stopped using the barrier object.
7309         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7310         (__pthread_cond_wait): Don't store mutex address if the current
7311         value is ~0l.  Add correct cleanup support and unwind info.
7312         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7313         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7314         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7315         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7316         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7317         Add correct cleanup support and unwind info.
7318         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7319         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7320         information for syscall wrappers.
7322 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7324         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7325         cpusetsize field, remove next.
7326         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7327         parameter for size of the CPU set.
7328         (pthread_setaffinity_np): Likewise.
7329         (pthread_attr_getaffinity_np): Likewise.
7330         (pthread_attr_setaffinity_np): Likewise.
7331         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7332         interface change, keep compatibility code.
7333         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7334         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7335         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7336         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7337         __pthread_getaffinity_np.
7338         * Versions: Add version for changed interfaces.
7339         * tst-attr3.c: Adjust test for interface change.
7340         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7341         increasing buffer sizes.
7342         * pthread_attr_destroy.c: Remove unused list handling.
7343         * pthread_attr_init.c: Likewise.
7345 2004-03-17  Roland McGrath  <roland@redhat.com>
7347         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7348         first argument to clock_getres so we ever enable kernel timers.
7350 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7352         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7354 2004-03-12  Richard Henderson  <rth@redhat.com>
7356         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7357         oldvalue from CENABLE to CDISABLE.
7359 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7361         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7362         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7363         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7364         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7366 2004-03-11  Richard Henderson  <rth@redhat.com>
7368         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7369         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7370         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7372 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7374         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7375         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7376         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7378 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7380         * forward.c (__pthread_cond_broadcast_2_0,
7381         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7382         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7383         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7385 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7387         * sysdeps/sh/tcb-offsets.sym: Add PID.
7388         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7389         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7391 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7393         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7394         include <sysdep-cancel.h>, vfork is no cancellation point.
7395         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7396         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7397         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7399 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7401         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7402         libc_hidden_def.
7403         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7404         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7405         Likewise.
7406         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7407         Likewise.
7408         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7409         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7410         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7411         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7412         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7414         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7415         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7416         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7417         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7418         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7419         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7421         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7422         a local register for saving old PID.  Negate PID in parent upon exit.
7424         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7425         tcb-offsets.h.
7426         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7427         before syscall, set to the old value in the parent afterwards.
7428         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7429         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7430         tcb-offsets.h.
7431         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7432         before syscall, set to the old value in the parent afterwards.
7433         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7434         * sysdeps/s390/tcb-offsets.sym: Add PID.
7436         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7437         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7438         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7439         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7440         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7441         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7443 2004-03-10  Andreas Schwab  <schwab@suse.de>
7445         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7446         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7447         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7449 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7451         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7452         * tst-cancel21.c (do_one_test): Likewise.
7453         Reported by Gordon Jin <gordon.jin@intel.com>.
7455 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7457         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7458         if non-zero and set to INT_MIN if zero.
7459         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7460         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7461         (SAVE_PID, RESTORE_PID): Define.
7462         (__vfork): Use it.
7463         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7464         Use relative path to avoid including NPTL i386/vfork.S.
7465         (SAVE_PID, RESTORE_PID): Define.
7466         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7467         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7468         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7469         tst-vfork2x.
7470         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7471         * tst-vfork1.c: New test.
7472         * tst-vfork2.c: New test.
7473         * tst-vfork1x.c: New test.
7474         * tst-vfork2x.c: New test.
7476 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7478         * sysdeps/i386/tcb-offsets.sym: Add PID.
7479         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7480         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7481         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7483 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7485         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7487 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7489         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7490         _rtld_global_ro.
7492 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7494         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7495         _rtld_global_ro.
7497         * tst-once4.c: Remove unnecessary macro definition.
7499         * tst-mutex7.c (do_test): Limit thread stack size.
7500         * tst-once2.c (do_test): Likewise.
7501         * tst-tls3.c (do_test): Likewise.
7502         * tst-tls1.c (do_test): Likewise.
7503         * tst-signal3.c (do_test): Likewise.
7504         * tst-kill6.c (do_test): Likewise.
7505         * tst-key4.c (do_test): Likewise.
7506         * tst-join4.c (do_test): Likewise.
7507         * tst-fork1.c (do_test): Likewise.
7508         * tst-context1.c (do_test): Likewise.
7509         * tst-cond2.c (do_test): Likewise.
7510         * tst-cond10.c (do_test): Likewise.
7511         * tst-clock2.c (do_test): Likewise.
7512         * tst-cancel10.c (do_test): Likewise.
7513         * tst-basic2.c (do_test): Likewise.
7514         * tst-barrier4.c (do_test): Likewise.
7516 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7518         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7520 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7523         (__pthread_cond_timedwait): Optimize wakeup test.
7524         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7525         (__pthread_cond_wait): Likewise.
7526         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7527         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7528         Likewise.
7530 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7532         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7533         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7534         the atomic instruction needed.
7535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7536         (__lll_mutex_lock_wait): Likewise.
7538 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7540         * Makefile (tests): Add tst-cond14 and tst-cond15.
7541         * tst-cond14.c: New file.
7542         * tst-cond15.c: New file.
7544 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7546         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7547         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7548         needs to be implemented differently to be useful.
7550 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7552         * pthread_attr_setschedparam.c: Don't test priority against limits
7553         here.  Set ATTR_FLAG_SCHED_SET flag.
7554         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7555         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7556         from parent thread to child.  If attribute is used and scheduling
7557         parameters are not inherited, copy parameters from attribute or
7558         compute them.  Check priority value.
7559         * pthread_getschedparam.c: If the parameters aren't known yet get
7560         them from the kernel.
7561         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7562         ATTR_FLAG_POLICY_SET flag for thread.
7563         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7564         and ATTR_FLAG_POLICY_SET.
7566         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7568         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7569         fail if stack address hasn't been set.  Just return 0.
7571 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7573         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7574         libpthread for the files in this list.
7575         (CFLAGS-tst-unload): Removed.
7576         * tst-unload.c (do_test): Don't use complete path for
7577         LIBPHREAD_SO.
7579         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7580         tst-_res1mod2.
7582 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7584         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7585         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7586         operation per round is needed.
7587         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7588         (__lll_mutex_lock_wait): Likewise.
7590 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7592         * tst-cancel9.c (cleanup): Don't print to stderr.
7594 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7596         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7598 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7600         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7601         (__syscall_error_handler2): Call CDISABLE.
7602         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7603         (__syscall_error_handler2): Call CDISABLE.
7605         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7606         Release lock before the loop, don't reacquire it.
7608         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7610 2004-02-19  Andreas Schwab  <schwab@suse.de>
7612         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7613         Fix last change.
7615 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7617         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7618         (pthread_barrier_wait): After wakeup, release lock only when the
7619         last thread stopped using the barrier object.
7620         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7621         (pthread_barrier_wait): Likewise.
7622         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7623         Likewise.
7624         * Makefile (tests): Add tst-barrier4.
7625         * tst-barrier4.c: New file.
7627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7628         (__pthread_cond_timedwait): Perform timeout test while holding
7629         internal lock to prevent wakeup race.
7630         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7631         * sysdeps/pthread/pthread_cond_timedwait.c
7632         (__pthread_cond_timedwait): Likewise.
7633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7634         (__pthread_cond_timedwait): Likewise.
7636 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7638         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7639         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7640         * Makefile (tests): Add tst-rwlock13.
7641         * tst-rwlock13.c: New test.
7643 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7645         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7646         (__condvar_tw_cleanup): Little optimization.
7647         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7649 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7651         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7652         libpthread as "lib" parameter to SHLIB_COMPAT.
7653         (__novmx_siglongjmp): Fix typo in function name.
7654         (__novmx_longjmp): Fix typo in function name.
7656 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7658         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7659         __builtin_expect.
7661         * sysdeps/generic/pt-longjmp.c: Moved to...
7662         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7664 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7666         * Makefile (libpthread-routines): Add pt-cleanup.
7667         * pt-longjmp.c: Removed.
7668         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7669         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7670         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7671         Version longjmp, siglongjmp for GLIBC_2.3.4.
7672         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7674 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7676         * sysdeps/pthread/pthread_cond_timedwait.c
7677         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7678         Reuse code.  Add __builtin_expects.
7680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7681         (__pthread_cond_timedwait): Get internal lock in case timeout has
7682         passed before the futex syscall.
7683         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7685 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7687         * allocatestack.c: Pretty printing.
7689         * sysdeps/pthread/createthread.c (create_thread): Don't add
7690         CLONE_DETACHED bit if it is not necessary.
7692 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7694         * pthread_getattr_np.c: Include ldsodefs.h.
7696 2004-01-16  Richard Henderson  <rth@redhat.com>
7698         * allocatestack.c: Don't declare __libc_stack_end.
7699         * init.c (__pthread_initialize_minimal_internal): Likewise.
7700         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7702 2004-01-15  Richard Henderson  <rth@redhat.com>
7704         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7705         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7706         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7707         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7708         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7709         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7710         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7711         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7713 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7715         * init.c (pthread_functions): Make array const.
7717 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7719         * allocatestack.c (__make_stacks_executable): Change interface.
7720         Check parameters.  Pass parameter on to libc counterpart.
7721         * pthreadP.h: Change declaration.
7723 2004-01-13  Richard Henderson  <rth@redhat.com>
7725         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7726         prototype form.
7727         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7728         Likewise.
7730         * sysdeps/alpha/Makefile: New file.
7731         * sysdeps/alpha/tcb-offsets.sym: New file.
7732         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7733         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7735         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7736         on powerpc version.
7738 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7740         * Makefile (tests): Add tst-backtrace1.
7741         * tst-backtrace1.c: New test.
7743 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7745         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7746         register as second parameter to the REGISTER macro.
7747         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7748         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7749         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7750         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7751         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7752         of thread register as second parameter to REGISTER macro in 64 case.
7754 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7756         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7757         (CFLAGS-getpid.o): Defined.
7758         (CFLAGS-getpid.os): Defined.
7760 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7762         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7763         returned for main thread does not overlap with any other VMA.
7764         Patch by Jakub Jelinek.
7766 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7768         * tst-raise1.c: Include stdio.h.
7770 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7772         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7773         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7774         If pid is 0, set it to selftid.
7775         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7776         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7777         != 0, return self->tid without doing a syscall.
7778         * descr.h (struct pthread): Move pid field after tid.
7780         * Makefile (tests): Add tst-raise1.
7781         * tst-raise1.c: New file.
7783 2003-12-23  Roland McGrath  <roland@redhat.com>
7785         * tst-oddstacklimit.c: New file.
7786         * Makefile (tests): Add it.
7787         (tst-oddstacklimit-ENV): New variable.
7789         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7790         value up to page size for __default_stacksize.
7792 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7794         * Makefile (tests): Add tst-eintr5.
7795         * tst-eintr5.c: New file.
7797         * eintr.c (eintr_source): Prevent sending signal to self.
7799         * tst-eintr2.c (tf1): Improve error message.
7801 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7803         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7804         * sysdeps/unix/sysv/linux/getpid.c: New file.
7805         * pthread_cancel.c: Add comment explaining use of PID field.
7806         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7807         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7808         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7809         temporarily to signal the field must not be relied on and updated
7810         by getpid().
7811         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7812         temporarily negative.
7813         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7815 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7817         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7818         (eintr_source): If ARG != NULL, use pthread_kill.
7819         * tst-eintr1.c: Adjust for this change.
7820         * tst-eintr2.c: Likewise.
7821         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7822         * tst-eintr3.c: New file.
7823         * tst-eintr4.c: New file.
7825 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7827         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7828         if CANCELSTATE_BITMASK is set.
7829         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7830         Likewise.
7832         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7833         (tests-reverse): Add tst-cancel23.
7834         * tst-cancel22.c: New test.
7835         * tst-cancel23.c: New test.
7837 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7839         * tst-eintr1.c: Better error messages.
7841         * Makefile (tests): Add tst-eintr2.
7842         * tst-eintr2.c: New file.
7844 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7846         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7847         (CFLAGS-tst-cancelx21.c): Set.
7848         * tst-cancel21.c: New test.
7849         * tst-cancelx21.c: New test.
7851         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7852         comparison operand.
7853         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7854         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7855         * pt-longjmp.c: Include jmpbuf-unwind.h.
7856         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7857         _JMPBUF_UNWINDS.  Adjust compared pointers.
7858         * init.c (__pthread_initialize_minimal_internal): Initialize
7859         pd->stackblock_size.
7860         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7861         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7862         * sysdeps/i386/jmpbuf-unwind.h: New file.
7863         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7864         * sysdeps/s390/jmpbuf-unwind.h: New file.
7865         * sysdeps/sh/jmpbuf-unwind.h: New file.
7866         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7867         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7868         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7869         (_JMPBUF_CFA_UNWINDS): Remove.
7870         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7872 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7874         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7875         (CFLAGS-tst-cancelx20.c): Set.
7876         * tst-cancel20.c: New test.
7877         * tst-cancelx20.c: New test.
7879 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7881         * init.c (__pthread_initialize_minimal_internal): Don't treat
7882         architectures with separate register stack special here when
7883         computing default stack size.
7885 2003-12-17  Roland McGrath  <roland@redhat.com>
7887         * Makefile (tst-cancelx7-ARGS): New variable.
7888         Reportd by Greg Schafer <gschafer@zip.com.au>.
7890 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7892         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7893         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7894         (tst-stack3-ENV): Set.
7895         ($(objpfx)tst-stack3-mem): New.
7896         * tst-stack3.c: New test.
7898 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7900         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7901         Add unwind directives.  Drop unused .regstk directive.
7902         (_fini_EPILOG_BEGINS): Add unwind directives.
7904 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7906         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7907         Assume parameter is a pointer.
7908         (lll_futex_wake): Likewise.
7909         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7910         Likewise.
7911         (lll_futex_wake): Likewise.
7912         Reported by Boris Hu.
7913         * sysdeps/unix/sysv/linux/unregister-atfork.c
7914         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7916         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7918 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7920         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7921         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7922         __rtld_lock_initialize for ld.so lock.
7923         Patch in part by Adam Li <adam.li@intel.com>.
7925 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7927         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7928         in $(gnulib).  Also, remove stale comment.
7930 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7932         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7933         advantage of new syscall stub and optimize accordingly.
7935         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7936         from SYS_futex, to match expectations of
7937         sysdep.h:DO_INLINE_SYSCALL.
7938         (lll_futex_clobbers): Remove.
7939         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7940         (lll_futex_wake): Likewise.
7941         (lll_futex_requeue): Likewise.
7942         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7943         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7944         Jelinek).
7945         (__lll_mutex_lock): Likewise.
7946         (__lll_mutex_cond_lock): Likewise.
7947         (__lll_mutex_timed_lock): Likewise.
7948         (__lll_mutex_unlock): Likewise.
7949         (__lll_mutex_unlock_force): Likewise.
7951         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7952         comes before the include of <sysdep.h>.
7953         (THREAD_SELF_SYSINFO): New macro.
7954         (THREAD_SYSINFO): Likewise.
7955         (INIT_SYSINFO): New macro.
7956         (TLS_INIT_TP): Call INIT_SYSINFO.
7958         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7960         * sysdeps/pthread/createthread.c (create_thread): Use
7961         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7962         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7963         THREAD_SELF_SYSINFO instead of open code.
7964         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7965         (THREAD_SYSINFO): Likewise.
7967         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7969         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7971 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7973         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7974         instead of .init.  Patch by David Mosberger.
7976 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7978         * sysdeps/pthread/configure.in: Remove broken declaration in C
7979         cleanup handling check.
7981 2003-11-30  Andreas Jaeger  <aj@suse.de>
7983         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7984         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7985         Likewise.
7987 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7989         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7990         * pthread_attr_destroy.c: Include shlib-compat.h.
7991         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7992         is set in iattr->flags.
7993         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7995 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7997         * Makefile (distribute): Add tst-cleanup4aux.c.
7999         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
8000         include.
8002 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
8004         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8005         pthread_cond_signal.
8007         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8008         store mutex address if the current value is ~0l.
8009         * sysdeps/pthread/pthread_cond_timedwait.c
8010         (__pthread_cond_timedwait): Likewise.
8011         * sysdeps/pthread/pthread_cond_broadcast.c
8012         (__pthread_cond_broadcast): Don't use requeue for pshared
8013         condvars.
8015         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8016         (__pthread_cond_wait): Don't store mutex address if the current
8017         value is ~0l.
8018         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8019         (__pthread_cond_timedwait): Likewise.
8020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8021         (__pthread_cond_broadcast): Don't use requeue for pshared
8022         condvars.
8024         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8025         element with ~0l for pshared condvars, with NULL otherwise.
8027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8028         (__pthread_cond_wait): Don't store mutex address if the current
8029         value is ~0l.
8030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8031         (__pthread_cond_timedwait): Likewise.
8032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8033         (__pthread_cond_broadcast): Don't use requeue for pshared
8034         condvars.
8036         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8037         * tst-cond12.c: New file.
8038         * tst-cond13.c: New file.
8040 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
8042         * sysdeps/pthread/configure.in: Make missing forced unwind support
8043         fatal.
8045 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
8047         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8049 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
8051         * Makefile: Add magic to clean up correctly.
8053 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
8055         * unwind.c (FRAME_LEFT): Define.
8056         (unwind_stop): Handle old style cleanups here.
8057         (__pthread_unwind): Handle old style cleanups only if
8058         !HAVE_FORCED_UNWIND.
8059         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8060         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8061         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8062         ($(objpfx)tst-cleanupx4): Likewise.
8063         * tst-cleanup4.c: New test.
8064         * tst-cleanup4aux.c: New.
8065         * tst-cleanupx4.c: New test.
8067 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
8069         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8070         lll_mutex_*lock macros to skip atomic operations on some archs.
8072 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
8074         * sysdeps/pthread/tst-timer.c (main): Initialize
8075         sigev2.sigev_value as well.
8077 2003-10-15  Roland McGrath  <roland@redhat.com>
8079         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8080         is missing.
8081         * sysdeps/pthread/configure: Regenerated.
8083 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8085         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8086         locking macros.  No distinction between normal and mutex locking
8087         anymore.
8088         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8089         Merge bits from lowlevelmutex.S we still need.
8090         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8091         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8092         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8093         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8094         new mutex implementation.
8095         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8096         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8097         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8098         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8099         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8100         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8102         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8104         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8105         symbol for entry point to avoid cancellation.
8107 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8109         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8110         changes.
8111         (SAVE_OLDTYPE_0): Fix a typo.
8113 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8115         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8116         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8118 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8120         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8121         correct offset.
8123 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8125         * Makefile (tests): Add tst-cancel19.
8126         * tst-cancel19.c: New test.
8128 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8130         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8131         restoring of the old cancellation type.
8133 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8135         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8137 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8139         * sysdeps/pthread/malloc-machine.h: New file
8141 2003-09-24  Roland McGrath  <roland@redhat.com>
8143         * allocatestack.c (__make_stacks_executable): Don't ignore return
8144         value from _dl_make_stack_executable.
8146 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8148         * allocatestack.c (__make_stacks_executable): Also change
8149         permission of the currently unused stacks.
8151         * allocatestack.c (change_stack_perm): Split out from
8152         __make_stacks_executable.
8153         (allocate_stack): If the required permission changed between the time
8154         we started preparing the stack and queueing it, change the permission.
8155         (__make_stacks_executable): Call change_stack_perm.
8157         * Makefile: Build tst-execstack-mod locally.
8158         * tst-execstack-mod.c: New file.
8160 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8162         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8164 2003-09-23  Roland McGrath  <roland@redhat.com>
8166         * tst-execstack.c: New file.
8167         * Makefile (tests): Add it.
8168         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8169         (LDFLAGS-tst-execstack): New variable.
8171         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8172         whether to use PROT_EXEC for stack mmap.
8173         (__make_stacks_executable): New function.
8174         * pthreadP.h: Declare it.
8175         * init.c (__pthread_initialize_minimal_internal): Set
8176         GL(dl_make_stack_executable_hook) to that.
8178 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8180         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8181         recommendation from AMD re avoidance of lock prefix.
8183 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8185         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8186         lll_futex_timed_wait instead of lll_futex_wait.
8187         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8188         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8189         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8190         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8191         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8192         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8193         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8194         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8195         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8196         Completely revamp the locking macros.  No distinction between
8197         normal and mutex locking anymore.
8198         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8199         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8200         __lll_lock_timedwait): Fix prototypes.
8201         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8202         __lll_lock_timedwait): Likewise.
8203         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8204         macros, add __builtin_expect.
8205         (lll_mutex_timedlock): Likewise.  Fix return value.
8206         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8207         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8208         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8209         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8210         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8211         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8212         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8213         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8215 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8217         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8218         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8219         operation if possible.
8221         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8222         like jumping over the lock prefix.
8224 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8227         locking macros.  No distinction between normal and mutex locking
8228         anymore.
8229         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8230         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8231         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8232         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8233         locking.  Merge bits from lowlevelmutex.S we still need.
8234         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8235         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8236         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8237         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8238         * Makefile (routines): Remove libc-lowlevelmutex.
8239         (libpthread-rountines): Remove lowlevelmutex.
8240         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8241         for new mutex implementation.
8242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8245         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8246         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8247         Likewise.
8248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8249         Likewise.
8250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8251         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8252         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8254         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8256         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8257         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8258         Likewise.
8259         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8260         Likewise.
8261         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8262         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8264         Don't use requeue.
8265         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8266         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8268 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8270         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8271         in parameters of asm with output parameters.
8273         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8274         type of DECR parameter to int.
8275         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8277 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8279         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8280         guardsize for each thread.
8282 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8284         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8285         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8286         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8288         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8289         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8290         NULL.
8291         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8292         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8293         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8294         (pthread_getaffinity_np): Add hidden_def.
8296         * Makefile (tests): Add tst-attr3.
8297         * tst-attr3.c: New test.
8299         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8301 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8303         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8304         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8306 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8308         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8309         * tst-align.c: Include tst-stack-align.h.
8310         (tf, do_test): Use TEST_STACK_ALIGN macro.
8312 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8314         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8315         variable.
8317 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8319         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8320         stack-related values for the initial thread.
8322 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8324         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8326 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8328         * pthread_mutex_lock.c: Minor code rearrangements.
8330 2003-09-05  Roland McGrath  <roland@redhat.com>
8332         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8333         Instead, include ../nptl_db/db_info.c to do its magic.
8334         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8335         (__pthread_pthread_key_2ndlevel_size): Likewise.
8336         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8337         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8338         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8339         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8340         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8341         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8342         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8343         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8344         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8345         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8346         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8347         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8348         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8349         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8350         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8351         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8352         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8354 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8356         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8357         of pthread_t to be compatible with LT.
8358         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8359         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8360         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8361         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8362         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8363         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8364         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8366 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8368         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8370 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8372         * unwind-forcedunwind.c: Move to...
8373         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8374         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8375         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8376         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8377         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8378         * unwind.c: Include jmpbuf-unwind.h.
8379         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8381 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8383         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8384         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8385         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8386         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8387         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8388         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8389         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8390         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8391         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8392         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8393         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8394         function.
8395         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8396         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8397         * Makefile (tests): Add tst-stack2.
8398         * tst-stack2.c: New test.
8399         * tst-stack1.c: Include limits.h and sys/param.h.
8400         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8402         * pthread_condattr_setpshared.c: Include errno.h.
8403         (pthread_condattr_setpshared): Return EINVAL if pshared
8404         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8406         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8407         defined symbol for entry point to avoid cancellation.
8408         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8409         Likewise.
8410         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8411         Likewise.
8412         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8413         Likewise.
8414         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8415         Likewise.
8416         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8417         Likewise.
8418         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8419         __close_nocancel, __read_nocancel, __write_nocancel,
8420         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8421         libpthread.so or librt.so, define to corresponding function
8422         without _nocancel suffix.
8423         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8424         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8425         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8427         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8429 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8431         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8432         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8434         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8435         in subsections has a symbol associated with it.
8437         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8438         defined symbol for entry point to avoid cancellation.
8439         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8441 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8443         * Makefile (tests): Add tst-tls5.
8444         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8445         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8446         ($(objpfx)tst-tls5): New.
8447         ($(objpfx)tst-tls6.out): Likewise.
8448         (tests): Depend on $(objpfx)tst-tls6.out.
8449         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8450         (do_test): Check pthread_self () return value alignment.
8451         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8452         (tf): Check pthread_self () return value alignment.
8453         * tst-tls5.c: New test.
8454         * tst-tls5.h: New.
8455         * tst-tls5mod.c: New.
8456         * tst-tls5moda.c: New.
8457         * tst-tls5modb.c: New.
8458         * tst-tls5modc.c: New.
8459         * tst-tls5modd.c: New.
8460         * tst-tls5mode.c: New.
8461         * tst-tls5modf.c: New.
8462         * tst-tls6.sh: New test.
8464         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8465         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8466         * init.c (pthread_functions): Initialize them.
8467         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8468         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8469         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8470         pthread_cond_timedwait@@GLIBC_2.3.2.
8472 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8474         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8475         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8476         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8477         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8478         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8479         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8481         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8483         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8484         _POSIX_THREAD_PRIORITY_SCHEDULING.
8485         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8487 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8489         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8490         nested function, use static inline function from libio.h.
8491         Code by Richard Henderson.
8493         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8494         weak.
8496 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8498         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8499         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8500         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8501         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8502         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8503         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8504         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8505         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8506         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8507         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8508         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8509         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8510         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8511         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8512         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8513         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8514         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8515         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8516         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8517         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8518         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8519         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8520         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8521         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8522         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8523         * sysdeps/sparc/tls.h: New file.
8524         * sysdeps/sparc/tcb-offsets.sym: New file.
8525         * sysdeps/sparc/Makefile: New file.
8526         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8527         * init.c [__sparc__] (__NR_set_tid_address): Define.
8529 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8531         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8532         _IO_release_lock): Define.
8534 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8536         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8537         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8539 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8541         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8542         (__pthread_cleanup_class): Add missing return types of member
8543         functions.
8545 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8547         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8548         (lll_mutex_unlock_force): Add memory barrier between store and futex
8549         syscall.
8551 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8553         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8554         tempmsg in first loop.
8556 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8558         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8559         _POSIX_THREAD_PRIORITY_SCHEDULING.
8560         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8562 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8564         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8565         (__rtld_lock_default_lock_recursive,
8566         __rtld_lock_default_unlock_recursive): Define.
8567         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8568         __rtld_lock_unlock_recursive): Define using
8569         GL(_dl_rtld_*lock_recursive).
8570         * init.c (__pthread_initialize_minimal_internal): Initialize
8571         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8572         Lock GL(_dl_load_lock) the same number of times as
8573         GL(_dl_load_lock) using non-mt implementation was nested.
8575         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8576         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8578 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8580         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8581         PIPE_BUF.
8583 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8585         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8587 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8589         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8590         to first syscall error check.  Move syscall error check for tkill
8591         into __ASSUME_CLONE_STOPPED #ifdef.
8593 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8595         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8596         is not defined, do explicit synchronization.
8597         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8598         is not defined also unlock pd->lock for non-debugging case in case
8599         it is necessary.
8600         * pthread_create.c (start_thread): Always get and release pd->lock
8601         if __ASSUME_CLONE_STOPPED is not defined.
8602         (start_thread_debug): Removed.  Adjust users.
8603         * allocatestack.c (allocate_stack): Always initialize lock if
8604         __ASSUME_CLONE_STOPPED is not defined.
8605         * Makefile (tests): Add tst-sched1.
8606         * tst-sched1.c: New file.
8608         * sysdeps/pthread/createthread.c (do_clone): Only use
8609         sched_setschduler and pass correct parameters.
8611 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8613         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8614         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8615         PTHREAD_STACK_MIN in comments.
8617 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8619         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8620         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8621         argument.
8622         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8623         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8624         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8625         (__pthread_cleanup_upto): Fix prototype.
8626         (_longjmp_unwind): Adjust caller.
8627         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8628         Change second argument to const struct pointer.
8629         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8630         * tst-sem9.c (main): Likewise.
8631         * unwind.c: Include string.h for strlen prototype.
8633 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8636         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8637         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8638         Define HAVE_CMOV.
8639         Patch by Nicholas Miell <nmiell@attbi.com>.
8641 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8643         * init.c (__pthread_initialize_minimal_internal): Initialize
8644         GL(dl_init_static_tls).
8645         * pthreadP.h (__pthread_init_static_tls): New prototype.
8646         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8647         New functions.
8648         * Makefile (tests): Add tst-tls4.
8649         (modules-names): Add tst-tls4moda and tst-tls4modb.
8650         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8651         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8652         tst-tls4modb.so.
8653         * tst-tls4.c: New file.
8654         * tst-tls4moda.c: New file.
8655         * tst-tls4modb.c: New file.
8657 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8659         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8660         before __timer_dealloc.
8661         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8662         Don't call list_unlink.
8664 2003-07-29  Roland McGrath  <roland@redhat.com>
8666         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8668 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8670         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8671         Don't reuse struct aiocb A if it failed.
8672         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8673         not just one byte, as that does not block.
8675 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8677         * sysdeps/pthread/unwind-resume.c: New file.
8678         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8679         unwind-resume in csu subdir.
8680         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8681         exceptions.
8682         (librt-sysdep_routines, librt-shared-only-routines): Add
8683         rt-unwind-resume.
8684         * sysdeps/pthread/rt-unwind-resume.c: New file.
8685         * unwind-forcedunwind.c: New file.
8686         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8687         (libpthread-shared-only-routines): Likewise.
8688         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8689         * pthreadP.h (pthread_cancel_init): New prototype.
8690         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8692         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8693         attr argument const struct pthread_attr *.
8695         * res.c (__res_state): Return __resp.
8696         * descr.h: Include resolv.h.
8697         (struct pthread): Add res field.
8698         * pthread_create.c: Include resolv.h.
8699         (start_thread): Initialize __resp.
8700         * Makefile (tests): Add tst-_res1.
8701         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8702         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8703         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8704         libpthread.
8705         * tst-_res1.c: New file.
8706         * tst-_res1mod1.c: New file.
8707         * tst-_res1mod2.c: New file.
8709 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8711         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8713         * Makefile: Define various *-no-z-defs variables for test DSOs
8714         which has undefined symbols.
8716 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8718         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8719         Retry if the stwcx fails to store once_control.
8721 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8723         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8724         pthread_attr_setaffinity.
8725         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8726         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8727         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8728         * pthread_attr_destroy.c: Free cpuset element if allocated.
8729         * pthread_create.c: Pass iattr as additional parameter to
8730         create_thread.
8731         * sysdeps/pthread/createthread.c: If attribute is provided and
8732         a new thread is created with affinity set or scheduling parameters,
8733         start thread with CLONE_STOPPED.
8734         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8735         pthread_attr_setaffinity.
8736         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8737         cpuset element.
8739 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8741         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8743 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8745         * sysdeps/pthread/configure.in: Require CFI directives also for
8746         ppc and s390.
8748 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8750         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8751         Add cfi directives.
8753 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8755         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8756         CLEANUP_JMP_BUF.
8757         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8758         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8759         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8760         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8761         not self pointer in __writer.  Compare with TID to determine
8762         deadlocks.
8763         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8764         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8765         Likewise.
8766         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8767         Likewise.
8768         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8769         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8770         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8771         macros also when compiling librt.
8773 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8775         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8776         -fasynchronous-unwind-tables.
8777         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8778         (PSEUDO): Add cfi directives.
8779         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8780         Likewise.
8781         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8782         Likewise.
8784 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8786         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8787         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8788         * unwind.c (__pthread_unwind_next): Add hidden_def.
8789         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8790         Likewise.
8791         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8792         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8793         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8794         Likewise.
8795         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8796         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8797         Likewise.
8798         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8799         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8800         __pthread_unregister_cancel and __pthread_unwind_next.
8802 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8804         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8805         different symbol for the cancellation syscall wrapper and
8806         non-cancellation syscall wrapper.
8807         (PSEUDO_END): Define.
8809 2003-07-05  Richard Henderson  <rth@redhat.com>
8811         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8812         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8813         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8814         return actual return value from the syscall, not 0.
8816 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8818         * descr.h (struct pthread): Add pid field.
8819         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8820         (__reclaim_stacks): Likewise.
8821         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8822         also check for PID of the signal source.
8823         (__pthread_initialize_minimal_internal): Also initialize pid field
8824         of initial thread's descriptor.
8825         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8826         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8827         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8828         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8829         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8831 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8833         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8834         Fix use of parameter.
8835         (__libc_cleanup_pop): Likewise.
8837 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8839         * init.c (sigcancel_handler): Change parameters to match handler
8840         for SA_SIGACTION.  Check signal number and code to recognize
8841         invalid invocations.
8843 2003-07-03  Roland McGrath  <roland@redhat.com>
8845         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8846         Apply sizeof (struct pthread) bias to r13 value.
8848 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8850         * sysdeps/pthread/configure.in: Require CFI directives.
8852         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8853         definition.
8854         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8855         libpthread compilation.
8856         * unwind.c (__pthread_unwind): Add hidden_def.
8857         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8859 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8861         * libc-cancellation.c (__libc_cleanup_routine): Define.
8862         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8863         (__pthread_cleanup_pop): Define.
8865 2003-07-01  Richard Henderson  <rth@redhat.com>
8867         * sysdeps/alpha/elf/pt-initfini.c: New file.
8868         * sysdeps/alpha/pthread_spin_lock.S: New file.
8869         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8870         * sysdeps/alpha/pthreaddef.h: New file.
8871         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8872         * sysdeps/alpha/tls.h: New file.
8873         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8874         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8875         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8876         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8877         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8878         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8879         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8880         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8881         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8882         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8884 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8886         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8887         cleanup support and unwind info.
8889 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8891         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8892         Use correct cleanup handler registration.  Add unwind info.
8893         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8894         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8895         * tst-once3.c: Add cleanup handler and check it is called.
8896         * tst-once4.c: Likewise.
8897         * tst-oncex3.c: New file.
8898         * tst-oncex4.c: New file.
8899         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8901 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8903         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8905 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8907         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8908         (tf_msgsnd): Likewise.
8910         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8911         premature returns a bit more.
8913 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8915         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8916         definition to the front.
8918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8919         the cleanup functions to make the names unique.  Fix dwarf opcode
8920         un unwind table.
8921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8922         functions to make the names unique.  Fix CFA offset for two blocks.
8924 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8926         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8927         missing closing braces.
8928         Patch by Christophe Saout <christophe@saout.de>.
8930 2003-06-24  Roland McGrath  <roland@redhat.com>
8932         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8934 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8936         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8937         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8939         * pthreadP.h: Declare __find_thread_by_id.
8940         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8941         * pthread_clock_gettime.c: Allow using other thread's clock.
8942         * pthread_clock_settime.c: Likewise.
8943         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8944         * Makefile: Add rules to build and run tst-clock2.
8945         * tst-clock2.c: New file.
8947 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8950         to use exception-based cleanup handler.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8953         * tst-cond8.c (ch): Announce that we are done.
8955         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8957         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8958         Also test aio_suspend with timeout value.
8960 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8962         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8963         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8964         attribute_hidden.
8966         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8967         (__pthread_mutex_lock_internal): Likewise.
8968         (__pthread_mutex_unlock_internal): Likewise.
8969         (__pthread_mutex_unlock_usercnt): Declare.
8970         * pthread_mutex_destroy.c: Always fail if used in any way.
8971         * pthread_mutex_init.c: Update comment.
8972         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8973         * pthread_mutex_timedlock.c: Adjust __nusers.
8974         * pthread_mutex_trylock.c: Adjust __nusers.
8975         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8976         and public interfaces are wrapper with pass additional parameter.
8977         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8978         parameter zero.
8979         * tst-mutex8.c: New file.
8980         * Makefile (tests): Add tst-mutex8.
8981         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8982         __pthread_mutex_unlock_usercnt.
8983         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8988         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8989         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8990         Add __nusers.
8991         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8992         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8993         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8994         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8995         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8997         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8998         * pthread_mutex_timedlock.c: Likewise.
8999         * pthread_mutex_trylock.c: Adjust __nusers.
9000         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9001         * tst-mutex9.c: New file.
9002         * Makefile (tests): Add tst-mutex9.
9003         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9004         * sysdeps/ia64/tls.h: Likewise.
9005         * sysdeps/powerpc/tls.h: Likewise.
9006         * sysdeps/s390/tls.h: Likewise.
9007         * sysdeps/sh/tls.h: Likewise.
9008         * sysdeps/x86_64/tls.h: Likewise.
9009         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9010         Change type of __owner.
9011         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9012         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9013         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9014         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9015         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9017 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
9019         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9020         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9022         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9023         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
9024         instead of nr to lll_futex_wake.  Only set errno and return -1
9025         if err < 0.
9027         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9028         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9029         return actual return value from the syscall, not 0.
9031 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
9033         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9034         find a random value.
9035         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
9036         errno==EIDRM.
9038         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9039         compat_timer_settime.
9040         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9041         compat_timer_gettime.
9042         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9043         compat_timer_getoverrun.
9044         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9045         compat_timer_delete.
9047         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9048         error-checking mutex detect busy mutexes.
9050 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9052         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9053         Add ax to clobber list.
9054         (lll_mutex_cond_lock): Likewise.
9055         (lll_mutex_unlock): Likewise.
9056         (lll_lock): Likewise.
9057         (lll_unlock): Likewise.
9059         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9060         * tst-cancel18.c: New file.
9061         * tst-cancelx18.c: New file.
9063         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9064         and tcdrain.
9066         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9067         * tst-cancel17.c: New file.
9068         * tst-cancelx17.c: New file.
9070         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9071         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9072         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9074         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9076 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9078         * sysdeps/pthread/createthread.c (create_thread): Set
9079         header.multiple_threads unconditionally.
9080         * allocatestack.c (allocate_stack): Likewise.
9081         * descr.h (struct pthread): Add header.multiple_threads
9082         unconditionally.
9083         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9084         Define for librt.  #error if neither libpthread, libc nor librt.
9085         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9086         Likewise.
9087         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9088         CDISABLE): Likewise.
9089         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9090         CDISABLE): Likewise.
9091         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9092         CDISABLE): Likewise.
9093         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9094         CDISABLE): Likewise.  Access header.multiple_threads outside of
9095         libc and libpthread.
9096         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9097         Likewise.
9098         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9099         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9101 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9103         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9104         Also test early cancellation before the thread reaches the cancellation
9105         point.
9107         * Makefile: Compile forward.c with exceptions.
9109         * sysdeps/unix/sysv/linux/sleep.c: New file.
9111 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9113         * Makefile: Add CFLAGS definition to compile function wrappers
9114         duplicated from libc with exceptions.
9115         * tst-cancel4.c: Also check cancellation handlers.
9117         * Makefile: Add rules to build and run tst-cancel16 and
9118         tst-cancelx16.  Add missing CFLAGS definitions.
9119         * tst-cancel16.c: New file.
9120         * tst-cancelx16.c: New file.
9122 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9124         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9125         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9126         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9127         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9129         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9130         (LIBC_CANCEL_RESET): Likewise.
9131         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9132         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9133         librt-cancellation.
9134         (CFLAGS-libcrt-cancellation.c): Define.
9135         * sysdeps/pthread/librt-cancellation.c: New file.
9136         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9137         macros also when compiling librt.
9138         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9140         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9141         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9142         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9143         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9144         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9146         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9147         compat_timer_create.
9149 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9151         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9153         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9154         __register_atfork.
9155         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9156         Add libc_hidden_def.
9158 2003-06-13  Roland McGrath  <roland@redhat.com>
9160         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9161         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9163 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9165         * allocatestack.c (queue_stack): Always inline.
9166         * ptreadhP.h (__do_cancel): Likewise.
9168 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9170         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9171         a typo.
9173 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9175         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9176         (__pthread_cond_signal): Remove incorrect second addition for
9177         cond_lock!=0.
9179 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9182         (__pthread_cond_signal): Use correct futex pointer in
9183         __lll_mutex_lock_wait call.
9185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9186         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9188 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9190         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9191         cancelable.
9192         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9193         Likewise.
9195         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9196         hand-written CFI generation code.  Since ENTRY/END also initiated
9197         CFI frames this caused two CFI sets to be generated.
9199 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9201         * cleanup_routine.c: New file.
9202         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9203         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9204         cleanup handling.
9205         * Makefile (libpthread-routines): Add cleanup_routine.
9206         Add more CFLAGS variables to compile with exceptions.  Add comments
9207         why which file needs unwind tables.
9208         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9209         tests.
9210         * tst-cancelx1.c: New file.
9211         * tst-cancelx2.c: New file.
9212         * tst-cancelx3.c: New file.
9213         * tst-cancelx4.c: New file.
9214         * tst-cancelx5.c: New file.
9215         * tst-cancelx6.c: New file.
9216         * tst-cancelx7.c: New file.
9217         * tst-cancelx8.c: New file.
9218         * tst-cancelx9.c: New file.
9219         * tst-cancelx10.c: New file.
9220         * tst-cancelx11.c: New file.
9221         * tst-cancelx12.c: New file.
9222         * tst-cancelx13.c: New file.
9223         * tst-cancelx14.c: New file.
9224         * tst-cancelx15.c: New file.
9225         * tst-cleanupx0.c: New file.
9226         * tst-cleanupx0.expect: New file.
9227         * tst-cleanupx1.c: New file.
9228         * tst-cleanupx2.c: New file.
9229         * tst-cleanupx3.c: New file.
9231         * tst-cleanup0.c: Make standard compliant.
9232         * tst-cleanup1.c: Likewise.
9234         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9235         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9236         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9237         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9238         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9239         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9240         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9241         CLEANUP_JMP_BUF.
9242         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9243         * tst-cancel12.c: New file.
9244         * tst-cancel13.c: New file.
9245         * tst-cancel14.c: New file.
9246         * tst-cancel15.c: New file.
9247         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9248         and tst-cancel15.
9250         * tst-cancel1.c: Add some comments.
9252         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9253         timeout correctly.
9255 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9257         * Makefile (CFLAGS-pthread_cancel.c): Define.
9259 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9261         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9262         Change type of __writer element to int.
9263         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9264         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9265         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9266         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9267         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9268         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9269         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9270         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9271         Compare with TID to determine deadlocks.
9272         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9273         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9274         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9275         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9276         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9277         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9278         Likewise.
9279         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9280         Likewise.
9281         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9282         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9283         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9284         Likewise.
9285         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9286         Likewise.
9287         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9288         * Makefile (tests): Add tst-rwlock12.
9289         * tst-rwlock12.c: New file.
9291 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9293         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9294         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9295         Remove bogus hidden_proto.
9296         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9297         Likewise.
9298         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9299         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9300         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9301         ___lll_mutex_timedlock): Likewise.
9303 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9305         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9306         (__pthread_cond_signal): Add some code to eventually handle
9307         cond_lock!=0.
9309 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9311         * Makefile (tests): Add tst-exec4.
9312         (tst-exec4-ARGS): Define.
9313         * tst-exec4.c: New file.
9315 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9317         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9318         Also fail if tv_nsec < 0.
9319         (__lll_timedwait_tid): Likewise.
9320         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9321         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9322         Likewise.
9323         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9324         Likewise.
9325         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9326         Likewise.
9327         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9328         Likewise.
9329         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9330         Likewise.
9331         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9332         Likewise.
9334         * Makefile (tests): Add tst-sem8 and tst-sem9.
9335         * tst-sem8.c: New file.
9336         * tst-sem9.c: New file.
9337         * sem_open.c: Fix creation of in_use record if the file exists but
9338         no internal record.
9340         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9341         definitions.
9343         * sysdeps/pthread/timer_create.c (timer_create): In case
9344         evp==NULL, assign timer ID to sival_ptr.
9346         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9347         struct pthread_unwind_buf *.
9348         (struct pthread): Likewise for cleanup_jmp_buf element.
9350         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9351         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9352         * unwind.c (__pthread_unwind_next): Likewise.
9354 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9356         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9357         (lll_futex_timed_wait): Use int for futex value parameter.
9358         (lll_futex_wake): Likewise.
9359         (lll_futex_requeue): Likewise.
9361         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9362         Replace one memory operation with one register operation.
9364         * tst-join4.c (do_test): Fix error message.
9366         * tst-rwlock6.c (do_test): Use correct format specifier.
9368         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9369         (__lll_mutex_lock_wait): Replace one memory operation with one
9370         register operation.
9371         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9372         (__lll_mutex_lock_wait): Likewise.
9374         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9375         (__lll_mutex_cond_lock): Add one to value parameter of
9376         __lll_lock_wait to reflect reality in the futex syscall.
9377         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9378         (lll_mutex_cond_lock): Likewise.
9380 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9382         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9383         New function.
9384         (lll_mutex_cond_lock): Define.
9386 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9388         * Makefile (tests): Add tst-signal6.
9389         * tst-signal6.c: New file.
9391         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9392         (__lll_mutex_unlock_force): New function
9393         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9395         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9396         (__lll_mutex_unlock_force): New function.
9397         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9399         * tst-rwlock7.c (do_test): Use correct format specifier.
9401         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9402         Find break parameter in correct asm argument.
9404 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9407         Remove out4.
9408         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9409         error occured.
9410         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9411         Add __mutex.
9412         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9413         lll_futex_requeue, lll_mutex_unlock_force): Define.
9415 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9417         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9418         (pthread_cond_t): Add __mutex.
9419         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9420         lll_futex_requeue, lll_mutex_unlock_force): Define.
9422 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9424         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9425         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9426         Add __mutex field.
9427         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9428         Define.
9429         (lll_futex_wait, lll_futex_wake): Define.
9430         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9431         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9432         FUTEX_REQUEUE instead of FUTEX_WAIT.
9433         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9434         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9435         mutex which was used in condvar structure.  Call
9436         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9437         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9439         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9440         include tcb-offsets.h.  Read wakeup value in locked region.
9441         Use the value of gbr register as THREAD_ID.
9442         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9444         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9446         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9447         macros.
9449 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9451         * sysdeps/pthread/pthread_cond_broadcast.c
9452         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9454 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9457         typo in register name.
9458         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9459         correctly.  Actually use requeue.  Little optimization.
9460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9461         mutex address early.  Handle cancellation state as 32-bit value.
9462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9463         Remove unnecessary label.
9465 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9467         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9468         instead of FUTEX_WAIT.
9469         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9470         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9471         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9472         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9474         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9475         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9476         of __pthread_mutex_lock_internal.
9477         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9479         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9480         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9483         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9484         Add pthread_mutex_cond_lock.
9485         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9486         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9487         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9488         lll_mutex_cond_lock.
9489         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9490         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9491         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9492         Add __mutex field.
9493         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9494         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9496         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9497         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9499         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9500         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9501         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9502         macro don't define aliases.
9504         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9505         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9506         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9507         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9509         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9510         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9512         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9514 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9516         * sem_open.c: Fix one endless loop.  Implement correct semantics
9517         wrt opening the same semaphore more then once.
9518         * sem_close.c: Adjust for sem_open change.
9519         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9520         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9521         * Makefile (tests): Add tst-sem7.
9522         * tst-sem7.c: New file.
9524 2003-05-16  Roland McGrath  <roland@redhat.com>
9526         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9527         uninitialized variable braino.
9529 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9531         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9532         test for syscall availability.
9534         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9535         __no_posix_timers to -1 if the syscalls don't exist.
9537         * pthread_join.c (pthread_join): Set tid field of the joined
9538         thread to -1.  This isn't necessary but helps to recognize some
9539         error conditions with almost no cost.
9541         * allocatestack.c (FREE_P): Also negative values indicate an
9542         unused stack.
9544         * unwind.c: Include <unistd.h>.
9546 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9548         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9550 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9552         * Makefile (crti-objs, crtn-objs): New variables.
9553         (omit-deps, extra-objs): Add crtn.
9554         ($(objpfx)libpthread.so): Depend on both crti and crtn
9555         and links to them in multidir.
9556         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9558 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9560         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9561         (lll_mutex_unlock): Use atomic_exchange_rel.
9563 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9565         * cond-perf.c (cons): Add missing locking around setting of alldone.
9567 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9569         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9570         related macros.
9571         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9573 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9575         * tst-sem6.c: New file.
9576         * Makefile (tests): Add tst-sem6.
9578         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9579         Use atomic_exchange_rel instead of atomic_exchange.
9580         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9581         Likewise.
9583         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9584         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9585         vsyscall is possible.
9587         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9588         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9589         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9590         pthread_setaffinity_np.
9591         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9592         and pthread_setaffinity_np.
9593         * Makefile (libpthread-routines): Add pthread_getaffinity and
9594         pthread_setaffinity.
9596         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9597         use it in case mmap to allocate the stack fails.
9598         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9599         ARCH_MAP_FLAGS here.
9600         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9601         ARCH_RETRY_MMAP.
9603 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9605         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9606         handler implementation.  It is now lockless in fork().
9607         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9608         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9609         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9610         declare the __fork_*_lists.
9611         (struct fork_handler): Include pointers to all three functions.
9612         Add next, refcntr and need_signal elements.
9613         (__fork_handlers): New declaration.
9614         (__register_atfork_malloc): Remove declaration.
9615         (HAVE_register_atfork_malloc): Remove definition.
9616         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9617         __pthread_child_handler variable.
9618         (__libc_pthread_init): Use __register_atfork instead of explicitly
9619         adding to the list.
9620         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9621         and lll_futex_wake.
9622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9624         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9625         function must never be reached.
9627         * cond-perf.c: New file.
9629 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9631         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9633 2003-05-04  Roland McGrath  <roland@redhat.com>
9635         * Makefile ($(objpfx)../libc.so): New target.
9637 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9639         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9640         (pthread_condattr_t): Size is only an int, don't use long for
9641         alignment.
9642         (pthread_mutexattr_t): Likewise.
9643         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9644         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9645         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9647 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9649         * sysdeps/i386/tls.h: Define THREAD_ID.
9650         * sysdeps/ia64/tls.h: Likewise.
9651         * sysdeps/powerpc/tls.h: Likewise.
9652         * sysdeps/s390/tls.h: Likewise.
9653         * sysdeps/sh/tls.h: Likewise.
9654         * sysdeps/x86_64/tls.h: Likewise.
9655         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9656         record ownership.
9657         * pthread_mutex_timedlock.c: Likewise.
9658         * pthread_mutex_trylock.c: Likewise.
9659         * pthread_mutex_unlock.c: Likewise.
9660         * pthread_rwlock_trywrlock.c: Likewise.
9661         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9662         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9663         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9664         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9666         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9667         flag.
9669 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9671         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9672         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9673         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9674         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9675         Make __align long long instead of long.
9676         (pthread_rwlock_t): Formatting.
9677         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9678         (pthread_rwlock_t): Formatting.
9679         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9680         (pthread_cond_t): Make __align long long instead of long.
9681         (pthread_rwlock_t): Move __flags field to the same position as in
9682         linuxthreads.
9684 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9686         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9687         * tst-rwlock7.c (do_test): Likewise.
9689 2003-04-26  Roland McGrath  <roland@redhat.com>
9691         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9693 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9695         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9696         sizeof (struct pthread).
9697         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9698         1 struct pthread.
9699         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9700         to 0.
9701         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9702         struct pthread.
9703         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9704         to 32-bit bytes.
9705         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9706         tcbp.
9707         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9708         unneccessarily.
9709         (NO_TLS_OFFSET): Define.
9710         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9711         add TLS_TCB_SIZE unnecessarily.
9713 2003-04-22  Roland McGrath  <roland@redhat.com>
9715         * Makeconfig (shared-thread-library): Reverse link order to work
9716         around linker bug.
9718 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9720         * semaphore.h: Fix typo in comment.
9722 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9724         * sysdeps/pthread/sigfillset.c: New file.
9726         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9727         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9728         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9729         * sysdeps/pthread/sigaction.c: Likewise.
9730         * sysdeps/pthread/sigprocmask.c: New file.
9731         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9732         __SIGRTMIN+1.
9733         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9734         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9735         in this case.
9737 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9739         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9740         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9742         * sysdeps/unix/sysv/linux/unregister-atfork.c
9743         (__unregister_atfork): Don't free memory not allocated dynamically.
9745         * semaphore.h: Remove __THROW marker from cancellation points.
9746         * nptl/sysdeps/pthread/pthread.h: Likewise.
9748 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9750         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9751         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9752         __THROW.
9754 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9756         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9758 2003-04-15  Roland McGrath  <roland@redhat.com>
9760         * forward.c (__pthread_unwind): Tweak to avoid warning.
9762 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9764         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9766 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9769         overflow CFA advance instructions.
9770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9772 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9774         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9775         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9776         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9777         defined.
9779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9780         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9782         DW_CFA_advance_loc for .Laddl-.Lsubl.
9784 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9786         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9787         position-independent unwind data for static libraries.
9788         Add missing unwind info.  Add comments.
9790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9791         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9792         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9795 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9797         * Makefile: Make sure all cancellation points are compiled with
9798         exception and asynchronous unwind tables.
9800         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9801         which mishandles loading of global object addresses in PIC.
9802         (THREAD_SETMEM_NC): Likewise.
9804 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9806         * pthread.h: Define new data structure for cleanup buffer.  Declare
9807         new cleanup handler interfaces.
9808         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9809         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9810         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9811         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9812         it.  Declare old cleanup handler installation functions.
9813         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9814         handling.
9815         * cleanup_defer.c: Likewise.
9816         * cleanup_compat.c: New file.  Old cleanup code.
9817         * cleanup_def_compat.c: New file.  Old cleanup code.
9818         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9819         if own thread descriptor.
9820         * unwind.c: New file.
9821         * forward.c: Add __pthread_unwind.
9822         * init.c (pthread_functions): Add __pthread_unwind.
9823         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9824         Add ptr___pthread_unwind.
9825         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9826         and unwind function.
9827         * Makefile (libpthread-routines): Add cleanup_compat,
9828         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9829         table generation if necessary.
9830         * version.c: Record whether unwind support is compiled in.
9831         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9832         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9833         handler interfaces.
9834         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9835         complication to generate unwind information for syscall wrappers.
9836         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9837         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9838         __cleanup_fct_attribute.
9840         * Makefile: Add rules to build and run tst-cleanup0.
9841         * tst-cleanup0.c: New file.
9842         * tst-cleanup0.expect: New file.
9844         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9845         caller.  Optimize to avoid often unecessary local variable.
9847 2003-04-11  Roland McGrath  <roland@redhat.com>
9849         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9850         sets variable `multidir'; include that.
9851         (generated): Add it.
9852         ($(objpfx)$(multidir)/crti.o): New target.
9853         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9855 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9857         * tst-attr2.c (do_test): Add cast to avoid warning.
9858         * tst-mutex4.c (do_test): Likewise.
9860 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9862         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9863         in child.
9865 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9867         * Makefile (tests): Add tst-detach1.
9868         * tst-detach1.c: New file.
9870 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9872         * sysdeps/pthread/pthread.h: Remove duplicate
9873         pthread_cleanup_{push,pop} definitions.
9875         * tst-barrier2.c: Eliminate warnings.
9876         * tst-cancel4.c: Likewise.
9877         * tst-cond4.c: Likewise.
9878         * tst-cond6.c: Likewise.
9879         * tst-detach1.c: Likewise.
9880         * tst-rwlock4.c: Likewise.
9881         * tst-rwlock6.c: Likewise.
9882         * tst-rwlock7.c: Likewise.
9883         * tst-sem3.c: Likewise.
9884         * tst-spin2.c: Likewise.
9885         * tst-umask1.c: Likewise.
9887 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9889         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9891 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9893         * descr.h (struct pthread): Move cancelhandling member to the front.
9895 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9897         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9898         malloc_parent, and malloc_child statically.
9899         (__register_atfork_malloc): New function.
9900         (free_mem): Don't free any of the malloc_* variables on the list.
9901         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9902         Define HAVE_register_atfork_malloc.
9904 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9906         * sysdeps/pthread/createthread.c (create_thread): Add some more
9907         comments explaining when to set multiple_threads and when not.
9909         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9910         THREAD_ATOMIC_BIT_SET if not already defined.
9911         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9912         THREAD_ATOMIC_BIT_SET:
9913         * sysdeps/x86_64/tls.h: Likewise.
9914         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9915         THREAD_ATOMIC_CMPXCHG_VAL.
9916         (_pthread_cleanup_pop_restore): Likewise.
9917         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9918         (__pthread_enable_asynccancel_2): Likewise.
9919         (__pthread_disable_asynccancel): Likewise.
9920         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9921         (__libc_disable_asynccancel): Likewise.
9922         * init.c (sigcancel_handler): Likewise.
9923         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9924         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9926 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9928         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9929         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9930         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9931         * Makefile (tests): Add tst-cancel11.
9932         * tst-cancel11.c: New file.
9934 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9936         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9937         round, not the first.  Use specific_used flag instead of local
9938         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9939         (__free_tcb): Don't call deallocate_tsd here.
9940         (start_thread): Call deallocate_tsd here.
9941         * pthread_setspecific.c: Set specific_used flag really only when
9942         needed.
9943         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9944         * tst-tsd3.c: New file.
9945         * tst-tsd4.c: New file.
9947 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9950         Use atomic_exchange_and_add instead of __lll_add.
9951         (__lll_mutex_timedlock): Likewise.
9952         Patch by Ian Wienand.
9954 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9956         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9957         (SINGLE_THREAD_P): Fix typo.
9958         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9960 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9962         * Makefile (tests): Add tst-align.
9963         * tst-align.c: New file.
9964         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9966         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9967         function correctly.
9969         * tst-tsd2.c: Add casts to avoid warnings.
9971 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9973         * descr.h (struct pthread): Move most often used elements to the front.
9975 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9977         * Makefile (libpthread-routines): Add pthread_atfork.
9978         (libpthread-static-only-routines): Add pthread_atfork.
9980 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9982         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9983         of TLS_DTV_AT_TP.
9984         (INSTALL_DTV): Add parens.
9985         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9986         Use passed descr instead of THREAD_SELF.
9987         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9988         (__lll_mutex_timedlock_wait): Correct expected value after
9989         spurious wakeup.
9990         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9991         Release lock before waking up the waiters.
9992         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9993         criteria.  Reorderstruct passed to cleanup handler.  Fix
9994         handling of cancellation and failung pthread_mutex_unlock call.
9995         Use __pthread_enable_asynccancel_2 instead of
9996         __pthread_enable_asynccancel.
9997         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9998         Return result of lock re-get if it fails.
9999         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10000         for __pthread_cleanup_push.
10001         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10002         completely broken rwlock implementation.
10003         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10004         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10005         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10006         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10007         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10008         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
10009         versioned_symbol macro.
10010         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10011         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10013 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
10015         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10016         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
10017         and __helper_tid.
10018         (struct timer): Remove th and bar field.
10019         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10020         debugging code.  Create only one helper thread.
10021         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10022         helper thread.
10023         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10024         Renamed.  Define statically.  Use thread info from siginfo.
10025         (__helper_once): New variable.
10026         (__helper_tid): New variable.
10027         (__reset_helper_control): New function.
10028         (__start_helper_thread): New function.
10030         * pthread_create.c (start_thread): Don't use setjmp inside
10031         __builtin_expect to work around gcc bug.
10033         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10034         timer_delete syscall fails, but not with ENOSYS, set
10035         __no_posix_timers.
10037         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10038         (timer_settime): Fix typo.
10039         * sysdeps/unix/sysv/linux/timer_getoverr.c
10040         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10042 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
10044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10045         offset of cleanupbuf.__prev.
10047 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
10049         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10050         of included file.
10052 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
10054         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10055         NULL provide default definition to syscall.
10057 2003-03-25  Roland McGrath  <roland@redhat.com>
10059         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10060         (timer_id2ptr): Fix typo.
10062 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
10064         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10065         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10066         * sysdeps/ia64/pthreaddef.h: Likewise.
10067         * sysdeps/powerpc/pthreaddef.h: Likewise.
10068         * sysdeps/s390/pthreaddef.h: Likewise.
10069         * sysdeps/sh/pthreaddef.h: Likewise.
10070         * sysdeps/x86_64/pthreaddef.h: Likewise.
10071         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10072         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10073         being changed.
10074         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10075         SIGTIMER is not unblocked.
10076         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10077         RT signal taken.
10078         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10079         be send.
10080         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10081         pass pointer through as ID.
10082         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10083         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10084         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10085         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10086         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10087         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10088         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10089         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10090         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10091         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10092         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10093         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10094         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10095         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10096         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10097         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10098         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10099         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10100         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10101         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10102         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10103         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10104         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10105         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10106         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10107         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10108         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10109         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10110         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10111         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10112         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10113         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10114         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10116         * pthreadP.h: Remove FRAME_LEFT definition.
10117         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10118         already left frame.  Programs which have this problem are not POSIX
10119         compliant.
10120         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10122 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10124         * sysdeps/pthread/tst-timer.c: Check return values of the
10125         functions we test.
10127 2003-03-23  Roland McGrath  <roland@redhat.com>
10129         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10130         * tst-tls3mod.c: Likewise.
10131         * tst-tls1.c: Likewise.
10132         * tst-tls2.c: Likewise.
10134         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10135         undefined behavior.
10137         * tst-join5.c (tf1, tf2): Add a cast.
10139         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10141         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10142         Don't test anything.
10143         * tst-cond4.c: Likewise.
10144         * tst-cond6.c: Likewise.
10145         * tst-flock2.c: Likewise.
10146         * tst-mutex4.c: Likewise.
10147         * tst-rwlock4.c: Likewise.
10148         * tst-signal1.c: Likewise.
10149         * tst-spin2.c: Likewise.
10150         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10152         * tst-mutex4.c: Use test-skeleton.c.
10153         * tst-spin2.c: Likewise.
10154         * tst-sysconf.c: Likewise.
10155         * tst-barrier2.c: Likewise.
10156         * tst-cond4.c: Likewise.
10157         * tst-cond6.c: Likewise.
10158         * tst-rwlock4.c: Likewise.
10159         * tst-unload.c: Likewise.
10160         * tst-flock2.c (do_test): Use return instead of exit.
10162 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10164         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10166 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10168         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10169         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10170         instead of __lll_compare_and_swap.
10171         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10172         Likewise.
10173         Removed definition if __lll_compare_and_swap.
10175         * cancellation.c: Adjust for new form of compare&exchange macros.
10176         * cleanup_defer.c: Likewise.
10177         * init.c: Likewise.
10178         * libc-cancellation.c: Likewise.
10179         * old_pthread_cond_broadcast.c: Likewise.
10180         * old_pthread_cond_signal.c: Likewise.
10181         * old_pthread_cond_timedwait.c: Likewise.
10182         * old_pthread_cond_wait.c: Likewise.
10183         * pthread_cancel.c: Likewise.
10184         * pthread_create.c: Likewise.
10185         * pthread_detach.c: Likewise.
10186         * pthread_join.c: Likewise.
10187         * pthread_key_delete.c: Likewise.
10188         * pthread_setcancelstate.c: Likewise.
10189         * pthread_setcanceltype.c: Likewise.
10190         * pthread_timedjoin.c: Likewise.
10191         * pthread_tryjoin.c: Likewise.
10192         * sysdeps/pthread/createthread.c: Likewise.
10194 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10196         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10197         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10198         definitions.  Replace uses with calls to atomic_* functions.
10199         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10200         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10201         __lll_test_and_set calls with atomic_exchange_and_add and
10202         atomic_exchange calls respectively.
10203         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10204         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10205         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10206         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10207         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10208         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10209         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10211         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10212         returns the old value.
10214 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10216         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10217         int for variable OLDVAL and correct inline assembler contraint.
10218         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10219         type int for variable OLD.
10221         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10222         only for s390-32.
10223         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10224         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10225         instead of multiple_threads field in the TCB.
10227 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10229         * sysdeps/i386/i686/bits/atomic.h: Removed.
10230         * sysdeps/i386/i586/bits/atomic.h: Removed.
10231         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10232         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10233         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10234         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10235         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10236         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10237         * atomic.h: Removed.  Moved to glibc.
10239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10240         support for clock selection.
10242         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10243         signalling waiters.
10245 2003-03-18  Roland McGrath  <roland@redhat.com>
10247         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10248         Add __lll_rel_instr first.  Add memory clobber.
10249         (lll_mutex_unlock): Use __lll_test_and_set.
10250         From Paul Mackerras <paulus@samba.org>.
10252         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10253         unconditionally.
10254         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10255         (SINGLE_THREAD_P):  Add `header.' prefix.
10256         From Paul Mackerras <paulus@samba.org>.
10258         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10259         pthread_timedjoin_np to ...
10260         (libpthread: GLIBC_2.3.3): ... here.
10261         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10263         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10264         Avoid shadowing VAL variable.
10266         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10267         New macro.
10269 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10271         * Makefile (tests): Add tst-cond11.
10272         * tst-cond11.c: New file.
10274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10275         struct passed to cleanup handler to eliminate one more
10276         instruction.
10277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10279         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10280         (pthrad_cond_t): Replace __unused field with __clock.
10282         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10283         waken all waiters in cleanup handler.
10284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10287         * pthread_condattr_getclock.c: New file.
10288         * pthread_condattr_setclock.c: New file.
10289         * sysdeps/pthread/pthread.h: Declare these new functions.
10290         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10291         * Makefile (libpthread-routines): Add the new functions.
10292         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10293         Renamed field to value.  Document use of the bits.
10294         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10295         change.
10296         * pthread_condattr_setpshared.c: Likewise.
10297         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10298         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10299         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10300         Add __clock field.
10301         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10302         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10303         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10304         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10305         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10306         Implement clock selection.
10307         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10308         * pthread-errnos.sym: Add ENOSYS.
10309         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10310         _POSIX_CLOCK_SELECTION.
10311         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10313         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10314         invalid .size directive.
10316 2003-03-17  Roland McGrath  <roland@redhat.com>
10318         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10319         Formatting tweaks.
10321 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10323         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10324         Use __lll_add instead of spelling it out.  Use protected symbol names.
10325         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10326         Use __lll_add.
10327         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10328         Renamed from lll_compare_and_swap.  Use new name where necessary.
10329         (__lll_add): Defined.
10330         (__lll_dec_if_positive): Defined.
10331         (__lll_test_and_set): Defined.
10332         * sysdeps/ia64/pthread_spin_init.c: Removed.
10333         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10334         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10335         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10336         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10337         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10338         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10339         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10340         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10341         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10342         __sync_lock_release_si.
10343         Patch by Jakub Jelinek.
10345         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10346         Fix timeout handling.
10347         (__lll_timedwait_tid): Likewise.
10348         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10349         Patch by Jakub Jelinek.
10351         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10353 2003-03-17  Roland McGrath  <roland@redhat.com>
10355         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10356         * sysdeps/pthread/pthread_spin_init.c: New file.
10357         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10358         * sysdeps/powerpc/Makefile: New file.
10359         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10360         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10361         * sysdeps/powerpc/pthreaddef.h: New file.
10362         * sysdeps/powerpc/tcb-offsets.sym: New file.
10363         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10364         * sysdeps/powerpc/tls.h: New file.
10365         * sysdeps/powerpc/bits/atomic.h: New file.
10366         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10367         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10368         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10370         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10371         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10372         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10373         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10374         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10375         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10376         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10377         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10378         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10379         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10380         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10381         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10382         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10383         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10384         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10386         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10387         not gettimeofday.
10388         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10389         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10390         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10391         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10392         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10394 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10396         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10397         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10400         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10402 2003-03-16  Roland McGrath  <roland@redhat.com>
10404         * tst-fork4.c: Include <string.h>.
10405         * tst-signal2.c: Likewise.
10406         * tst-mutex5.c (do_test): exit -> return.
10407         * tst-mutex2.c: Include <stdlib.h>.
10409 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10411         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10412         (__lll_mutex_timedlock_wait): Correct expected value after
10413         spurious wakeup.  Otherwise we would never wait again.
10415         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10416         zone versus inline asm stupidity.  Use correct instructions.
10418         * tst-rwlock6.c: Add some more status output.
10420 2003-03-15  Roland McGrath  <roland@redhat.com>
10422         * sysdeps/pthread/configure.in: New file.
10423         * sysdeps/pthread/configure: New file (generated).
10425 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10427         * allocatestack.c (allocate_stack): Store the exact stack size of
10428         user allocated stacks.
10430 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10432         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10433         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10434         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10435         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10436         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10437         Use `header.' prefix.
10438         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10440 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10442         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10443         __builtin_frame_address, use stack pointer.
10445         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10446         instead of __builtin_frame_pointer.
10448 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10450         * tst-basic1.c (do_test): Add cast to avoid warning.
10451         * tst-basic2.c (do_test): Likewise.
10453         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10454         amount of stack correction.
10456         * tst-fork4.c: Use test-skeleton.c.
10458 2003-03-14  Roland McGrath  <roland@redhat.com>
10460         * init.c: Fix typo "#eli" for "#else".
10462 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10464         * allocatestack.c (__stack_user): Use hidden_data_def.
10465         * pthread_create.c (__pthread_keys): Likewise.
10467         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10469 2003-03-14  Roland McGrath  <roland@redhat.com>
10471         * tst-fork4.c: New file.
10472         * Makefile (tests): Add it.
10474         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10475         we always define the padding space.
10476         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10477         stopped supporting its own extensions fully.
10478         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10479         struct also called `header', so `header.multiple_threads' is the field
10480         name to use on all machines.
10481         * allocatestack.c (allocate_stack): Use `header.' prefix.
10482         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10483         * pthread_create.c (__pthread_create_2_1): Likewise.
10484         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10485         (THREAD_SELF): Likewise.
10486         * sysdeps/x86_64/tls.h: Likewise.
10487         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10488         (SINGLE_THREAD_P): Likewise.
10489         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10490         (SINGLE_THREAD_P): Likewise.
10491         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10492         (SINGLE_THREAD_P): Likewise.
10494         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10495         value directly.
10497 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10499         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10500         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10502         * pthread_create.c (start_thread): setjmp is expected to return 0.
10504         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10505         (THREAD_GETMEM_NC): Likewise.
10507 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10509         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10510         and the size of the stack which must be allocated is a multiple,
10511         allocate one more page.
10512         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10513         MULTI_PAGE_ALIASING.
10515 2003-03-13  Roland McGrath  <roland@redhat.com>
10517         * pthread_create.c (start_thread): Set EXITING_BIT after the
10518         event-reporting (and destructors), not before.
10520 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10522         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10523         lll_futex_wake): Declare register variables as long int instead of
10524         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10525         Make syscall arguments clobbered by the syscall.
10526         (lll_futex_wait): Define using lll_futex_timed_wait.
10528         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10529         to void *.
10531         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10532         PPID if [! NDEBUG].
10534         * allocatestack.c (nptl_ncreated): Only declare if
10535         COLORING_INCREMENT != 0.
10537         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10538         (__libc_enable_asynccancel_2): Remove prototype.
10540         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10541         ctid to match kernel.
10543 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10545         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10546         libc_multiple_threads.
10547         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10548         __libc_multiple_threads to...
10549         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10551         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10552         versioning.
10553         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10554         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10556         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10557         (__pthread_once_internal): Define.
10559         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10560         macros instead of .symver directly.
10561         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10562         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10564         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10565         * sysdeps/x86_64/tcb-offsets.sym: New file.
10566         * sysdeps/x86_64/Makefile: New file.
10568         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10569         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10570         to access own pthread_t in TCB.
10571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10572         Likewise.
10573         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10574         Likewise.
10575         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10577 2003-03-12  Roland McGrath  <roland@redhat.com>
10579         * pthread-errnos.sym: New file.
10580         * Makefile (gen-as-const-headers): New variable, list that file.
10581         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10582         header <pthread-errnos.h> instead of defining errno values here.
10583         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10584         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10585         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10588         Likewise.
10589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10590         Likewise.
10591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10593         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10594         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10595         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10596         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10597         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10598         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10600         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10602         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10603         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10604         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10605         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10606         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10608         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10609         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10610         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10611         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10612         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10613         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10614         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10615         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10617         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10619         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10620         CLONE_CHILD_SETTID worked.
10622 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10624         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10625         file.
10626         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10627         file.
10629         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10630         (pthread_cond_t): Add padding.
10632         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10634         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10637         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10638         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10639         (__pthread_rwlock_timedrdlock): Likewise.
10640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10641         (__pthread_rwlock_wrlock): Likewise.
10642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10643         (__pthread_rwlock_rdlock): Likewise.
10645         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10648         result of lock re-get if it fails.
10650 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10652         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10653         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10654         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10655         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10657         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10658         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10659         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10660         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10661         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10663         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10664         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10666         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10667         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10668         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10669         (create_thread): Likewise.
10670         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10671         * init.c (__pthread_initialize_minimal_internal): Initialize
10672         __libc_multiple_threads_ptr if necessary.
10673         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10674         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10675         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10676         __libc_multiple_threads.
10677         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10678         necessary.
10680         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10681         (THREAD_SETMEM_NC): Likewise.
10683         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10684         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10685         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10686         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10688         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10689         Eliminate one entire instruction.
10691         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10692         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10693         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10694         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10695         instead of __pthread_enable_asynccancel.
10696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10697         (__pthread_cond_wait): Likewise.
10698         * sysdeps/pthread/pthread_cond_timedwait.c
10699         (__pthread_cond_timedwait): Likewise.
10700         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10703         (__condvar_cleanup): Wake up all waiters in case we got signaled
10704         after being woken up but before disabling asynchronous
10705         cancellation.
10706         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10707         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10708         (__condvar_cleanup): Likewise.
10710         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10711         Make it an error if architecture has no #if case.  Add x86-64.
10713         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10714         pt-initfini.s generation.
10716         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10717         (TLS_INIT_TP): Fix typo.
10719 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10721         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10722         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10724         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10725         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10726         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10727         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10728         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10729         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10730         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10731         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10733 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10735         * sysdeps/pthread/pthread_cond_timedwait.c
10736         (__pthread_cond_timedwait): Return the result of the final
10737         locking.  If it succeeds, the regular function return value.
10739         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10740         Return result of the final locking.
10741         * version.c (__nptl_main): Work around problems with the strange
10742         INTERNAL_SYSCALL macro on ppc32.
10743         * init.c (__pthread_initialize_minimal_internal): Unblock
10744         SIGCANCEL in case the parent blocked it.
10745         Reported by Paul Mackerras <paulus@samba.org>.
10747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10749         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10751 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10753         * sysdeps/pthread/pthread_cond_timedwait.c
10754         (__pthread_cond_timedwait): Unlock and fail if
10755         __pthread_mutex_unlock_internal failed.
10757         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10758         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10759         Use ARCH_CLONE.
10760         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10761         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10762         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10763         ALLOCATE_STACK): New macros.
10764         (TLS_TPADJ): New macro.
10765         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10766         (allocate_stack): Handle TLS_DTV_AT_TP and
10767         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10768         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10769         Don't set PD->self.
10770         * init.c [__ia64__] (__NR_set_tid_address): Define.
10772         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10773         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10774         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10775         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10776         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10777         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10778         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10779         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10780         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10781         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10782         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10783         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10784         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10785         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10786         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10787         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10788         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10789         * sysdeps/ia64/bits/atomic.h: New file.
10790         * sysdeps/ia64/Makefile: New file.
10791         * sysdeps/ia64/pthread_spin_init.c: New file.
10792         * sysdeps/ia64/pthread_spin_lock.c: New file.
10793         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10794         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10795         * sysdeps/ia64/pthreaddef.h: New file.
10796         * sysdeps/ia64/tcb-offsets.sym: New file.
10797         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10798         * sysdeps/ia64/tls.h: New file.
10800         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10801         to syscall instead of no arguments.
10803 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10805         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10806         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10807         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10808         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10810         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10811         unused code.
10813         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10815         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10816         lowlevelbarrier.sym.
10817         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10818         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10819         Include lowlevelbarrier.h and don't define offsets locally.
10820         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10822         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10823         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10824         (__lll_mutex_timedlock_wait): Likewise.
10825         (lll_mutex_lock): Adjust asm for that.
10826         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10827         (lll_lock): Adjust asm for operand order change.
10828         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10829         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10831         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10832         Reverse order of parameters.
10833         (__lll_timedwait_tid): Remove regparms attribute.
10834         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10835         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10837         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10838         (__lll_timedwait_tid): Remove one unnecessary instruction.
10840         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10841         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10842         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10843         lowlevelmutex.S.
10845         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10846         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10847         for NOT_IN_libc.
10848         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10849         lowlevellock.S.
10851         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10852         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10853         for libc.so.
10854         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10855         define LOCK here (if UP is not defined).  The actual code is in
10856         lowlevelmutex.S.
10858         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10859         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10860         __lll_timedwait_tid for libc.so.
10861         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10862         define LOCK here (if UP is not defined).  The actual code is in
10863         lowlevellock.S.
10865         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10866         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10867         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10868         instead of lowlevelsem.h.
10869         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10870         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10871         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10873         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10874         lowlevelrwlock.sym.
10875         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10876         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10877         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10879         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10880         register loading.
10881         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10882         last changed.  D'oh.
10884         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10886         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10887         of __libc_locking_needed.
10888         (lll_trylock): Initialize %eax to zero.
10890         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10891         pthread_cond_t definition.
10893 2003-03-10  Roland McGrath  <roland@redhat.com>
10895         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10896         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10897         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10898         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10899         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10901         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10902         Instead of setting PD->multiple_threads, set globals
10903         __pthread_multiple_threads and __libc_multiple_threads.
10904         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10905         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10906         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10908         * descr.h (struct pthread): Conditionalize first member on
10909         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10910         containing an anonymous tcbhead_t.  Move `list' member out.
10911         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10912         * allocatestack.c: Remove use of `header.data.' prefix.
10913         * pthread_create.c: Likewise.
10914         * init.c (__pthread_initialize_minimal_internal): Likewise.
10915         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10916         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10917         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10918         * sysdeps/x86_64/tls.h: Likewise.
10919         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10920         (SINGLE_THREAD_P): Likewise.
10921         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10922         (SINGLE_THREAD_P): Likewise.
10923         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10924         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10926 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10928         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10930         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10931         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10933         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10934         leftovers from the ia32 code.
10936         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10937         memory load.
10938         (clear_once_control): Don't load %esi.
10940         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10941         handling.
10943         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10945         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10946         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10948         * Makefile (tests): Add tst-cond10.
10949         * tst-cond10.c: New file.
10951 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10953         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10954         * tst-signal3.c (do_test): Likewise.
10955         * tst-sem5.c (do_test): Likewise.
10956         * tst-kill6.c (do_test): Likewise.
10957         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10959         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10960         of inc/dec.
10961         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10962         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10963         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10964         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10965         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10967         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10968         Likewise.
10969         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10970         Likewise.
10971         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10976         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10977         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10978         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10980         * allocatestack.c (allocate_stack): If mprotect() fails free the
10981         TLS memory.
10983 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10985         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10987         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10988         lll_wake_tid.  This was used only to work around kernel limits in
10989         the early days.
10990         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10991         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10992         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10993         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10995         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10996         (__pthread_initialize_minimal_internal): Change initialization of
10997         __static_tls_align_m1 appropriately.
10998         * pthreadP.h (__static_tls_align_m1): Renamed from
10999         __static_tls_align.
11000         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11001         instead of __static_tls_align-1.
11003 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
11005         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11007         * pthread_create.c: Define __pthread_keys using nocommon
11008         attribute, not by placing it explicitly in bss.
11009         Remove DEFINE_DEALLOC definition.  Not needed anymore.
11011         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11012         Use it in mmap call to allocate stacks.
11014         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11016         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11017         result of the thread function.
11019 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
11021         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
11022         version is just fine.
11024         * sysdeps/unix/sysv/linux/libc_pthread_init.c
11025         (__pthread_child_handler): Renamed from pthread_child_handler,
11026         exported, and marked hidden.  Change all users.
11027         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11028         free __pthread_child_handler from child list.
11030 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11032         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11034         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11035         Fix handling of cancellation and failing pthread_mutex_unlock call.
11036         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11037         (__pthread_cond_wait): Likewise.
11039         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11040         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11041         lll_futex_timed_wait call.
11042         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11043         (pthread_rwlock_timedwrlock): Likewise.
11045         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11046         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11047         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11049         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11050         check of lll_futex_wake return value.
11052 2003-03-03  Roland McGrath  <roland@redhat.com>
11054         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11056         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11057         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11058         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11060 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
11062         * sysdeps/pthread/timer_create.c (timer_create): Return correct
11063         error for CPU clocks.
11065         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11066         _POSIX_MONOTONIC_CLOCK.
11067         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11069         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11070         recent kernels.
11072 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11074         * descr.h (struct pthread): Move cleanup field to the front.
11076 2003-03-01  Roland McGrath  <roland@redhat.com>
11078         * sem_open.c (sem_open): Braino fix.
11080 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11082         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11084         __pthread_cleanup_pop functionality.
11085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11087         * descr.h (struct pthread): Move tid field to the front now that
11088         it is often used.
11090         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11091         (__lll_mutex_timedlock_wait): Remove.
11092         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11093         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11094         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11095         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11096         (lll_unlock_wake_cb): Don't save and restore %esi.
11097         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11098         %esi.
11099         (__lll_timedwait_tid): Add alignment.
11100         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11101         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11102         %esi.
11103         (__lll_timedwait_tid): Removed.
11104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11105         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11106         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11107         (pthread_barrier_wait): Don't save, load, and restore %esi for
11108         last thread.
11109         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11110         (__pthread_cond_signal): Don't save, load, and restore %esi.
11111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11112         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11113         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11114         Don't save, load, and restore %esi.
11116 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11118         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11119         Release lock before waking up the waiters.
11121         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11123         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11124         (reader_thread): Likewise.
11126         * sysdeps/pthread/pthread_rwlock_unlock.c
11127         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11128         to wake up readers if there are none.
11130         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11131         Release internal lock before wake threads.
11133 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11135         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11136         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11137         predefined.
11138         * tst-rwlock9.c: Likewise.
11139         * tst-rwlock10.c: New file.
11140         * tst-rwlock11.c: New file.
11142         * Makefile (tests): Add tst-dlsym1.
11143         * tst-dlsym1.c: New file.
11145         * init.c (__pthread_initialize_minimal_internal): Set
11146         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11147         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11149 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11151         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11153         * tst-cond2.c: Fix sychronization with child.
11155         * tst-rwlock8.c (reader_thread): Remove unused variable.
11157         * Makefile: Add rules to build and run tst-tls3.
11158         * tst-tls3.c: New file.
11159         * tst-tls3mod.c: New file.
11161         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11162         * tst-rwlock8.c: New file.
11163         * tst-rwlock9.c: New file.
11164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11165         complete broken rwlock implementation.
11166         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11167         Likewise.
11168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11169         Likewise.
11170         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11171         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11172         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11173         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11174         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11175         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11176         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11178 2003-02-23  Roland McGrath  <roland@redhat.com>
11180         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11182 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11184         * Makefile (tests): Add tst-context1.
11185         * tst-context1.c: New file.
11187         * Makefile (tests): Add tst-tls1 and tst-tls2.
11188         * tst-tls1.c: New file.
11189         * tst-tls2.c: New file.
11191         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11192         for failed cmpxchg.
11194         * pthread_create.c (start_thread): Set EXITING_BIT early.
11196         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11197         (THREAD_GETMEM_NC): Likewise.
11199 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11201         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11202         off 3 more bytes by using offset-less instructions when possible.
11204         * Makefile: Add dependency for $(objpfx)version.d.
11206         * eintr.c (eintr_source): Add unnecessary return but the compiler
11207         insists.
11209         * tst-kill3.c: Include <unistd.h>.
11211 2003-02-21  Roland McGrath  <roland@redhat.com>
11213         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11215 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11217         * Makefile (tests): Add tst-eintr1.
11218         (distribute): Add eintr.c.
11219         * tst-eintr1.c: New file.
11220         * eintr.c: New file.
11222         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11224         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11225         Disallow sending SIGCANCEL.
11227         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11228         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11229         * tst-kill1.c: New file.
11230         * tst-kill2.c: New file.
11231         * tst-kill3.c: New file.
11232         * tst-kill5.c: New file.
11233         * tst-kill6.c: New file.
11234         * tst-basic7.c: Renamed to...
11235         * tst-kill4.c: ...this.
11237 2003-02-21  Roland McGrath  <roland@redhat.com>
11239         * Makefile (install-lib-ldscripts): New variable.
11241 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11243         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11244         * pthread_cancel.c: Use INVALID_TD_P.
11245         * pthread_detach.c: Likewise.
11246         * pthread_getschedparam.c: Likewise.
11247         * pthread_setschedparam.c: Likewise.
11248         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11249         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11250         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11251         * pthread_timedjoin.c: Likewise.
11253         * tst-basic7.c: Include <signal.h>.
11255         * pthread_join.c (pthread_join): Limited checking for invalid
11256         descriptors.
11257         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11259 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11261         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11262         beginning of the loop.  Clear the entire first block of TSD.
11263         * Makefile (tests): Add tst-key4.
11264         * tst-key4.c: New file.
11266 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11268         * Makefile (tests): Add tst-basic7.
11269         * tst-basic7.c: New file.
11271         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11272         Add some more __builtin_expect.
11274         * pthreadP.h: Define dummy version of DEBUGGING_P.
11276 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11278         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11279         _POSIX_THREAD_PRIORITY_SCHEDULING.
11280         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11281         _XOPEN_REALTIME_THREADS.
11282         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11284         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11285         kernel returns EINVAL for PID <= 0, work around it.
11287         * Makefile (tests): Add tst-signal5.
11288         * tst-signal5.c: New file.
11290         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11291         and LOGIN_NAME_MAX.
11293         * tst-cancel1.c (tf): Block all signals.
11295         * Makefile (tests): Add tst-basic6.
11296         * tst-basic6.c: New file.
11298         * tst-basic1.c: Add test for process ID.
11300         * Makefile (tests): Add tst-cancel10.
11301         * tst-cancel10.c: New file.
11303         * Makefile (tests): Add tst-signal4.
11304         * tst-signal4.c: New file.
11306         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11307         __sigismember instead of sigismember.  Add __builtin_expect.
11309 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11311         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11312         pthread_setcancelstate, and pthread_rwlock_setpshared.
11314         * tst-cancel7.c (do_test): Make sure the pid file exists before
11315         canceling the thread.
11317         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11318         pthread_rwlock_timedrdlock tests.
11319         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11320         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11321         Check for invalid tv_nsec field.
11322         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11323         Likewise.
11325         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11326         recursive mutex of overflow.
11328         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11330         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11331         going into an endless loop.
11332         * Makefile (tests): Add tst-cancel9.
11333         * tst-cancel9.c: New file.
11335         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11337 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11339         * tst-mutex5.c (do_test): Add more timedlock tests.
11341         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11342         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11344         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11345         use INLINE_SYSCALL.  Error number is returned, not -1.
11347         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11348         and __deallocate_stack with internal_function.
11349         * pthread_create.c: Adjust definitions appropriately.
11350         * allocatestack.c: Likewise.
11352         * pthread_join.c: Add one more __builtin_expect.
11353         * pthread_timedjoin.c: Likewise.
11355         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11356         not data of sequence number does not match.
11357         Add one __builtin_expect.
11359         * Makefile (tests): Add tst-clock1.
11360         * tst-clock1.c: New file.
11362         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11363         negative arguments.
11364         * Makefile (tests): Add tst-basic5.
11365         * tst-basic5.c: New file.
11367 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11369         * Makefile (tests): Add tst-basic4.
11370         * tst-basic4.c: New file.
11372         * pthreadP.h: Add declaraction for __nptl_nthreads.
11373         * pthread_create.c: Define __nptl_nthreads
11374         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11375         after thread is done.  If then zero, call exit(0).
11376         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11377         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11378         * init.c (pthread_functions): Initialize ptr_nthreads.
11379         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11380         (__reclaim_stacks): Decrement __nptl_nthreads.
11381         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11382         Define.
11383         * Makefile (tests): Add tst-basic3.
11384         * tst-basic3.c: New file.
11386         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11387         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11388         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11389         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11390         if asynchronous canceling is enabled.
11391         * pthread_join.c (pthread_join): When recognizing circular joins,
11392         take into account the other thread might be already canceled.
11393         * Makefile (tests): Add tst-join5.
11394         * tst-join5.c: New file.
11396         * Makefile (tests): Add tst-join4.
11397         * tst-join4.c: New file.
11399 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11401         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11403 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11405         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11406         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11407         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11408         warning.
11409         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11410         to avoid warning.
11411         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11412         error if lll_futex_wake failed.
11414 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11417         handling of cancellation and failung pthread_mutex_unlock call.
11418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11419         * Makefile (tests): Add tst-cond8 and tst-cond9.
11420         * tst-cond8.c: New file.
11421         * tst-cond9.c: New file.
11423         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11425         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11426         non-standard initializers with __USE_GNU.
11428         * Makefile (tests): Add tst-cleanup3.
11429         * tst-cleanup3.c: New file.
11431 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11433         * Makefile (tests): Add tst-attr1 and tst-attr2.
11434         * tst-attr1.c: New file.
11435         * tst-attr2.c: New file.
11437         * Makefile: Add rules to build and run tst-atfork2 test.
11438         * tst-atfork2.c: New file.
11439         * tst-atfork2mod.c: New file.
11441         * sysdeps/unix/sysv/linux/unregister-atfork.c
11442         (__unregister_atfork): Free the memory allocated for the handlers
11443         after removing them from the lists.
11445         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11446         cleanup function.
11448         * tst-atfork1.c (do_test): Wait for the child we forked.
11449         Report error in child.
11451         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11453         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11455 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11457         * Makefile (tests): Add tst-cancel8.
11458         * tst-cancel8.c: New file.
11460         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11461         clearing of control variable.
11462         * Makefile (tests): Add tst-once3 and tst-once4.
11463         * tst-once3.c: New file.
11464         * tst-once4.c: New file.
11466 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11468         * sysdeps/sh/Makefile: New file.
11469         * sysdeps/sh/bits/atomic.h: New file.
11470         * sysdeps/sh/pthread_spin_init.c: New file.
11471         * sysdeps/sh/pthread_spin_lock.c: New file.
11472         * sysdeps/sh/pthread_spin_trylock.S: New file.
11473         * sysdeps/sh/pthread_spin_unlock.S: New file.
11474         * sysdeps/sh/pthreaddef.h: New file.
11475         * sysdeps/sh/tcb-offsets.sym: New file.
11476         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11477         * sysdeps/sh/tls.h: New file.
11478         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11479         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11480         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11481         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11482         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11483         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11484         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11485         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11486         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11487         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11488         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11489         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11490         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11491         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11492         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11493         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11494         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11495         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11496         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11497         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11498         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11499         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11501         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11502         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11503         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11504         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11505         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11506         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11507         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11509 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11511         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11512         according to POSIX.
11514         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11516 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11518         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11519         (TLS_GET_FS): New #define.
11520         (TLS_SET_FS): New #define.
11521         Correct value of __NR_set_thread_area.
11523         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11525 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11527         * Makefile (tests): Add tst-popen1.
11528         * tst-popen1.c: New file.
11530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11531         but inactive generalization.
11532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11534         Minor optimization, remove one instruction.
11535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11537 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11539         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11541 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11543         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11544         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11545         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11546         * sysdeps/pthread/pthread_cond_signal.c: New file.
11547         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11548         * sysdeps/pthread/pthread_cond_wait.c: New file.
11549         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11550         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11551         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11552         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11553         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11554         * sysdeps/s390/Makefile: New file.
11555         * sysdeps/s390/bits/atomic.h: New file.
11556         * sysdeps/s390/pthread_spin_init.c: New file.
11557         * sysdeps/s390/pthread_spin_lock.c: New file.
11558         * sysdeps/s390/pthread_spin_trylock.c: New file.
11559         * sysdeps/s390/pthread_spin_unlock.c: New file.
11560         * sysdeps/s390/pthreaddef.h: New file.
11561         * sysdeps/s390/tcb-offsets.sym: New file.
11562         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11563         * sysdeps/s390/tls.h: New file.
11564         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11565         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11566         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11567         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11568         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11569         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11570         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11571         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11572         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11573         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11574         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11575         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11576         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11577         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11578         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11579         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11580         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11581         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11582         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11583         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11584         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11585         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11586         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11588 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11590         * atomic.h: Add a couple more default implementations.
11591         (atomic_compare_and_exchange_acq): Use
11592         __arch_compare_and_exchange_32_acq in return value definition.  It
11593         always exists.
11594         (atomic_bit_set): Renamed from atomic_set_bit.
11595         Add missing atomic_ prefixes.
11597         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11598         thread library is available, use correct value to mark initialized
11599         once variable.
11601 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11603         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11604         __sysconf to determine pagesize.
11606         * pthread_create.c: Include <atomic.h>.
11607         * allocatestack.c (allocate_stack): Implement coloring of the
11608         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11609         size minus one.  Adjust users.
11610         * sysdeps/i386/i686/Makefile: New file.
11612 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11614         * allocatestack.c: Improve comment throughout the file.
11616         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11617         (__lll_lock_wait): Add branch prediction.
11618         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11619         (__lll_lock_wait): Likewise.
11620         (lll_unlock_wake_cb): Removed.
11622 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11624         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11625         _POSIX_THREAD_PRIORITY_SCHEDULING.
11627 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11629         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11630         Fix return type of ptr___pthread_getspecific.
11632 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11634         * Makefile (tests): Add tst-umask1.
11635         (tst-umask1-ARGS): Define.
11636         * tst-umask1.c: New file.
11638 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11640         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11641         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11642         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11643         pthread_rwlock_unlock.
11644         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11645         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11646         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11647         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11648         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11649         New file.
11650         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11651         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11652         New file.
11653         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11654         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11655         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11656         New file.
11657         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11658         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11659         New file.
11660         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11661         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11662         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11663         New file.
11664         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11665         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11666         New file.
11667         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11669         * Makefile (libpthread-routines): Remove lowlevelcond and
11670         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11671         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11672         and pthread_cond_broadcast.
11673         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11674         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11675         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11676         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11677         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11678         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11679         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11680         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11681         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11682         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11685         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11686         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11687         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11688         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11689         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11690         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11691         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11692         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11693         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11694         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11695         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11696         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11697         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11698         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11699         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11700         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11701         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11702         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11703         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11705         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11706         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11707         of the code is moved to ...
11708         * sysdeps/pthread/createthread.c: ...here.  New file.
11710 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11712         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11713         (__new_sem_post): Clear %eax before returning.
11714         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11716         * Makefile (tests): Add tst-cleanup2.
11717         * tst-cleanup2.c: New file.
11719         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11720         Interpret first parameter correctly.
11722 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11724         * Makefile (headers): Add bits/semaphore.h.
11726 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11728         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11729         if not SHARED.
11731 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11733         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11734         must be used and mapping failed.
11735         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11737         * Makefile (CFLAGS-pthread_self.os): Define this, not
11738         CFLAGS-pthread_self.c.
11740 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11742         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11743         lll_unlock_wake_cb.
11745         * Makefile (libpthread-routines): Add version.  Add rules to build
11746         version.os and banner.h.
11747         * version.c: New file.
11749 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11751         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11752         the alias unconditional.
11753         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11755 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11757         * Makefile (CFLAGS-pthread_self.c): New definition.
11759 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11761         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11762         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11763         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11764         * init.c (__pthread_initialize_minimal_internal): Likewise.
11766 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11768         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11770         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11771         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11772         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11773         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11774         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11775         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11777 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11779         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11780         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11781         * tst-cancel-wrappers.sh: Remove all exceptions.
11783 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11785         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11786         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11788         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11789         Use __libc_pthread_functions array if SHARED.
11791         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11792         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11794         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11795         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11796         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11797         __libc_ptf_call instead of __libc_maybe_call.
11798         (PTF): New #define.
11799         (__libc_cleanup_region_start): Wrap function name with PTF call.
11800         (__libc_cleanup_region_end): Likewise.
11801         (__libc_cleanup_end): Likewise.
11803         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11804         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11805         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11806         * pthreadP.h: Add prototypes.
11808         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11809         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11810         __pthread_rwlock_unlock aliases.
11811         * pthreadP.h: Add prototypes for new aliases.
11813         * pthreadP.h (struct pthead_functions): Moved to...
11814         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11815         * init.c (pthread_functions): Add initializers for new elements.
11817         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11818         __pthread_cleanup_pop_restore aliases.
11819         * pthreadP.h: Add prototypes.
11821         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11822         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11823         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11824         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11825         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11826         * pthreadP.h: Adjust prototypes and callers.
11828 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11830         * Makefile (tests): Add tst-cancel7.
11831         (tst-cancel7-ARGS): New variable.
11832         * tst-cancel7.c: New file.
11834         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11835         around gcc defficiencies.
11836         * old_pthread_cond_signal.c: Likewise.
11837         * old_pthread_cond_timedwait.c: Likewise.
11838         * old_pthread_cond_wait.c: Likewise.
11840         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11842 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11844         * Makefile (tests): Add tst-cond7.
11845         * tst-cond7.c: New file.
11847         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11848         (condvar_cleanup): Get condvar address from the right place.
11850         * atomic.h: Correct definitions of atomic_full_barrier,
11851         atomic_read_barrier, atomic_write_barrier.
11853         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11854         race-free.
11855         * old_pthread_cond_signal.c: Likewise.
11856         * old_pthread_cond_timedwait.c: Likewise.
11857         * old_pthread_cond_wait.c: Likewise.
11859 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11861         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11863 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11865         * pthreadP.h (pthread_cond_2_0_t): New type.
11866         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11867         Use new type for the 2.0 condvar function prototypes.
11868         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11869         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11870         parameter.
11871         * old_pthread_cond_destroy.c: Likewise.
11872         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11873         * old_pthread_cond_signal.c: Likewise.
11874         * old_pthread_cond_timedwait.c: Likewise.
11875         * old_pthread_cond_wait.c: Likewise.
11877         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11878         (__pthread_cond_wait): Don't save cancellation mode and seq value
11879         in same location.
11881         * herrno.c (__h_errno_location): Don't define as weak.
11883 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11885         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11886         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11887         and pthread_cond_wait.
11888         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11889         Renamed to...
11890         (__pthread_cond_broadcast_2_0): ... this.
11891         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11892         Renamed to...
11893         (__pthread_cond_destroy_2_0): ... this.
11894         * old_pthread_cond_init.c (__old_pthread_cond_init):
11895         Renamed to...
11896         (__pthread_cond_init_2_0): ... this.
11897         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11898         Renamed to...
11899         (__pthread_cond_signal_2_0): ... this.
11900         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11901         Renamed to...
11902         (__pthread_cond_wait_2_0): ... this.
11903         * pthread_cond_destroy.c: Include shlib-compat.h.
11904         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11905         * pthread_cond_init.c: Include shlib-compat.h.
11906         (pthread_cond_init): Change strong_alias into versioned_symbol.
11907         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11908         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11909         fields.
11910         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11911         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11912         __pthread_cond_wait_2_0): New prototypes.
11913         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11914         __old_pthread_cond_init, __old_pthread_cond_signal,
11915         __old_pthread_cond_wait): Removed.
11916         * init.c: Include shlib-compat.h.
11917         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11918         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11919         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11920         ptr___pthread_cond_*_2_0 fields.
11921         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11922         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11924         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11925         LIBC_SIGACTION was not yet defined.
11926         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11927         [!defined LIBC_SIGACTION] (__sigaction): New function and
11928         libc_hidden_weak.
11929         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11930         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11932 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11934         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11936 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11938         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11939         New, larger type definition.
11940         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11941         implementation.
11942         * Versions [libpthread]: Add definitions for new pthread_cond_*
11943         interfaces for version GLIBC_2.3.2.
11944         * pthread_cond_init.c: Update initialization for new type definition.
11945         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11946         pthread_cond_timedwait, pthread_cond_signal, and
11947         pthread_cond_broadcast.  Add old_pthread_cond_init,
11948         old_pthread_cond_destroy, old_pthread_cond_wait,
11949         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11950         old_pthread_cond_broadcast.
11951         * old_pthread_cond_broadcast.c: New file.
11952         * old_pthread_cond_destroy.c: New file.
11953         * old_pthread_cond_init.c: New file.
11954         * old_pthread_cond_signal.c: New file.
11955         * old_pthread_cond_timedwait.c: New file.
11956         * old_pthread_cond_wait.c: New file.
11957         * pthreadP.h: Add prototypes for the compatibility interfaces.
11959         * pthread_cond_destroy.c: Don't include <errno.h>.
11961 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11963         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11964         unnecessary zero offset when addressing MUTEX.
11966 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11968         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11969         __register_atfork.
11970         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11971         for __register_atfork.
11973 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11975         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11976         instead of ASSEMBLER test macro.
11978         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11979         __libc_current_sigrtmax): Add libc_hidden_def.
11981         * sysdeps/pthread/list.h: Remove assert.h include.
11983 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11985         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11986         __pthread_initialize_minimal_internal not
11987         __pthread_initialize_minimal.
11989 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11991         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11992         __pthread_initialize_minimal as hidden.
11994         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11995         constructor.
11997 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11999         * Makefile ($(inst_libdir)/libpthread.so): Depend on
12000         $(common-objpfx)format.lds, include that into the output script.
12001         Fix comment.
12002         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12004 2002-12-28  Andreas Jaeger  <aj@suse.de>
12006         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12007         nsec resolution changes.
12008         (xstat64_conv): Likewise.
12009         (xstat32_conv): Likewise.
12010         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12011         struct kernel_stat.
12012         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12013         structs stat and stat64.
12014         * time/time.h (__timespec_defined): Define for __USE_MISC.
12015         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12017 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
12019         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
12020         argument.
12021         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12022         (pthread_exit): Use strong_alias to avoid warnings.
12023         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12024         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12025         ptr___pthread_attr_init_2_*.
12026         * init.c (pthread_functions): Adjust.
12028 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
12030         * forward.c: Make all functions available by default again.  It
12031         caused too much trouble.
12033         * pt-siglongjmp.c: Removed.
12035 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
12037         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12038         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12039         * sysdeps/i386/Makefile: New file.
12040         * sysdeps/i386/tcb-offsets.sym: New file.
12041         * sysdeps/pthread/tcb-offsets.h: New file.
12042         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12043         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12045         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12046         __register_atfork...
12047         (GLIBC_2.3.2): ...here.
12049 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12051         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12052         pthread_attr_setstackaddr with __attribute_deprecated__.
12054 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12056         * pt-system.c (system): Remove cancellation handling.
12057         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12058         cancellation routines.
12060 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12062         * descr.h: Include <dl-sysdep.h>.
12063         (struct pthread): Move header.data.list to the back of the struct.
12064         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12065         (MULTIPLE_THREADS_OFFSET): Adjust offset.
12066         (SYSINFO_OFFSEET): Likewise.
12068 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12070         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12071         Define.
12072         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12073         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12074         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12075         (USE_DL_SYSINFO): Undef.
12077 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12079         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12080         $(common-objpfx)libc.so.
12081         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12082         it is bigger than pipe buffer size even on arches with bigger
12083         page size.
12084         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12086 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12088         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12089         correct errno access for case that USE___THREAD is not defined.
12091 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12093         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12094         Patch by Marijn Ros <marijn@mad.scientist.com>.
12096 2002-12-22  Roland McGrath  <roland@redhat.com>
12098         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12100 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12102         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12104 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12106         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12107         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12108         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12110         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12111         of int $0x80.
12112         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12113         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12114         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12115         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12116         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12117         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12118         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12119         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12121         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12122         sysenter.
12123         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12125         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12127         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12128         in new TCB.
12129         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12130         that sysinfo is properly initialized.
12131         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12132         to 1 only for ld.so.
12134         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12135         RTLD_CORRECT_DYNAMIC_WEAK.
12137 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12139         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12140         Use return 0 as 6th argument to FORWARD4.
12141         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12143 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12145         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12146         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12147         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12148         (INIT_SYSINFO): New #define.
12149         (TLS_TP_INIT): Use INIT_SYSINFO.
12150         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12151         At test to make sure SYSINFO_OFFSET value is correct.
12152         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12154 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12156         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12157         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12158         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12159         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12160         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12161         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12162         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12164 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12166         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12167         macro instead of using int $0x80 directly.
12169         * sysdeps/pthread/bits/stdio-lock.h: New file.
12170         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12171         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12172         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12173         * Makefile (routines): Add libc-lowlevelmutex.
12175         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12176         __i686.get_pc_thunk.dx.
12178 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12180         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12181         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12182         ($(objpfx)tst-cancel-wrappers.out): New rule.
12183         * tst-cancel-wrappers.sh: New test.
12184         * tst-locale1.c: Include signal.h.
12185         (uselocale): Test static linking of __libc_current_sigrt*.
12187 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12189         * Makefile (tests): Add tst-cancel6.
12190         * tst-cancel6.c: New file
12192 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12194         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12195         Define meaningfully for assembler as well.
12196         * pthreadP.h (struct pthread_functions): Remove
12197         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12198         and ptr_pthread_attr_init_2_1 fields.
12199         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12200         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12201         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12202         (FORWARD3): Define using FORWARD4.
12203         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12204         versions.
12205         * pt-system.c: Remove duplicate stdlib.h include.
12207 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12209         * sem_init.c: Define sem_init@GLIBC_2.0.
12210         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12211         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12213         * flockfile.c: Moved to...
12214         * sysdeps/pthread/flockfile.c: ...here.  New file.
12215         * funlockfile.c: Moved to...
12216         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12217         * ftrylockfile.c: Moved to...
12218         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12220 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12222         * libc-cancellation.c: Guard both function with
12223         #if !defined NOT_IN_libc.
12224         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12225         automatically provided pthread wrappers.
12226         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12227         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12228         nor in libpthread.
12229         * pt-open.c: Removed.
12230         * pt-fcntl.c: Removed.
12231         * pt-fsync.c: Removed.
12232         * pt-lseek.c: Removed.
12233         * pt-msgrcv.c: Removed.
12234         * pt-msgsnd.c: Removed.
12235         * pt-msync.c: Removed.
12236         * pt-nanosleep.c: Removed.
12237         * pt-open64.c: Removed.
12238         * pt-pause.c: Removed.
12239         * pt-pread.c: Removed.
12240         * pt-pread64.c: Removed.
12241         * pt-pwrite.c: Removed.
12242         * pt-pwrite64.c: Removed.
12243         * pt-read.c: Removed.
12244         * pt-recv.c: Removed.
12245         * pt-recvfrom.c: Removed.
12246         * pt-recvmsg.c: Removed.
12247         * pt-send.c: Removed.
12248         * pt-sendto.c: Removed.
12249         * pt-sigtimedwait.c: Removed.
12250         * pt-sigwait.c: Removed.
12251         * pt-wait.c: Removed.
12252         * pt-waitpid.c: Removed.
12253         * pt-write.c: Removed.
12254         * pt-accept.c: Removed.
12255         * pt-close.c: Removed.
12256         * pt-connect.c: Removed.
12257         * pt-lseek64.c: Removed.
12258         * pt-sendmsg.c: Removed.
12259         * pt-tcdrain.c: Removed.
12261 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12263         * init.c (__pthread_initialize_minimal_internal): Renamed from
12264         __pthread_initialize_minimal.  Make old name an alias.  This
12265         converts a normal relocation into a relative relocation.
12267         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12269         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12270         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12271         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12272         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12273         pt-sigwaitinfo, pt-waitid, and pt-writev.
12274         * pt-creat.c: Removed.
12275         * pt-poll.c: Removed.
12276         * pt-pselect.c: Removed.
12277         * pt-readv.c: Removed.
12278         * pt-select.c: Removed.
12279         * pt-sigpause.c: Removed.
12280         * pt-sigsuspend.c: Removed.
12281         * pt-sigwaitinfo.c: Removed.
12282         * pt-waitid.c: Removed.
12283         * pt-writev.c: Removed.
12285         * init.c (pthread_functions): New variable.
12286         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12287         (or NULL) to __libc_pthread_init.
12288         * forward.c: Rewrite to use __libc:pthread_functions array to get
12289         function addresses.
12290         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12291         prototype.
12292         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12293         Take new parameter.  Copy content of variable pointed to by it
12294         to __libc_pthread_init.
12296         * pthreadP.h (struct pthread_functions): New type.
12297         (__libc_pthread_init): Declare.
12299         * pthread_attr_destroy.c: Add namespace protected alias.
12300         * pthread_attr_getdetachstate.c: Likewise.
12301         * pthread_attr_getinheritsched.c: Likewise.
12302         * pthread_attr_getschedparam.c: Likewise.
12303         * pthread_attr_getschedpolicy.c: Likewise.
12304         * pthread_attr_getscope.c: Likewise.
12305         * pthread_attr_setdetachstate.c: Likewise.
12306         * pthread_attr_setinheritsched.c: Likewise.
12307         * pthread_attr_setschedparam.c: Likewise.
12308         * pthread_attr_setschedpolicy.c: Likewise.
12309         * pthread_attr_setscope.c: Likewise.
12310         * pthread_cond_broadcast.c: Likewise.
12311         * pthread_cond_destroy.c: Likewise.
12312         * pthread_cond_init.c: Likewise.
12313         * pthread_cond_signal.c: Likewise.
12314         * pthread_cond_wait.c: Likewise.
12315         * pthread_condattr_destroy.c: Likewise.
12316         * pthread_condattr_init.c: Likewise.
12317         * pthread_equal.c: Likewise.
12318         * pthread_exit.c: Likewise.
12319         * pthread_getschedparam.c: Likewise.
12320         * pthread_self.c: Likewise.
12321         * pthread_setcancelstate.c: Likewise.
12322         * pthread_setschedparam.c: Likewise.
12323         * pthread_mutex_destroy.c: Likewise.
12324         * pthread_mutex_init.c: Likewise.
12325         * pthreadP.h: Add prototypes for the aliases.
12327         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12328         multiple_threads member in correct TCB to 1.
12330         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12331         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12332         member of thread decriptor, otherwise return unconditionally 1.
12334 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12336         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12337         regular Linux version.  Remove file.
12338         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12339         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12340         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12341         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12342         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12343         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12344         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12345         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12346         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12347         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12348         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12349         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12350         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12351         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12352         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12353         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12354         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12355         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12356         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12357         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12358         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12359         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12360         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12361         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12362         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12363         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12364         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12365         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12366         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12367         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12369 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12371         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12372         * sysdeps/unix/sysv/linux/open.c: Removed.
12373         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12374         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12375         * sysdeps/unix/sysv/linux/msync.c: Removed.
12376         * sysdeps/unix/sysv/linux/read.c: Removed.
12377         * sysdeps/unix/sysv/linux/close.c: Removed.
12378         * sysdeps/unix/sysv/linux/creat.c: Removed.
12379         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12380         * sysdeps/unix/sysv/linux/pause.c: Removed.
12381         * sysdeps/unix/sysv/linux/select.c: Removed.
12382         * sysdeps/unix/sysv/linux/write.c: Removed.
12384 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12386         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12387         element in TCB to see whether locking is needed.
12389         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12390         MULTIPLE_THREADS_OFFSET value is correct.
12392         * sysdeps/unix/sysv/linux/close.c: New file.
12393         * sysdeps/unix/sysv/linux/connect.S: New file.
12394         * sysdeps/unix/sysv/linux/creat.c: New file.
12395         * sysdeps/unix/sysv/linux/fsync.c: New file.
12396         * sysdeps/unix/sysv/linux/llseek.c: New file.
12397         * sysdeps/unix/sysv/linux/lseek.c: New file.
12398         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12399         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12400         * sysdeps/unix/sysv/linux/msync.c: New file.
12401         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12402         * sysdeps/unix/sysv/linux/open.c: New file.
12403         * sysdeps/unix/sysv/linux/open64.c: New file.
12404         * sysdeps/unix/sysv/linux/pause.c: New file.
12405         * sysdeps/unix/sysv/linux/poll.c: New file.
12406         * sysdeps/unix/sysv/linux/pread.c: New file.
12407         * sysdeps/unix/sysv/linux/pread64.c: New file.
12408         * sysdeps/unix/sysv/linux/pselect.c: New file.
12409         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12410         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12411         * sysdeps/unix/sysv/linux/readv.c: New file.
12412         * sysdeps/unix/sysv/linux/recv.S: New file.
12413         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12414         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12415         * sysdeps/unix/sysv/linux/select.c: New file.
12416         * sysdeps/unix/sysv/linux/send.S: New file.
12417         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12418         * sysdeps/unix/sysv/linux/sendto.S: New file.
12419         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12420         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12421         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12422         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12423         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12424         * sysdeps/unix/sysv/linux/system.c: New file.
12425         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12426         * sysdeps/unix/sysv/linux/wait.c: New file.
12427         * sysdeps/unix/sysv/linux/waitid.c: New file.
12428         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12429         * sysdeps/unix/sysv/linux/writev.c: New file.
12430         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12432         * pt-readv.c: Fix comment.
12434 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12436         * tst-cleanup1.c: Include stdlib.h.
12438         * tst-cancel5.c: New test.
12439         * Makefile (tests): Add tst-cancel5.
12440         (tst-cancel5): Link against libc.so libpthread.so in that order.
12442 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12444         * forward.c (test_loaded): Prevent recursive calls.
12446         * Makefile (routines): Add libc-cancellation.
12447         * libc-cancellation.c: New file.
12448         * descr.h (struct pthread): Add multiple_threads field.
12449         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12450         new thread descriptor to 1.
12451         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12452         Initialize multiple_thread field after successful thread creation.
12453         * cancellation.c (__do_cancel): Move to pthreadP.h.
12454         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12455         (__pthread_disable_asynccancel): Add internal_function attribute.
12456         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12457         * pthread_setcancelstate.c: Likewise.
12458         * pthread_setcanceltype.c: Likewise.
12459         * pthread_exit.c: Likewise.
12460         * pthreadP.h (CANCELLATION_P): Likewise.
12461         (__do_cancel): Define as static inline.
12462         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12463         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12464         declarations.
12465         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12466         fields.  Define MULTIPLE_THREADS_OFFSET.
12467         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12468         declaration.
12469         * sysdeps/unix/sysv/linux/accept.S: New file.
12470         * sysdeps/unix/sysv/linux/read.c: New file.
12471         * sysdeps/unix/sysv/linux/write.c: New file.
12472         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12473         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12474         initialization of __libc_locking_needed.
12475         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12476         __libc_locking_needed, use multiple_threads field in TCB.
12477         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12479 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12481         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12482         version.
12483         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12485         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12486         access to __libc_locking_needed for PIC.
12488 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12490         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12491         declare for libc.so.
12492         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12493         expression.
12494         (__libc_lock_lock): Put into statement expression.
12495         (__libc_lock_unlock): Remove trailing semicolon.
12496         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12498 2002-12-12  Roland McGrath  <roland@redhat.com>
12500         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12501         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12503 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12505         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12506         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12507         Initialize __libc_locking_needed.
12508         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12509         instead of __register_pthread_fork_handler.
12510         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12511         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12512         fork-gen with libc_pthread_init.
12513         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12514         of __register_pthread_fork_handler.
12515         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12516         of __register_pthread_fork_handler.
12517         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12518         __libc_locking_needed to determine whether lock prefix can be avoided.
12519         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12521 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12523         * Makefile (tests): Add tst-cleanup1.
12524         * tst-cleanup1.c: New file.
12525         * cancellation.c (__cleanup_thread): Removed.
12526         (__do_cancel): Remove call to __cleanup_thread.
12527         * pthreadP.h: Remove __cleanup_thread prorotype.
12529         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12530         Remember function and argument even if cancellation handler
12531         function is not available.
12532         (__libc_cleanup_region_end): Execute registered function directly if
12533         pthread functions are not available.
12534         (__libc_cleanup_end): Likewise.
12536         * init.c (__pthread_initialize_minimal): Fix initialization in
12537         static lib by preventing gcc from being too clever.
12539 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12541         * init.c (__pthread_initialize_minimal): Remove unneccesary
12542         sigaddset call.
12544         * Makefile (tests): We can run tst-locale2 now.
12546 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12548         * Versions: Remove duplicated sigwait entry.
12550 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12552         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12553         inside libpthread.
12555         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12557         * pthreadP.h: Declare __pthread_enable_asynccancel and
12558         __pthread_disable_asynccancel.
12559         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12560         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12561         * cancellation.c (__pthread_enable_asynccancel): New function.
12562         (__pthread_disable_asynccancel): New function.
12563         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12564         * pt-close.c: Likewise.
12565         * pt-connect.c: Likewise.
12566         * pt-creat.c: Likewise.
12567         * pt-fcntl.c: Likewise.
12568         * pt-fsync.c: Likewise.
12569         * pt-lseek.c: Likewise.
12570         * pt-lseek64.c: Likewise.
12571         * pt-msgrcv.c: Likewise.
12572         * pt-msgsnd.c: Likewise.
12573         * pt-msync.c: Likewise.
12574         * pt-nanosleep.c: Likewise.
12575         * pt-open.c: Likewise.
12576         * pt-open64.c: Likewise.
12577         * pt-pause.c: Likewise.
12578         * pt-poll.c: Likewise.
12579         * pt-pread.c: Likewise.
12580         * pt-pread64.c: Likewise.
12581         * pt-pselect.c: Likewise.
12582         * pt-pwrite.c: Likewise.
12583         * pt-pwrite64.c: Likewise.
12584         * pt-read.c: Likewise.
12585         * pt-readv.c: Likewise.
12586         * pt-recv.c: Likewise.
12587         * pt-recvfrom.c: Likewise.
12588         * pt-recvmsg.c: Likewise.
12589         * pt-select.c: Likewise.
12590         * pt-send.c: Likewise.
12591         * pt-sendmsg.c: Likewise.
12592         * pt-sendto.c: Likewise.
12593         * pt-sigpause.c: Likewise.
12594         * pt-sigsuspend.c: Likewise.
12595         * pt-sigtimedwait.c: Likewise.
12596         * pt-sigwait.c: Likewise.
12597         * pt-sigwaitinfo.c: Likewise.
12598         * pt-system.c: Likewise.
12599         * pt-tcdrain.c: Likewise.
12600         * pt-wait.c: Likewise.
12601         * pt-waitid.c: Likewise.
12602         * pt-waitpid.c: Likewise.
12603         * pt-write.c: Likewise.
12604         * pt-writev.c: Likewise.
12605         * pthread_join.c: Likewise.
12606         * pthread_timedjoin.c: Likewise.
12608         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12609         (__xpg_sigpause): New function.
12610         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12612 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12614         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12616         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12617         _GI_pthread_cleanup_pop to pthreadP.h.
12619         * ftrylockfile.c: Use _IO_lock_trylock instead of
12620         pthread_mutex_trylock.
12622         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12623         (CANCEL_RESET): Likewise.
12624         (__pthread_setcanceltype_): Declare.
12625         (__pthread_mutex_lock_internal): Declare.
12626         (__pthread_mutex_unlock_internal): Declare.
12627         (__pthread_once_internal): Declare.
12628         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12629         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12631         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12632         and pthread_mutex_unlock.
12633         * pthread_cond_wait.c: Likewise.
12634         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12635         * pthread_mutex_unlock.c: Likewise.
12637         * pthread_setcanceltype.c: Add additional alias
12638         __pthread_setcanceltype.
12640         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12641         * sem_open.c (sem_open): Likewise.
12642         Use __libc_open, __libc_write, and __libc_close instead of
12643         open, write, and close respectively.
12645         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12646         Rewrite as statement expression since it must return a value.
12648         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12649         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12650         __pthread_kill.
12652         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12653         alias __pthread_once_internal.
12655         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12657 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12659         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12660         * tst-stdio1.c: New file.
12661         * tst-stdio2.c: New file.
12663         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12665         * Makefile (tests): Comment out tst-locale2 for now.
12666         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12668         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12669         -D_IO_MTSAFE_IO.
12670         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12671         Use _IO_lock_init instead of explicit assignment.
12673         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12674         Define __libc_lock_* and __libc_lock_recursive macros with
12675         lowlevellock macros, not pthread mutexes.
12677         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12678         of pthread_mutex_lock.
12679         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12680         instead of pthread_mutex_unlock.
12682 2002-12-06  Roland McGrath  <roland@redhat.com>
12684         * allocatestack.c (__stack_user): Use uninitialized defn.
12685         * init.c (__pthread_initialize_minimal): Initialize it here.
12687 2002-12-05  Roland McGrath  <roland@redhat.com>
12689         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12690         string.
12691         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12693         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12694         missing & here too.
12696 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12698         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12699         lowlevellock.
12700         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12701         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12702         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12703         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12704         for __libc_lock_* macros.
12705         * Makefile (routines): Add libc-lowlevellock.
12707 2002-10-09  Roland McGrath  <roland@redhat.com>
12709         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12710         Under [__PIC__], call the function via the pointer fetched for
12711         comparison rather than a call by name that uses the PLT.
12712         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12713         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12714         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12715         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12716         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12718 2002-12-04  Roland McGrath  <roland@redhat.com>
12720         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12722         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12723         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12725         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12727 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12729         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12730         a completely opaque, non-integer type.
12731         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12733 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12735         * sysdeps/i386/tls.h: Include stdlib.h.
12736         * sysdeps/x86_64/tls.h: Likewise.
12738 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12740         * Makefile (tests): Add tst-locale2.
12741         (tests-static): Likewise.
12742         * tst-locale2.c: New file.
12744         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12745         volatile and add memory clobbers to lock operations.
12747 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12749         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12750         * sysdeps/i386/i486/bits/atomic.h: New file.
12751         * sysdeps/i386/i586/bits/atomic.h: New file.
12752         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12753         include i486 version.
12754         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12755         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12756         Patch by Marijn Ros <marijn@mad.scientist.com>.
12758         * allocatestack.c (get_cached_stack): Don't crash if we first
12759         found a stack with a larger size then needed.
12760         Reported by Hui Huang <hui.huang@sun.com>.
12762         * Makefile (tests): Add tst-sysconf.
12763         * tst-sysconf.c: New file.
12765         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12766         PTHREAD_THREADS_MAX.
12768 2002-12-02  Roland McGrath  <roland@redhat.com>
12770         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12771         Declare using hidden_proto instead of attribute_hidden, so there are
12772         non-.hidden static symbols for gdb to find.
12773         (__pthread_keys): Likewise.
12774         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12775         * allocatestack.c (__stack_user): Likewise.
12776         * pthread_create.c (__pthread_keys): Likewise.
12777         (__nptl_threads_events, __nptl_last_event): Make these static instead
12778         of hidden.
12779         * pthread_key_create.c (__pthread_pthread_keys_max,
12780         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12782 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12784         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12785         statically.
12786         * tst-locale1.c: New file.
12788         * pthread_cond_timedwait.c: Include <stdlib.h>.
12790         * Makefile (tests): Add tst-fork2 and tst-fork3.
12791         * tst-fork2.c: New file.
12792         * tst-fork3.c: New file.
12794 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12796         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12798         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12799         require it to 200112L.
12801         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12802         instruction only if HAVE_CMOV is defined.
12803         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12805         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12807         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12809         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12811         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12813 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12815         * sysdeps/x86_64/bits/atomic.h: New file.
12817         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12818         16-bit operations.
12820         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12821         possible since gettid cannot fail.
12823         * sysdeps/x86_64/pthreaddef.h: New file.
12825         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12827         * sysdeps/x86_64/pthread_spin_init.c: New file.
12828         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12829         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12830         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12832         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12833         Add missing lock prefix.  Minute optimization.
12835         * tst-spin2.c (main): Also check successful trylock call.
12837         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12838         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12840         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12841         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12843         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12844         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12845         value in case of an error.  Add support for INTERNAL_SYSCALL.
12847         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12848         value in case of an error.
12850         * sysdeps/x86_64/tls.h: New file.
12852 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12854         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12855         takes the array member name and the index as parameters.
12856         (THREAD_SETMEM_NC): Likewise.
12857         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12858         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12859         interfaces.
12861         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12862         to decide which code to use.
12863         (THREAD_SETMEM_NC): Likewise.
12865         * allocatestack.c (queue_stack): Don't remove stack from list here.
12866         Do it in the caller.  Correct condition to prematurely terminate
12867         loop to free stacks.
12868         (__deallocate_stack): Remove stack from list here.
12870 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12872         * Makefile (tests): Add tst-stack1.
12873         * tst-stack1.c: New file.
12875         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12876         provided stack.
12878         * pthread_attr_getstack.c: Return bottom of the thread area.
12880 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12882         * Makefile (libpthread-routines): Add pt-allocrtsig and
12883         pthread_kill_other_threads.
12884         * pt-allocrtsig.c: New file.
12885         * pthread_kill_other_threads.c: New file.
12886         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12887         all three functions.
12888         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12889         allocrtsig.
12890         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12891         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12892         and __libc_allocate_rtsig_private.
12893         * Versions (libpthread): Export pthread_kill_other_threads_np,
12894         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12896 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12898         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12899         the end of the stack.  Adjust computations.
12900         When mprotect call fails dequeue stack and free it.
12901         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12902         attribute.
12903         * pthread_getattr_np.c: Likewise.
12905         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12906         surprises.
12908 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12910         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12911         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12913 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12915         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12916         * pthread_setspecific.c: Likewise.
12918 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12920         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12921         definitions.  Get them from the official place.
12922         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12924         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12925         Use new CLONE_ flags in clone() calls.
12927         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12928         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12930         * Versions: Add pthread_* functions for libc.
12931         * forward.c: New file.
12933         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12934         errno-loc.
12935         * herrno.c: New file.
12936         * res.c: New file.
12938         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12939         sem_trywait, and sem_timedwait.  Add herrno and res.
12940         * sem_init.c: Don't initialize lock and waiters members.
12941         * sem_open.c: Likewise.
12942         * sem_post.c: Removed.
12943         * sem_wait.c: Removed.
12944         * sem_trywait.c: Removed.
12945         * sem_timedwait.c: Removed.
12946         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12947         Includes full implementations of sem_post, sem_wait, sem_trywait,
12948         and sem_timedwait.
12949         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12950         for new implementation.
12951         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12952         and waiters fields.
12954         * tst-sem3.c: Improve error message.
12955         * tst-signal3.c: Likewise.
12957         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12958         to tell the kernel about the termination futex and to initialize tid
12959         member.  Don't initialize main_thread.
12960         * descr.h (struct pthread): Remove main_thread member.
12961         * cancelllation.c (__do_cancel): Remove code handling main thread.
12962         The main thread is not special anymore.
12964         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12965         size of the stacks to stack_cache_actsize.
12967         * pt-readv.c: Add missing "defined".
12968         * pt-sigwait.c: Likewise.
12969         * pt-writev.c: Likewise.
12971 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12973         * Versions: Export __connect from libpthread.
12974         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12976         * Makefile (libpthread-routines): Add pt-raise.
12977         * sysdeps/unix/sysv/linux/raise.c: New file.
12978         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12979         * sysdeps/generic/pt-raise.c: New file.
12981         * pthread_cond_init.c: Initialize all data elements of the condvar
12982         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12984         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12985         * pthread_create.c: Likewise.
12987         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12988         * tst-key1.c: New file.
12989         * tst-key2.c: New file.
12990         * tst-key3.c: New file.
12992         * Versions: Export pthread_detach for version GLIBC_2.0.
12993         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12995 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12997         * pthread_key_create.c: Terminate search after an unused key was found.
12998         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13000         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13001         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13003 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
13005         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13006         dynamic lookup for errno in PIC.
13008         * allocatestack.c (get_cached_stack): Rearrange code slightly to
13009         release the stack lock as soon as possible.
13010         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13011         the static TLS block.
13012         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13014         * cancellation.c: Renamed from cancelation.c.
13015         * Makefile: Adjust accordingly.
13016         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13017         * cleanup_defer.c: Use CANCELLATION_P.
13018         * pthread_testcancel.c: Likewise.
13019         * descr.h: Fix spelling in comments.
13020         * init.c: Likewise.
13021         * pthread_getattr_np.c: Likewise.
13022         * pthread_getschedparam.c: Likewise.
13023         * pthread_setschedparam.c: Likewise.
13024         * Versions: Likewise.
13026         * pt-pselect.c: New file.
13027         * Makefile (libpthread-routines): Add pt-pselect.
13028         * Versions: Add pselect.
13030         * tst-cancel4.c: New file.
13031         * Makefile (tests): Add tst-cancel4.
13033 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
13035         * pthread_mutex_lock.c: Always record lock ownership.
13036         * pthread_mutex_timedlock.c: Likewise.
13037         * pthread_mutex_trylock.c: Likewise.
13039         * pt-readv.c: New file.
13040         * pt-writev.c: New file.
13041         * pt-creat.c: New file.
13042         * pt-msgrcv.c: New file.
13043         * pt-msgsnd.c: New file.
13044         * pt-poll.c: New file.
13045         * pt-select.c: New file.
13046         * pt-sigpause.c: New file.
13047         * pt-sigsuspend.c: New file.
13048         * pt-sigwait.c: New file.
13049         * pt-sigwaitinfo.c: New file.
13050         * pt-waitid.c: New file.
13051         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13052         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13053         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13054         * Versions: Add all the new functions.
13056         * tst-exit1.c: New file.
13057         * Makefile (tests): Add tst-exit1.
13059         * sem_timedwait.c: Minor optimization for more optimal fastpath.
13061 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
13063         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13065         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13066         call.  pthread_join is an official cancellation point.
13067         * pthread_timedjoin.c: Likewise.
13069         * pthread_cond_wait.c: Revert order in which internal lock are dropped
13070         and the condvar's mutex are retrieved.
13071         * pthread_cond_timedwait.c: Likewise.
13072         Reported by dice@saros.East.Sun.COM.
13074 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13076         * pthreadP.h: Cut out all type definitions and move them...
13077         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13078         * pthreadP.h: Include <internaltypes.h>.
13080         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13081         performance tweaks.
13083         * sem_trywait.c: Shuffle #includes around to get right order.
13084         * sem_timedwait.c: Likewise.
13085         * sem_post.c: Likewise.
13086         * sem_wait.c: Likewise.
13088         * nptl 0.3 released.
13090         * Makefile (tests): Add tst-signal3.
13091         * tst-signal3.c: New file.
13093 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13095         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13096         the asms modify the sem object.
13097         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13099         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13100         the actual members.
13101         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13102         * semaphoreP.h: Include pthreadP.h.
13103         * sem_getvalue.c: Adjust to sem_t change.
13104         * sem_init.c: Likewise.
13105         * sem_open.c: Likewise.
13106         * sem_post.c: Likewise.
13107         * sem_timedwait.c: Likewise.
13108         * sem_trywait.c: Likewise.
13109         * sem_wait.c: Likewise.
13111 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13113         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13114         * tst-basic2.c: New file.
13115         * tst-exec1.c: New file.
13116         * tst-exec2.c: New file.
13117         * tst-exec3.c: New file.
13119         * tst-fork1.c: Remove extra */.
13121         * nptl 0.2 released.  The API for IA-32 is complete.