Add test case for pthread_[sg]etname_np.
[jlayton/glibc.git] / nptl / ChangeLog
1 2013-12-09  Carlos O'Donell  <carlos@redhat.com>
2
3         * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
4         * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
5
6 2013-12-09  Andreas Schwab  <schwab@suse.de>
7
8         [BZ #15843]
9         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10         (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
11         before __condvar_tw_cleanup2 label.
12
13 2013-12-04  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
14
15         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
16         (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
17         into our own stack frame instead of the caller's.
18         (PSEUDO): Use them.  Use symbolic stack frame offsets.
19         (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
20         (DOCARGS_2, UNDOCARGS_2): Likewise.
21         (DOCARGS_3, UNDOCARGS_3): Likewise.
22         (DOCARGS_4, UNDOCARGS_4): Likewise.
23         (DOCARGS_5, UNDOCARGS_5): Likewise.
24         (DOCARGS_6, UNDOCARGS_6): Likewise.
25
26 2013-11-26  Ondřej Bílka  <neleai@seznam.cz>
27
28         * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
29         * sysdeps/x86_64/tls.h: Likewise.
30
31 2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>
32
33         [BZ #11214]
34         * Makefile (tst-getpid2-ENV): New variable.
35
36 2013-11-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
37
38         * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
39
40 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
41
42         * sysdeps/pthread/configure.in: Moved to ...
43         * sysdeps/pthread/configure.ac: ... here.
44         * sysdeps/x86_64/configure.in: Moved to ...
45         * sysdeps/x86_64/configure.ac: ... here.
46         * sysdeps/pthread/configure: Regenerated.
47         * sysdeps/x86_64/configure: Likewise.
48
49 2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
50
51         * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
52         from pthread_mutex_init.
53
54 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
55
56         [BZ #15988]
57         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
58         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
59         USE_REQUEUE_PI.
60         * pthread_cond_signal.c (__pthread_cond_signal)
61         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
62
63 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
64
65         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
66         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
67         member of the argument.
68         (__libc_lock_trylock_recursive): Likewise.
69         (__libc_lock_unlock_recursive): Likewise.
70
71 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
72
73         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
74         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
75         [SHARED && !NO_HIDDEN].
76
77 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
78
79         [BZ #15921]
80         * tst-cleanup2.c (do_test): New volatile variable RET to
81         return success.
82
83 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
84
85         * sysdeps/pthread/pthread.h: Fix typos.
86         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
87         * tst-cancel4.c: Likewise.
88
89 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
90
91         * pthread_getschedparam.c: Fix typos.
92         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
93
94 2013-07-23  David S. Miller  <davem@davemloft.net>
95
96         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
97
98 2013-07-22  David S. Miller  <davem@davemloft.net>
99
100         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
101
102 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
103
104         * pthread_mutex_lock.c: Fix whitespace.
105         * pthread_mutex_trylock.c: Likewise.
106         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
107         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
108         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
109         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
110         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
111         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
112         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
113         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
114         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
115         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
116         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
117         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
118
119         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
120         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
121         (elision_init): Don't set __rwlock_rtm_enabled.
122         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
123         Remove __rwlock_rtm_enabled.
124
125 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
126
127         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
128         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
129
130 2013-07-02  Andi Kleen <ak@linux.intel.com>
131
132         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
133           Check ENABLE_LOCK_ELISION.
134
135 2013-07-02  Andi Kleen  <ak@linux.intel.com>
136
137         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
138           Disable elision for PTHREAD_MUTEX_DEFAULT.
139
140 2013-07-02  Andi Kleen  <ak@linux.intel.com>
141             Hongjiu Lu  <hongjiu.lu@intel.com>
142
143         * pthread_mutex_lock.c
144         (__pthread_mutex_lock): Add lock elision support.
145         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
146         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
147         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
148         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
149         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
150         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
151         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
152         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
153         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
154         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
155         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
156         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
157
158 2013-07-02  Andi Kleen  <ak@linux.intel.com>
159
160         * tst-mutex5.c: Include config.h.
161           (do_test): Add checks for ENABLE_LOCK_ELISION.
162         * tst-mutex8.c: Include config.h
163           (tf): Add checks for ENABLE_LOCK_ELISION.
164           (check_type): Likewise.
165
166 2013-07-02  Andi Kleen  <ak@linux.intel.com>
167
168         * pthreadP.h: Add elision types.
169           (PTHREAD_MUTEX_TYPE_ELISION): Add.
170         * sysdeps/pthread/pthread.h: Add elision initializers.
171           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
172            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
173           (__PTHREAD_SPINS): Add.
174
175 2013-07-02  Andi Kleen  <ak@linux.intel.com>
176             Hongjiu Lu  <hongjiu.lu@intel.com>
177
178         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
179           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
180           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
181           lll_trylock_elision): Add.
182         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
183         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
184         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
185         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
186         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
187         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
188         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
189         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
190           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
191           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
192           lll_trylock_elision): Add.
193         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
194         * elision-conf.h: New file.
195
196 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
197
198         [BZ #12310]
199         * pthread_exit.c: Add reference to pthread_create.
200
201 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
202
203         * pthread_getattr_default_np.c: Include <string.h>.
204
205 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
206
207         * Versions (libpthread): Add GLIBC_2.18.
208         (GLIBC_2.18): Add pthread_setattr_default_np and
209         pthread_getattr_default_np.
210         * allocatestack.c (allocate_stack): Synchronize read from
211         __default_pthread_attr.
212         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
213         * nptl-init.c (__pthread_initialize_minimal_internal):
214         Synchronize write to __default_pthread_attr.
215         * pthreadP.h (__default_pthread_attr_lock): Declare.
216         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
217         Synchronize read from __default_pthread_attr.
218         * pthread_create.c (__pthread_create_2_1): Make a local copy of
219         __default_pthread_attr.  Check value of flags in IATTR even if
220         input ATTR is NULL.
221         * pthread_getattr_default_np.c: New file.
222         * pthread_setattr_default_np.c: New file.
223         * sysdeps/pthread/pthread.h [__USE_GNU]
224         (pthread_getattr_default_np, pthread_setattr_default_np):
225         Declare.
226         * tst-default-attr.c: New test case.
227         * Makefile (libpthread-routines): Add
228         pthread_setattr_default_np and pthread_getattr_default_np.
229         (tests): Add tst-default-attr.
230         * vars.c (__default_pthread_attr_lock): Declare and initialize.
231
232 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
233             Carlos O'Donell  <carlos@redhat.com>
234
235         [BZ #15618]
236         * tst-pthread-attr-affinity: New test case.
237         * Makefile (tests): Add it.
238         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
239         (__pthread_attr_getaffinity_new): Copy minimum of source and
240         destination sizes to avoid a buffer overrun.
241
242 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
243
244         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
245         (lll_futex_wake): Return syscall error.
246         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
247         (lll_futex_wake): Return syscall error.
248
249 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
250
251         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
252
253 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
254
255         * tst-cond22.c: Fix leading whitespaces.
256         * tst-umask1.c: Likewise.
257
258 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
259
260         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
261         trailing whitespace.
262         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
263         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
264         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
265         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
266         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
267         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
268         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
269         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
270         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
271         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
272         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
273         * tst-mutexpp10.c: Likewise.
274         * tst-stackguard1.c: Likewise.
275
276 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
277
278         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
279         and ld.so.
280
281 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
282
283         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
284         uint32_t usage.
285         * sysdeps/pthread/createthread.c: Likewise.
286
287 2013-05-14  Andreas Jaeger  <aj@suse.de>
288
289         [BZ #10686]
290         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
291         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
292
293 2013-05-09  Andi Kleen  <ak@linux.intel.com>
294
295         * tst-mutex8.c (do_test): Check for ENABLE_PI.
296
297 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
298
299         * pthreadP.h (check_sched_policy_attr): New inline function.
300         (check_sched_priority_attr): Likewise.
301         (check_stacksize_attr): Likewise.
302         (__kernel_cpumask_size, __determine_cpumask_size): Declare
303         extern.
304         (check_cpuset_attr): New inline function.
305         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
306         Use check_sched_priority_attr.
307         * pthread_attr_setschedpolicy.c
308         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
309         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
310         check_stacksize_attr.
311         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
312         Likewise.
313         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
314         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
315
316 2013-04-11  Andreas Schwab  <schwab@suse.de>
317
318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
319         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
320         directly use absolute timeout.
321
322 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
323
324         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
325
326 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
327
328         [BZ #15337]
329         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
330         [IS_IN_libpthread]
331         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
332         __pthread_unwind hidden.
333
334 2013-03-28  Roland McGrath  <roland@hack.frob.com>
335
336         * pthread_create.c (start_thread) [!SHARED]:
337         Call __call_tls_dtors only if it's not NULL.
338
339 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
340
341         * allocatestack.c (allocate_stack): Use __default_pthread_attr
342         instead of __default_stacksize.
343         * nptl-init.c (__pthread_initialize_minimal_internal):
344         Likewise.  Initialize guardsize.
345         * pthreadP.h (__default_pthread_attr): Declare.
346         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
347         Use __default_pthread_attr instead of __default_stacksize.
348         * pthread_create.c (default_attr): Remove.
349         (__pthread_create_2_1): Use __default_pthread_attr instead of
350         default_attr.
351         * vars.c (__default_stacksize): Remove.
352         (__default_pthread_attr): New static variable to store
353         default thread attributes.
354
355 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
356
357         * pthread_barrier_init.c (default_attr): Rename to
358         default_barrierattr.
359         (pthread_barrier_init): Adjust for the rename.
360         * pthread_mutex_init.c (default_attr): Rename to
361         default_mutexattr.
362         (__pthread_mutex_init): Adjust for the rename.
363         * pthread_rwlock_init.c (default_attr): Rebane to
364         default_rwlockattr.
365         (__pthread_rwlock_init): Adjust for the rename.
366
367 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
368
369         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
370
371 2013-03-04  Roland McGrath  <roland@hack.frob.com>
372
373         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
374         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
375         Use #include_next.
376         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
377         (RTLD_PRIVATE_ERRNO): Likewise.
378         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
379         Move macros and associated declaration to ...
380         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
381         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
382         Use #include_next.
383
384 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
385
386         * Makefile (tests): Revert last change.
387         (tst-pthread-stack-env-ENV): Likewise.
388         * nptl-init.c (set_default_stacksize): Likewise.
389         (__pthread_initialize_minimal_internal): Likewise.
390         * tst-pthread-stack-env.c: Likewise.
391
392 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
393
394         * tst-oddstacklimit.c: Include stdlib.h.
395
396         * Makefile (tests): Add tst-pthread-stack-env.
397         (tst-pthread-stack-env-ENV): Set environment for test.
398         * nptl-init.c (set_default_stacksize): New function.
399         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
400         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
401         * tst-pthread-stack-env.c: New test case.
402
403 2013-02-21  David S. Miller  <davem@davemloft.net>
404
405         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
406         (FUTEX_WAIT_REQUEUE_PI): Define.
407         (FUTEX_CMP_REQUEUE_PI): Likewise.
408         (lll_futex_wait_requeue_pi): Likewise.
409         (lll_futex_timed_wait_requeue_pi): Likewise.
410         (lll_futex_cmp_requeue_pi): Likewise.
411
412 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
413
414         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
415
416 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
417
418         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
419         of exit.
420         * tst-barrier4.c: Likewise.
421         * tst-robust7.c: Likewise.
422
423         [BZ #14920]
424         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
425         PI-aware.
426         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
427         PI-aware futex operations if available and mutex is PI-aware.
428         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
429         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
430         Likewise.
431         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
432         cancellation occurred just after futex returned successfully
433         from a PI operation with the mutex held.
434         (__pthread_cond_wait): Use PI-aware futex operations if
435         available and mutex is PI-aware.
436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
437         (FUTEX_WAIT_REQUEUE_PI): Define.
438         (FUTEX_CMP_REQUEUE_PI): Likewise.
439         (lll_futex_wait_requeue_pi): Likewise.
440         (lll_futex_timed_wait_requeue_pi): Likewise.
441         (lll_futex_cmp_requeue_pi): Likewise.
442         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
443         (FUTEX_WAIT_REQUEUE_PI): Define.
444         (FUTEX_CMP_REQUEUE_PI): Likewise.
445         (lll_futex_wait_requeue_pi): Likewise.
446         (lll_futex_timed_wait_requeue_pi): Likewise.
447         (lll_futex_cmp_requeue_pi): Likewise.
448         * sysdeps/unix/sysv/linux/kernel-features.h: Define
449         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
450
451 2013-02-04  Andreas Schwab  <schwab@suse.de>
452
453         [BZ #14142]
454         * tst-cancel14.c: Include <sys/time.h>.
455         * tst-cancel15.c: Likewise.
456         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
457         * tst-stackguard1.c: Include <tls.h>
458
459 2013-01-16  Andreas Schwab  <schwab@suse.de>
460
461         [BZ #14327]
462         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
463
464 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
465
466         * allocatestack.c (allocate_stack): Add comment. Remove assert
467         on attr.
468
469 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
470
471         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
472         with $(host-test-program-cmd).
473         (tst-exec4-ARGS): Likewise.
474         (tst-stackguard1-ARGS): Likewise.
475         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
476         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
477         * tst-tls6.sh (elf_objpfx): Removed.
478         (rtld_installed_name): Renamed to ...
479         (test_via_rtld_prefix): This.
480         (tst_tls5): Prepend ${test_via_rtld_prefix}.
481
482 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
483
484         * All files with FSF copyright notices: Update copyright dates
485         using scripts/update-copyrights.
486
487 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
488
489         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
490         copyright notice.
491
492 2012-12-28  Andi Kleen  <ak@linux.intel.com>
493
494         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
495         to prototype.
496         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
497         Likewise.
498
499 2012-12-27  David S. Miller  <davem@davemloft.net>
500
501         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
502         (lll_futex_timed_wait_bitset): New macro.
503
504 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
505
506         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
507         Remove definition.
508         (lll_futex_timed_wait): Replace assembly code with
509         INTERNAL_SYSCALL.
510         (lll_futex_timed_wait_bitset): Likewise.
511         (lll_futex_wake): Likewise.
512         (lll_futex_requeue): Likewise.
513         (lll_futex_wake_unlock): Likewise.
514
515 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
516
517         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
518         Declare LOCAL_VAR as char.
519
520 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
521
522         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
523         Cast result of atomic_increment_val to (void) instead of storing
524         in otherwise-unused variable.
525
526 2012-12-03  Allan McRae  <allan@archlinux.org>
527
528         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
529
530 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
531
532         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
533         to THREAD_SETMEM.
534         * sysdeps/i386/tls.h: Include <libc-internal.h>.
535         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
536         (THREAD_SETMEM_NC): Likewise.
537         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
538         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
539         (THREAD_SETMEM_NC): Likewise.
540
541 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
542
543         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
544         of atomic_increment_val to (void) instead of storing in
545         otherwise-unused variable.
546
547         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
548         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
549         instead of storing in otherwise-unused variable.
550
551 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
552
553         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
554           (CFLAGS-recv.c, CFLAGS-send.c): Define.
555
556 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
557
558         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
559         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
560
561 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
562
563         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
564         if absolute timeout is negative.
565         [__ASSUME_FUTEX_CLOCK_REALTIME &&
566         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
567         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
568         Likewise.
569         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
570         Likewise.
571         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
572         (__lll_robust_timedlock_wait): Likewise.
573         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
574         (lll_futex_timed_wait_bitset): New macro.
575         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
576         (lll_futex_timed_wait_bitset): Likewise.
577
578 2012-11-03  David S. Miller  <davem@davemloft.net>
579
580         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
581         Add missing spaces.
582         (__cpu_relax): Likewise.
583
584 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
585
586         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
587         (__128bits): New struct typedef.
588         (tcbhead_t): Replace __m128 with __128bits.
589
590 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
591             Joseph Myers  <joseph@codesourcery.com>
592
593         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
594
595 2012-10-28  David S. Miller  <davem@davemloft.net>
596
597         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
598         Define when we have v9 instructions available.
599         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
600         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
601         file.
602         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
603         file.
604         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
605         to libpthread-routines.
606
607 2012-10-25  Roland McGrath  <roland@hack.frob.com>
608
609         * tst-cond-except.c (TEST_FUNCTION): New macro.
610
611 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
612
613         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
614         run tst-tls6.sh.
615         * tst-tls6.sh: Use /bin/bash not /bin/sh.
616
617 2012-10-25  Roland McGrath  <roland@hack.frob.com>
618
619         * tst-basic2.c (do_test): Return RESULT, not always zero.
620
621         * tst-cond25.c: Include <stdint.h>
622         (waiter): Add casts to uintptr_t between casting integer<->pointer.
623         (timed_waiter): Likewise.
624         (do_test_wait): Likewise.
625         * tst-cond-except.c (thr): Likewise.
626         (do_test): Use prototype definition.
627
628 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
629             Jim Blandy  <jimb@codesourcery.com>
630
631         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
632         tst-tls6.sh.
633         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
634         programs with LD_PRELOAD set.
635
636 2012-10-24  Roland McGrath  <roland@hack.frob.com>
637
638         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
639         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
640         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
641         ($(objpfx)tst-rwlock14): Likewise.
642
643 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
644
645         * Makefile (tests): Remove tst-oddstacklimit.
646         (test-srcs): New variable.
647         (tst-oddstacklimit-ENV): Remove.
648         [$(run-built-tests) = yes] (tests): Depend on
649         $(objpfx)tst-oddstacklimit.out.
650         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
651         target.
652         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
653         setrlimit before executing tst-basic1 test passed to --command.
654
655 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
656
657         * Makefile [$(cross-compiling) = no]: Change condition to
658         [$(run-built-tests) = yes].
659
660 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
661             Joseph Myers  <joseph@codesourcery.com>
662
663         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
664         (tst-exec4-ARGS): Likewise.
665         (tst-stackguard1-ARGS): Likewise.
666
667 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
668             Joseph Myers  <joseph@codesourcery.com>
669
670         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
671         tst-cancel-wrappers.sh.
672         * tst-cancel-wrappers.sh: Use nm program given as first argument,
673         not hardcoded "nm".
674
675 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
676
677         * tst-cond25.c (do_test_wait): Don't check for return value from
678         pthread_cancel.
679
680 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
681
682         [BZ #14652]
683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
684         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
685         was locked by FUTEX_WAIT_REQUEUE_PI.
686         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
687         (__condvar_w_cleanup): Likewise.
688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
689         (__condvar_cleanup2): Likewise.
690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
691         (__condvar_cleanup1): Likewise.
692
693 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
694
695         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
696         defined __EXCEPTIONS) && defined __USE_GNU]
697         (pthread_cleanup_push_defer_np): Fix formatting.
698
699 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
700
701         [BZ #14652]
702         * Makefile (tests): New test case tst-cond25.
703         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
705         (__condvar_tw_cleanup): Lock mutex only if we don't already
706         own it.
707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
708         (__condvar_w_cleanup): Likewise.
709         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
710         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
711         (__condvar_cleanup2): Lock mutex only if we don't already
712         own it.
713         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
714         (__condvar_cleanup1): Likewise.
715         * tst-cond25.c: New test case.
716
717 2012-10-09  Roland McGrath  <roland@hack.frob.com>
718
719         * sysdeps/pthread/configure: Regenerated.
720         * sysdeps/x86_64/configure: Regenerated.
721
722 2012-10-05  David S. Miller  <davem@davemloft.net>
723
724         [BZ #14568]
725         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
726         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
727         the case of a 64-bit debugger with a 32-bit inferior.
728
729 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
730
731         [BZ #14557]
732         * Makefile (tests-static): Add tst-cancel24-static,
733         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
734         tst-sem11-static and tst-sem12-static.
735         (tests): Likewise.
736         (LDLIBS-tst-cancel24-static): New macro.
737         * tst-cancel24-static.cc: New file.
738         * tst-cond8-static.c: Likewise.
739         * tst-mutex8-static.c: Likewise.
740         * tst-mutexpi8-static.c: Likewise.
741         * tst-sem11-static.c: Likewise.
742         * tst-sem12-static.c: Likewise.
743
744 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
745
746         [BZ #14417]
747         * Makefile (tests): New test case tst-cond24.
748         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
749         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
750         (__pthread_cond_timedwait): Unlock mutex before going back to
751         wait in PI case.
752         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
753         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
754         return from futex_wait.
755         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
756         (__pthread_cond_timedwait): Unlock mutex before going back to
757         wait in PI case.  Set requeue_pi flag only if wait returned 0.
758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
759         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
760         return from futex_wait.
761         * tst-cond24.c: New test case.
762
763 2012-10-04  Roland McGrath  <roland@hack.frob.com>
764
765         * pthread_create.c (start_thread): Use __madvise, not madvise.
766
767 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
768
769         * sysdeps/i386/tls.h: Update copyright years.
770
771 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
772
773         * pthread_create.c (start_thread): Fix clone flag name in
774         comment to CLONE_CHILD_CLEARTID.
775         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
776         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
777         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
778         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
779         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
780         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
781
782 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
783
784         [BZ #14477]
785         * Makefile (tests): Add tst-cond-except.
786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
787         (__pthread_cond_timedwait): Mark instructions where %ebx is
788         incremented in PI case.
789         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
790         for the marked PI case instructions.
791         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
792         (__pthread_cond_wait): Mark instructions where %ebx is
793         incremented in PI case.
794         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
795         for the marked PI case instructions.
796         * tst-cond-except.c: New test case.
797
798 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
799
800         * tst-tls6.sh: Add "set -e".
801         * Makefile: Do not specify -e option when running testsuite
802         shell scripts.
803
804         * tst-tls6.sh: Add copyright header.
805
806 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
807
808         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
809         to uint64_t for 64-bit store.
810         (THREAD_SETMEM_NC): Likewise.
811
812 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
813
814         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
815         64-bit store.
816         (THREAD_SETMEM_NC): Likewise.
817
818 2012-09-14  Jeff Law  <law@redhat.com>
819
820         [BZ #14583]
821         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
822
823 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
824
825         [BZ #14576]
826         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
827         Removed.
828
829 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
830
831         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
832         (LDLIBS-tst-cancel24): This.
833
834 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
835
836         [BZ #14545]
837         * Makefile (tests-static): Add tst-cancel21-static.
838         (tests): Likewise.
839         * tst-cancel21-static.c: New file.
840
841 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
842
843         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
844         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
845         [__NR_clock_getres]: Make code unconditional.
846         (pthread_getcpuclockid): Remove code left unreachable by removal
847         of conditionals.
848
849 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
850
851         [BZ #14532]
852         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
853         atomic_compare_and_exchange_bool_rel.
854         * tst-sem14.c: New file.
855         * Makefile (tests): Add tst-sem14.
856
857 2012-08-15  Roland McGrath  <roland@hack.frob.com>
858
859         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
860         of -D_IO_MTSAFE_IO.
861         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
862         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
863
864 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
865
866         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
867         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
868         * pthread_condattr_setclock.c (pthread_condattr_setclock)
869         [!__ASSUME_POSIX_TIMERS]: Likewise.
870         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
871         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
872         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
873         [!__ASSUME_POSIX_TIMERS]: Likewise.
874         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
875         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
876         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
877         code unconditional.
878         [!__NR-timer_create]: Remove conditional code.
879         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
880         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
881         code unconditional.
882         [!__NR_timer_delete]: Remove conditional code.
883         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
884         * sysdeps/unix/sysv/linux/timer_getoverr.c
885         [__NR_timer_getoverrun]: Make code unconditional.
886         [!__NR_timer_getoverrun]: Remove conditional code.
887         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
888         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
889         Make code unconditional.
890         [!__NR_timer_gettime]: Remove conditional code.
891         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
892         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
893         Make code unconditional.
894         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
895         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
896         Make code unconditional.
897         [!__NR_timer_settime]: Remove conditional code.
898         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
900         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
901         conditional code.
902
903 2012-08-15  Tom de Vries  <vries@codesourcery.com>
904             Maxim Kuvyrkov  <maxim@codesourcery.com>
905
906         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
907         (__libc_lock_trylock): Allow pre-existing definitions.
908
909 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
910
911         * pthread_spin_lock.c: New file.
912         * pthread_spin_trylock.c: New file.
913
914 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
915
916         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
917         code unconditional.
918         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
919         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
920         unconditional.
921         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
922         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
923         Make code unconditional.
924         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
925         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
926         __NR_tgkill]: Make code unconditional.
927         (raise) [__ASSUME_TGKILL]: Likewise.
928         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
929         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
930         [__ASSUME_TGKILL]: Make code unconditional.
931         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
932         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
933         __NR_tgkill]: Make code unconditional.
934         (raise) [__ASSUME_TGKILL]: Likewise.
935         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
936
937 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
938
939         * sysdeps/pthread/createthread.c (create_thread)
940         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
941
942 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
943
944         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
945         code unconditional.
946         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
947
948 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
949
950         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
951         (pagesize): New static variable.
952         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
953         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
954         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
955         halfway up the stack top page.  Verify that the top page was
956         written into.
957         (do_test): Get pagesize using sysconf.
958
959 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
960
961         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
962         label.
963         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
964         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
965         Likewise.
966
967 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
968
969         * tst-pthread-getattr.c: Revert last change.
970
971 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
972
973         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
974         size.
975         (_MIN): New macro.
976         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
977         of MEM to test.
978         (check_stack_top): Read valued written into STACKADDR in
979         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
980
981 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
982
983         * nptl-init.c (sighandler_setxid): Fix the comment that
984         describes it.
985
986 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
987
988         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
989         (__lll_robust_timedlock_wait): Simplify CFI directives.
990
991 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
992
993         [BZ #12416]
994         * Makefile (tests): Add test case.
995         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
996         the __libc_stack_end page from stacksize.  Truncate stacksize to
997         make it page aligned when it is computed from RLIMIT_STACK.
998         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
999         accessible.
1000
1001 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
1002
1003         [BZ #14205]
1004         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1005         branches.
1006
1007 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
1008             Jakub Jelinek  <jakub@redhat.com>
1009
1010         [BZ #14188]
1011         * sysdeps/pthread/pthread.h
1012         [!(defined __GNUC__ && defined __EXCEPTIONS)]
1013         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1014         __libc_unlikely instead of __builtin_expect.
1015
1016 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
1017
1018         [BZ #14117]
1019         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1020         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1021         * sysdeps/unix/sysv/linux/i386/Implies: New file.
1022         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1023         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1024         to ...
1025         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1026         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1027         to ...
1028         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1029
1030 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
1031
1032         [BZ #14132]
1033         * nptl-init.c (pthread_functions): Remove use of INTUSE and
1034         _internal aliases.
1035         (__pthread_initialize_minimal_internal): Likewise.
1036         * sem_open.c: Likewise.
1037         * sem_unlink.c: Likewise.
1038         * pthreadP.h: Replace _internal aliases by hidden_proto
1039         declarations.
1040         * pthread_getspecific.c: Replace _internal alias by hidden_def.
1041         * pthread_key_create.c: Likewise.
1042         * pthread_mutex_destroy.c: Likewise.
1043         * pthread_mutex_init.c: Likewise.
1044         * pthread_mutex_lock.c: Likewise.
1045         * pthread_mutex_unlock.c: Likewise.
1046         * pthread_once.c: Likewise.
1047         * pthread_rwlock_rdlock.c: Likewise.
1048         * pthread_rwlock_unlock.c: Likewise.
1049         * pthread_rwlock_wrlock.c: Likewise.
1050         * pthread_setspecific.c: Likewise.
1051         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1052         Likewise.
1053         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1054         Likewise.
1055         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1056         Likewise.
1057         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1058         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1059         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1060         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1061         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1062         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1063         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1064         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1065         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1066         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1067         Likewise.
1068         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1069         Likewise.
1070         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1071         Likewise.
1072
1073 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1074
1075         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1076         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1077
1078         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1079         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1080         directives.
1081         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1082         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1083         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1084         (pthread_barrier_wait): Likewise.
1085         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1086         (__pthread_cond_broadcast): Likewise.
1087         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1088         (__pthread_cond_signal): Likewise.
1089         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1090         (__pthread_cond_timedwait): Likewise.
1091         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1092         Likewise.
1093         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1094         (__pthread_rwlock_rdlock): Likewise.
1095         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1096         (pthread_rwlock_timedrdlock): Likewise.
1097         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1098         (pthread_rwlock_timedwrlock): Likewise.
1099         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1100         (__pthread_rwlock_unlock): Likewise.
1101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1102         (__pthread_rwlock_wrlock): Likewise.
1103         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1104         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1105         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1106         Likewise.
1107         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1108
1109 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1110
1111         [BZ #12416]
1112         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1113         __libc_stack_end rounded to the end of containing page as the
1114         real stack end.
1115
1116 2012-05-25  Rayson Ho  <rho@redhat.com>
1117
1118         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1119         probes for i386.
1120         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1121         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1122         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1127         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1128
1129 2012-05-25  Rayson Ho  <rho@redhat.com>
1130             Roland McGrath  <roland@hack.frob.com>
1131
1132         * DESIGN-systemtap-probes.txt: New file.
1133         * pthread_cond_broadcast.c: SystemTap probes.
1134         * pthread_cond_init.c: Likewise.
1135         * pthread_cond_signal.c: Likewise.
1136         * pthread_cond_wait.c: Likewise.
1137         * pthread_cond_destroy.c: Likewise.
1138         * pthread_create.c: Likewise.
1139         * pthread_join.c: Likewise.
1140         * pthread_mutex_destroy.c: Likewise.
1141         * pthread_mutex_init.c: Likewise.
1142         * pthread_mutex_lock.c: Likewise.
1143         * pthread_mutex_timedlock.c: Likewise.
1144         * pthread_mutex_unlock.c: Likewise.
1145         * pthread_rwlock_destroy.c: Likewise.
1146         * pthread_rwlock_rdlock.c: Likewise.
1147         * pthread_rwlock_unlock.c: Likewise.
1148         * pthread_rwlock_wrlock.c: Likewise.
1149         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1155         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1156         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1157
1158 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1159
1160         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1161
1162 2012-05-17  Andreas Jaeger  <aj@suse.de>
1163
1164         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1165         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1166         only for older kernels.
1167
1168 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1169
1170         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1171         not define.
1172
1173 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1174
1175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1176         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1177         (lll_robust_lock): Likewise.
1178         (lll_cond_lock): Likewise.
1179         (lll_robust_cond_lock): Likewise.
1180         (lll_timedlock): Likewise.
1181         (lll_robust_timedlock): Likewise.
1182         (lll_unlock): Likewise.
1183         (lll_robust_unlock): Likewise.
1184
1185 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1186
1187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1188         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1189
1190 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1191
1192         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1193         on NWAITERS.
1194         (__gcc_personality_v0): Replace 8-byte data alignment with
1195         LP_SIZE alignment and .quad with ASM_ADDR.
1196
1197 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1198
1199         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1200         on NWAITERS.
1201         (__gcc_personality_v0): Replace 8-byte data alignment with
1202         LP_SIZE alignment and .quad with ASM_ADDR.
1203
1204 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1205
1206         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1207         NWAITERS, which is unsigned long int.
1208
1209 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1210
1211         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1212         (__gcc_personality_v0): Replace 8-byte data alignment with
1213         LP_SIZE alignment and .quad with ASM_ADDR.
1214
1215 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1216
1217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1218         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1219         __vdso_clock_gettime pointer into RAX_LP.
1220         (__gcc_personality_v0): Replace 8-byte data alignment with
1221         LP_SIZE alignment and .quad with ASM_ADDR.
1222
1223 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1224
1225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1226         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1227         __vdso_clock_gettime pointer into RAX_LP.
1228         (__gcc_personality_v0): Replace 8-byte data alignment with
1229         LP_SIZE alignment and .quad with ASM_ADDR.
1230
1231 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1232
1233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1234         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1235
1236 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1237
1238         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1239         to update pointer in memory.  Load pointer into RDI_LP.
1240
1241 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1242
1243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1244         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1245         of 8.
1246         (LLL_STUB_UNWIND_INFO_END): Likewise.
1247         (lll_timedlock): Load timeout pointer into RDX_LP.
1248         (lll_robust_timedlock): Likewise.
1249
1250 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1251             Jakub Jelinek  <jakub@redhat.com>
1252
1253         [BZ #13613]
1254         * Makefile (tests): Add test cases.
1255         * descr.h (struct pthread): Add a comment describing multiple_threads.
1256         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1257         single-process case.
1258         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1259         before setting cancelstate of the thread.
1260         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1261         (__libc_multiple_threads): Add explanatory comment.
1262         * tst-cancel-self-cancelstate.c: New test case.
1263         * tst-cancel-self-canceltype.c: Likewise.
1264         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1265         * tst-cancel-self-testcancel.c: New test case.
1266         * tst-cancel-self.c: Likewise.
1267         * vars.c: Expand comment to include single-process case.
1268
1269 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1270
1271         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1272         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1273         to 32 bytes.
1274
1275 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1276
1277         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1278         New.
1279         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1280         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1281
1282 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1283
1284         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1285         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1286         * sysdeps/x86_64/x32/shlib-versions: New file.
1287
1288 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1289
1290         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1291         __SIZEOF_PTHREAD_XXX_T.
1292         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1293         (pthread_mutex_t): Likewise.
1294         (pthread_rwlock_t): Likewise.
1295         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1296         is defined.
1297
1298 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1299
1300         * sysdeps/x86_64/x32/tls.h: New file.
1301
1302 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1303
1304         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1305         integer.
1306         (THREAD_SETMEM_NC): Likewise.
1307
1308 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1309
1310         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1311         mov/%0.
1312
1313 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1314
1315         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1316         (__cleanup_fct_attribute): Check __x86_64__ instead of
1317         __WORDSIZE.
1318
1319 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1320
1321         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1322         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1323         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1324         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1325         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1326
1327 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1328
1329         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1330         instead of __WORDSIZE.
1331
1332 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1333
1334         [BZ #3748]
1335         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1336
1337 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1338
1339         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1340         (__pthread_cond_timedwait): Use CFI directives.
1341         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1342         (__pthread_cond_wait): Likewise.
1343         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1344         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1345
1346 2012-05-03  David S. Miller  <davem@davemloft.net>
1347
1348         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1349         always have to return 0, especially for the pthread_spin_init
1350         alias.
1351         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1352         newline.
1353         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1354         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1355
1356 2012-05-02  David S. Miller  <davem@davemloft.net>
1357
1358         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1359         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1360         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1361         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1362         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1363         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1364         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1365         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1366         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1367         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1368         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1369         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1370         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1371         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1372         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1373         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1374         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1375         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1376
1377 2012-05-02  Allan McRae  <allan@archlinux.org>
1378
1379         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1380         (LDFLAGS-tst-cancel24): Likewise.
1381
1382 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1383
1384         * sysdeps/i386/pthread_spin_lock.S: New.
1385         * sysdeps/i386/pthread_spin_lock.c: Delete.
1386         * sysdeps/x86_64/pthread_spin_lock.S: New.
1387         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1388
1389 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1390
1391         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1392         run when cross-compiling.
1393
1394 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1395
1396         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1397         instead of libgcc_s.h.
1398
1399 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1400
1401         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1402
1403 2012-03-27  David S. Miller  <davem@davemloft.net>
1404
1405         * tst-cond16.c (do_test): Use a thread stack size which is either
1406         PTHREAD_STACK_MIN or the page size, whichever is larger.
1407         * tst-cond18.c (do_test): Likewise.
1408
1409 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1410
1411         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1412         register char * __asm__("rsp") to get stack frame.
1413
1414 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1415
1416         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1417         __NR_futex directly.
1418
1419 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1420
1421         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1422         _Unwind_Ptr first.
1423
1424 2012-03-16  David S. Miller  <davem@davemloft.net>
1425
1426         [BZ #13844]
1427         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1428         instead of "...".
1429         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1430         Delete, not needed.
1431
1432 2012-03-15  David S. Miller  <davem@davemloft.net>
1433
1434         [BZ #13844]
1435         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1436
1437 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1438
1439         [BZ #13673]
1440         * pt-crti.S: Replace FSF snail mail address with URL.
1441
1442 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1443
1444         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1445         Do not define before including <time.h>.
1446
1447 2012-03-08  David S. Miller  <davem@davemloft.net>
1448
1449         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1450
1451 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1452
1453         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1454         Check for timestamp before the Epoch.
1455
1456         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1457         updating nwaiters.
1458
1459         * tst-sem13.c (do_test): Add another test case.
1460         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1461         Fix updating nwaiters.
1462
1463 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1464
1465         [BZ #10545]
1466         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1467         link test to a compile test.
1468         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1469         <stdio.h>.
1470         * sysdeps/pthread/configure: Regenerated.
1471
1472 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1473
1474         * Makefile (distribute): Remove variable.
1475
1476 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1477
1478         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1479         superfluous assignment.
1480         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1481         Likewise.
1482         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1483         (sem_timedwait): Likewise.
1484
1485 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1486
1487         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1488         installed headers to...
1489         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1490
1491 2012-03-06  David S. Miller  <davem@davemloft.net>
1492
1493         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1494         atomic_increment and remove unused local variable.
1495         (__old_sem_post): Likewise.
1496
1497 2012-02-27  David S. Miller  <davem@davemloft.net>
1498
1499         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1500         non-existing __pthread_attr.
1501         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1502         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1503         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1504         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1505         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1506
1507 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1508
1509         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1510
1511         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1512         <time.h>.
1513         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1514         union.
1515         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1516         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1517         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1518         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1519         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1520
1521 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1522
1523         [BZ #13695]
1524         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1525         pt-initfini.s.
1526         [crti.S not in sysdirs] (omit-deps): Do not append.
1527         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1528         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1529         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1530         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1531         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1532         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1533         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1534         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1535         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1536         unconditionally.
1537         * sysdeps/pthread/pt-initfini.c: Remove file.
1538
1539 2012-02-16  Richard Henderson  <rth@twiddle.net>
1540
1541         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1542         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1543
1544 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1545
1546         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1547
1548 2012-02-16  David S. Miller  <davem@davemloft.net>
1549
1550         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1551
1552 2012-02-15  Marek Polacek  <polacek@redhat.com>
1553
1554         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1555
1556 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1557
1558         Replace FSF snail mail address with URLs, as per GNU coding standards.
1559
1560 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1561
1562         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1563
1564 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1565
1566         Support crti.S and crtn.S provided directly by architectures.
1567         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1568         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1569         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1570         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1571         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1572         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1573         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1574         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1575         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1576         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1577         * pt-crti.S: New file.
1578         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1579
1580 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1581
1582         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1583         macros for PIC register setup.
1584         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1585         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1586         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1587         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1588         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1589
1590 2012-01-11  Marek Polacek  <polacek@redhat.com>
1591
1592         * forward.c (FORWARD_NORETURN): Define macro.
1593         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1594         (__pthread_exit): Likewise.
1595
1596 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1597
1598         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1599
1600         * pthreadP.h: Add noreturn to __pthread_exit.
1601         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1602
1603 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1604
1605         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1606         Call pthread_attr_setstacksize() with result of
1607         __pthread_get_minstack() to account for application TLS usage.
1608
1609 2012-01-08  Marek Polacek  <polacek@redhat.com>
1610
1611         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1612
1613 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1614
1615         [BZ #13553]
1616         * pthreadP.h: Use const instead of __const.
1617         * semaphore.h: Likewise.
1618         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1619         * sysdeps/pthread/bits/sigthread.h: Likewise.
1620         * sysdeps/pthread/pthread.h: Likewise.
1621
1622         * Makefile: Remove elf=yes test, only ELF is supported.
1623
1624         * shlib-versions: Remove entries for ports architectures.
1625
1626         In case anyone cares, the IA-64 architecture could move to ports.
1627         * sysdeps/ia64/*: Removed.
1628         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1629
1630 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1631
1632         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1633         __pthread_get_minstack.
1634         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1635
1636         [BZ #13088]
1637         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1638         through __pthread_get_minstack.
1639         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1640         directly from _rtld_global_ro.
1641         (__pthread_get_minstack): New function.
1642         * pthreadP.h: Declare __pthread_get_minstack.
1643         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1644
1645 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1646
1647         [BZ #13515]
1648         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1649         Correct reading name from file.
1650
1651 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1652
1653         * allocatestack.c (allocate_stack): Return errno on failure.
1654
1655 2011-12-14  Jeff Law  <law@redhat.com>
1656
1657         [BZ #5245]
1658         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1659
1660 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1661
1662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1663         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1665
1666 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1667
1668         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1669         /proc/self/maps.
1670
1671 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1672
1673         [BZ #13358]
1674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1675         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1676         path for kernels with FUTEX_CLOCK_REALTIME.
1677         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1678
1679 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1680
1681         [BZ #13344]
1682         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1683         for memory synchronization functions.
1684         * semaphore.h: Likewise.
1685
1686 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1687
1688         * tst-cancel7.c: Avoid warning.
1689         * tst-mutex6.c: Likewise.
1690         * tst-mutex9.c: Likewise.
1691         * tst-mutexpi6.c: Likewise.
1692
1693 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1694
1695         * sysdeps/i386/tls.h: Remove #include <list.h>.
1696
1697 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1698
1699         * pthread_create.c (start_thread): Call __ctype_init.
1700
1701 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1702
1703         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1704         defined.
1705         (list_add): Add atomic_write_barrier.
1706         * descr.h: Define __need_list_t before including <list.h>.
1707         * nptl-init.c: Include <list.h>
1708         * allocatestack.c: Likewise.
1709
1710 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1711
1712         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1713         * sysdeps/ia64/tls.h: Likewise.
1714         * sysdeps/powerpc/tls.h: Likewise.
1715         * sysdeps/s390/tls.h: Likewise.
1716         * sysdeps/sh/tls.h: Likewise.
1717         * sysdeps/sparc/tls.h: Likewise.
1718         * sysdeps/x86_64/tls.h: Likewise.
1719
1720 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1721
1722         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1723
1724         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1725         !USE___THREAD.
1726         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1727         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1728         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1729         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1730         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1731         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1732         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1733         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1734         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1735         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1736         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1737         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1738
1739         * tst-tls1.c: Support for __thread is now mandatory.
1740         * tst-tls2.c: Likewise.
1741         * tst-tls3.c: Likewise.
1742         * tst-tls3mod.c: Likewise.
1743         * tst-tls4.c: Likewise.
1744         * tst-tls4moda.c: Likewise.
1745         * tst-tls4modb.c: Likewise.
1746         * tst-tls5.h: Likewise.
1747
1748 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1749
1750         [BZ #12403]
1751         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1752         (pthread_rwlock_timedwrlock): Use correct macro in test.
1753         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1754
1755 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1756
1757         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1758         use gettimeofday vsyscall, just call gettimeofday.
1759         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1760         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1761         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1762         Likewise.
1763         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1764         Likewise.
1765         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1766         Simplify __vdso_clock_gettime use.
1767
1768 2011-09-05  David S. Miller  <davem@davemloft.net>
1769
1770         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1771         New function.
1772         (sem_timedwait): Call it to force an exception region around
1773         the async cancel enable and the futex operation.
1774         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1775         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1776         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1777         (__new_sem_wait): Call it to force an exception region around
1778         the async cancel enable and the futex operation.
1779         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1780         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1781
1782 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1783
1784         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1785         thread is woken up.
1786
1787 2011-08-20  David S. Miller  <davem@davemloft.net>
1788
1789         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1790
1791 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1792
1793         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1794         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1795
1796 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1797
1798         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1799         stack.
1800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1802
1803 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1804
1805         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1806         barrier.
1807         (__gcc_personality_v0): Likewise.
1808         (_Unwind_ForcedUnwind): Likewise.
1809         (_Unwind_GetCFA): Likewise.
1810
1811 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1812
1813         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1814         UINTMAX_C.
1815
1816 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1817
1818         * nptl-init.c (__nptl_set_robust): New function.
1819         (pthread_functions): Add reference.
1820         * npthreadP.h: Declare __nptl_set_robust.
1821         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1822         ptr_set_robust member.
1823         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1824         child if threads are used.
1825
1826 2011-06-14  Andreas Jaeger  <aj@suse.de>
1827
1828         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1829
1830 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1831
1832         [BZ #386]
1833         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1834
1835 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1836
1837         [BZ #12650]
1838         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1839         clearing memory.
1840         Patch partly by Robert Rex <robert.rex@exasol.com>.
1841
1842 2011-01-19  Roland McGrath  <roland@redhat.com>
1843
1844         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1845         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1846         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1847         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1848         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1849         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1850
1851 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1852
1853         * Makefile (test-extras): Add tst-cleanup4aux.
1854
1855 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1856
1857         [BZ #10563]
1858         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1859         (__SETXID_2): Likewise.
1860         (__SETXID_3): Likewise.
1861
1862 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1863
1864         [BZ #10484]
1865         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1866         * alloca_cutoff.c: Add libc_hidden_def.
1867
1868 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1869
1870         [BZ #12113]
1871         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1872         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1873         of "struct pthread".
1874
1875 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1876
1877         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1878         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1879         (pthread_cleanup_push_defer_np): Likewise.
1880
1881 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1882
1883         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1884         small.
1885
1886 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1887             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1888
1889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1890         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1891
1892 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1893
1894         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1895
1896 2010-05-01  Alan Modra  <amodra@gmail.com>
1897
1898         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1899         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1900         to save temps.  Correct cfi for possible later frame manipulation.
1901         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1902         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1903         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1904         (DOCARGS_6, UNDOCARGS_6): Likewise.
1905         (CENABLE, CDISABLE): Add nops for non-shared calls.
1906
1907 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1908
1909         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1910         Fix type mismatch.
1911
1912 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1913
1914         * tst-abstime.c (do_test): Some more cleanups
1915
1916 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1917
1918         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1919
1920 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1921             Ulrich Drepper  <drepper@redhat.com>
1922
1923         * Makefile (tests): Add tst-abstime.
1924         * tst-abstime.c: New file.
1925         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1926         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1927         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1928         (__lll_timedlock_wait): Likewise.
1929         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1930         (__lll_robust_timedlock_wait): Likewise.
1931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1932         (__pthread_cond_timedwait): Likewise.
1933         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1934         (pthread_rwlock_timedrdlock): Likewise.
1935         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1936         (pthread_rwlock_timedwrlock): Likewise.
1937         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1938         Likewise.
1939
1940 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1941
1942         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1943
1944 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1945
1946         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1947         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1948
1949 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1950
1951         [BZ #11390]
1952         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1953         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1954         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1955         pthread_setname.
1956         * Makefile (libpthread-routines): Add pthread_getname and
1957         pthread_setname.
1958         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1959
1960 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1961
1962         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1963         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1964         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1965         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1966
1967 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1968
1969         * pthread_cond_timedwait.c: Add check for
1970         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1971         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1972         INTERNAL_SYSCALL.
1973
1974 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1975
1976         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1977         and the call fails wake eventually waiting setxid threads.  Don't free
1978         stack here if we try starting a thread.
1979         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1980         if the clone call failed.
1981
1982 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1983
1984         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1985         * allocatestack.c (get_cached_stack): Set setxid_futex.
1986         (allocate_stack): Likewise.
1987
1988 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1989             Ulrich Drepper  <drepper@redhat.com>
1990
1991         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1992         it is creating a thread or it is just being created.
1993         * pthread_create.c (start_thread): Wake setxid thread if it is
1994         waiting.
1995         (__pthread_create_2_1): Initialize setxid_futex.
1996         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1997         is waiting.
1998
1999 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
2000
2001         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2002         Fix unwind info.
2003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2004
2005 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
2006
2007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2008         Fix pthread_cond_timedwait with requeue-PI.
2009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2010         Fix pthread_cond_wait with requeue-PI.
2011
2012 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
2013
2014         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2015         and pthread_mutexattr_setrobust for GLIBC_2.12.
2016         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2017         * pthread_mutexattr_getrobust.c: Define alias
2018         pthread_mutexattr_getrobust.
2019         * pthread_mutexattr_setrobust.c: Define alias
2020         pthread_mutexattr_setrobust.
2021
2022 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
2023
2024         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
2025
2026 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
2027
2028         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2029
2030 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
2031
2032         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2033         call __gmon_start__.
2034         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2035
2036 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
2037
2038         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2039         using memset.
2040
2041 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
2042
2043         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2044         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2046         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2047         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2048         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2049         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2051
2052 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2053
2054         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2055         Don't update nwaiters after invalid timeout is recognized.
2056
2057 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2058
2059         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2060         __gmon_start__.
2061
2062 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2063
2064         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2065         THREAD_SELF->cancelhandling after returning from futex call.
2066
2067 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2068
2069         * tst-sem13.c: New file.
2070         * Makefile (tests): Add tst-sem13.
2071
2072 2009-11-22  Roland McGrath  <roland@redhat.com>
2073
2074         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2075         instead of recapitulating its contents.
2076
2077 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2078
2079         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2080         optimizations and cleanups.
2081
2082 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2083
2084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2085         Remove redundant code. Fix cfi offsets.
2086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2087         Fix cfi offsets.
2088
2089 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2090
2091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2092         reduce size of unwind info.
2093
2094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2095         cfi directives.
2096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2097         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2098
2099 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2100
2101         [BZ #4457]
2102         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2103         LIBGCC_S_SO.
2104         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2105
2106 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2107
2108         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2109
2110         [BZ #3270]
2111         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2112         steps to avoid races with creation and terminations.
2113         * nptl-init.c (sighandler_setxid): Adjust.
2114         Patch by Daniel Jacobowitz.
2115
2116 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2117
2118         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2119
2120 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2121             Joseph Myers  <joseph@codesourcery.com>
2122
2123         [BZ #7094]
2124         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2125         Initialize the sigev_notify field for newly created timer to make sure
2126         the timer gets deleted from the active timer's list upon timer_delete.
2127
2128 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2129
2130         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2131         Correct a logic error.
2132
2133 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2134
2135         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2136         of the field in local variables.
2137         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2138         variable and don't unconditionally clear it.
2139
2140 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2141
2142         * pthread_create.c (start_thread): Hint to the kernel that memory for
2143         the stack can be reused.  We do not mark all the memory.  The part
2144         still in use and some reserve are kept.
2145
2146 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2147
2148         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2149
2150 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2151
2152         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2153         directives.
2154
2155 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2156
2157         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2158         directives.
2159         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2160
2161 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2162
2163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2164         (__pthread_cond_signal): Don't clobber register used for syscall
2165         number.
2166
2167 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2168
2169         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2170         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2171
2172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2173         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2174         register.
2175
2176 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2177
2178         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2179         enabled by the special *_asynccancel functions.
2180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2181         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2182
2183         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2184
2185 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2186
2187         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2188         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2189         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2190         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2191         since we can assume the special __*_{en,dis}able_asynccancel
2192         functions.
2193         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2194         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2195         and PTHREAD_CANCELED.
2196
2197 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2198
2199         * descr.h: Better definition of *_BITMASK macros for cancellation.
2200
2201 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2202
2203         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2204
2205         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2206         dynamic linker might have to save.
2207         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2208         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2209         printing.
2210
2211         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2212
2213 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2214
2215         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2216         New function.
2217         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2218         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2220         requeue_pi for robust mutexes.
2221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2222         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2223         Don't only skip __pthread_mutex_cond_lock.  Call instead
2224         __pthread_mutex_cond_lock_adjust.
2225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2226
2227         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2228         optimization of PI mutex handling.
2229
2230 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2231
2232         [BZ #10418]
2233         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2234         instead of of _acq variants of cmpxchg.
2235
2236 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2237
2238         * sysdeps/x86_64/configure.in: New file.
2239
2240         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2241         path when not using absolute timeout futex.
2242
2243 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2244
2245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2246         optimizations of last changes.
2247         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2248
2249 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2250
2251         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2252         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2254         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2257         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2259
2260         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2261         (__pthread_cond_timedwait): Make more robust.
2262
2263 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2264
2265         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2266         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2267         directly use absolute timeout.
2268
2269         * tst-sem5.c (do_test): Add test for premature timeout.
2270         * Makefile: Linu tst-sem5 with librt.
2271
2272         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2273         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2274         directly use absolute timeout.
2275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2276         (pthread_rwlock_timedrdlock): Likewise.
2277
2278         * tst-cond11.c (run_test): Add test to check that the timeout is
2279         long enough.
2280
2281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2282         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2283         directly use absolute timeout.
2284
2285         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2286         (__pthread_cond_wait): Convert to using exception handler instead of
2287         registered unwind buffer.
2288         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2289         (__pthread_cond_timedwait): Likewise.
2290
2291 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2292
2293         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2294         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2295         use absolute timeout.
2296
2297         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2298         handling of uncontested semaphore.
2299
2300         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2301         (__condvar_cleanup): Rewrite to use cfi directives instead of
2302         hand-coded unwind tables.
2303         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2304         Likewise.
2305         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2306         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2307         Likewise.
2308
2309 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2310
2311         * Makefile (libpthread-routines): Add pthread_sigqueue.
2312         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2313         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2314         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2315
2316 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2317
2318         [BZ #10262]
2319         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2320         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2321         cannot be assumed.
2322         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2323
2324 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2325
2326         * libc-cancellation.c: Move __libc_cleanup_routine to...
2327         * libc-cleanup.c: ...here.  New file.
2328         * Makefile (routines): Add libc-cleanup.
2329
2330         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2331         test.
2332         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2333         * sysdeps/pthread/librt-cancellation.c: Likewise.
2334
2335         [BZ #9924]
2336         * nptl-init.c: Renamed from init.c.
2337         * Makefile: Change all occurences of init.c to nptl-init.c.
2338
2339 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2340
2341         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2342         to test when deciding on the delay.
2343         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2344         * pthread_cancel.c: Close race between deciding on sending a signal
2345         and setting the CANCELING_BIT bit.
2346
2347         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2348         thread is canceled.
2349         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2350
2351 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2352
2353         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2354         is available.
2355         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2356         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2357         * sysdeps/i386/tls.h: Likewise.
2358         (tcbhead_t): Add __private_tm member.
2359
2360 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2361
2362         * sem_open.c (sem_open): Rewrite initialization of initsem to
2363         avoid warnings.
2364
2365         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2366         Avoid warning by using may_alias attribute on ptrhack.
2367
2368 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2369
2370         [BZ #10090]
2371         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2372         Check policy and priority for validity.
2373         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2374
2375 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2376
2377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2378         (__pthread_cond_timedwait): Change to use cfi directives instead of
2379         hand-coded unwind sections.
2380
2381 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2382
2383         * init.c (nptl_freeres): Compile only for SHARED.
2384
2385 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2386
2387         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2388         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2389         FUTEX_BITSET_MATCH_ANY.
2390
2391 2009-02-27  Roland McGrath  <roland@redhat.com>
2392
2393         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2394         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2395
2396 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2397
2398         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2399         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2400         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2401         200112L to 200809L.
2402
2403 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2404
2405         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2406         POSIX 2008.
2407
2408 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2409
2410         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2411         Unify name of include protector macro.
2412
2413 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2414
2415         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2416         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2417
2418 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2419
2420         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2421         pointer variables.
2422
2423         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2424         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2425         * init.c (nptl_freeres): New function.
2426         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2427         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2428         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2429         variable.
2430         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2431         load DSO.  Assign last.
2432         (__unwind_freeres): New function.
2433
2434         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2435         for better debugging.  No need to use stack_list_add here.
2436
2437 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2438
2439         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2440         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2441         instead of computing relative timeout.
2442         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2443         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2444
2445 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2446
2447         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2448
2449 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2450
2451         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2452         (list_add_tail): Removed.
2453
2454 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2455
2456         * (in_flight_stack): New variable.
2457         (stack_list_del): New function.  Use instead of list_del.
2458         (stack_list_add): New function.  Use instead of list_add when adding to
2459         stack_cache and stack_used lists.
2460         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2461         when the fork call interrupted another thread.
2462
2463 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2464
2465         * init.c (__pthread_initialize_minimal_internal): Optimize test
2466         FUTEX_CLOCK_REALTIME a bit.
2467
2468 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2469
2470         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2471         only passing five parameters to FUTEX_WAIT_BITSET call.
2472
2473         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2474         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2475         instead of computing relative timeout.
2476
2477 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2478
2479         * init.c (__pthread_initialize_minimal_internal): Check for
2480         FUTEX_CLOCK_REALTIME flag.
2481         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2482         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2483         relative timeout.
2484
2485         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2486         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2487         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2488         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2489         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2490         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2491
2492 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2493
2494         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2495         loop body instead of ; to avoid gcc warnings.
2496         (pthread_cleanup_pop_restore_np): Likewise.
2497         Patch by Caolán McNamara <caolanm@redhat.com>.
2498
2499 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2500
2501         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2502         fast path here, for robust/PI/PP mutexes call
2503         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2504         of ifs according to their probability.
2505         (__pthread_mutex_lock_full): New function.
2506         * pthread_mutex_unlock.c: Include assert.h.
2507         (__pthread_mutex_unlock_usercnt): Handle only the
2508         fast path here, for robust/PI/PP mutexes call
2509         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2510         of ifs according to their probability.
2511         (__pthread_mutex_unlock_full): New function.
2512         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2513         (__pthread_mutex_lock_full): Define.
2514
2515 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2516
2517         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2518         implementation.  Add necessary padding and.
2519         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2520         words.
2521
2522 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2523
2524         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2525         and FUTEX_WAKE_BITSET.
2526
2527 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2528
2529         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2530         and FUTEX_WAKE_BITSET.
2531         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2532         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2533         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2534         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2535
2536 2008-11-25  Roland McGrath  <roland@redhat.com>
2537
2538         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2539         Subdirectories moved to ports repository as
2540         sysdeps/.../nptl subdirectories.
2541
2542 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2543
2544         [BZ #7008]
2545         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2546         of old value.
2547         * pthread_cond_init.c (__pthread_cond_init): Fix
2548         cond->__data.__nwaiters initialization.
2549         * Makefile (tests): Add tst-cond23.
2550         * tst-cond23.c: New test.
2551
2552 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2553
2554         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2555         arguments.
2556         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2557         arguments.
2558
2559 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2560
2561         [BZ #6955]
2562         * pthread_mutex_lock.c: Add support for private PI mutexes.
2563         * pthread_mutex_timedlock.c: Likewise.
2564         * pthread_mutex_trylock.c: Likewise.
2565         * pthread_mutex_unlock.c: Likewise.
2566         Patch mostly by Ben Jackson <ben@ben.com>.
2567
2568 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2569
2570         [BZ #6843]
2571         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2572         Increase stack size for helper thread.
2573
2574 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2575
2576         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2577         assembly with a clobber list for access registers a0 and a1.
2578
2579 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2580
2581         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2582         to force runp->refcntr to be read from memory.
2583
2584 2008-09-08  Richard Guenther  <rguenther@suse.de>
2585
2586         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2587         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2588         lll_timedlock, lll_robust_timedlock, lll_unlock,
2589         lll_robust_unlock): Promote private to int.
2590
2591 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2592
2593         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2594         ARCH_RETRY_MMAP definitions.
2595         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2596         Define MAP_STACK when not defined.
2597         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2598         handling of ARCH_RETRY_MMAP.
2599
2600 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2601
2602         * tst-align2.c (f): Print message that f is reached.
2603
2604 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2605
2606         [BZ #6740]
2607         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2608         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2609
2610 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2611
2612         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2613         SOCK_CLOEXEC if possible.
2614
2615 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2616
2617         * Makefile (tests): Add tst-rwlock2a.
2618         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2619         * tst-rwlock2a.c: New file.
2620
2621 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2622
2623         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2624
2625 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2626
2627         * sysdeps/pthread/pthread.h: Fix typo in comment.
2628
2629 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2630
2631         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2632         of CPU set to the kernel.
2633
2634 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2635
2636         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2637         cfi directives.
2638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2641         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2643         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2644
2645 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2646
2647         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2648         cfi directives.
2649         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2650         Likewise.
2651         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2652         Likewise.
2653         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2654         Likewise.
2655
2656 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2657
2658         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2659
2660 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2661
2662         David S. Miller  <davem@davemloft.net>
2663
2664         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2665
2666 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2667
2668         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2669         __pshared correctly.
2670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2671         Likewise.
2672         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2673         Likewise.
2674         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2675         Likewise.
2676         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2677         Likewise.
2678         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2679
2680 2008-04-14  David S. Miller  <davem@davemloft.net>
2681
2682         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2683         (__old_sem_wait): Fix argument to lll_futex_wait().
2684
2685 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2686
2687         * pthread_create.c: Require pthread_mutex_trylock and
2688         pthread_key_delete for libgcc.
2689
2690 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2691
2692         [BZ #6020]
2693         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2694         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2695         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2696
2697 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2698
2699         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2700         <linux/limits.h> has defined it.
2701         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2702         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2703         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2704         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2705
2706 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2707
2708         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2709         of ASSEMBLER.
2710         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2711         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2712
2713 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2714
2715         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2716         HAVE_DL_DISCOVER_OSVERSION.
2717         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2718         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2719
2720 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2721
2722         [BZ #5778]
2723         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2724         _POSIX_CHOWN_RESTRICTED value to zero.
2725
2726 2008-01-31  Roland McGrath  <roland@redhat.com>
2727
2728         * Makefile (omit-deps): Variable removed.
2729
2730 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2731
2732         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2733         unnecessary addr32 prefix.
2734
2735 2008-01-29  Roland McGrath  <roland@redhat.com>
2736
2737         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2738
2739 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2740
2741         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2742
2743 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2744
2745         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2746         a scratch register.
2747         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2748         (__lll_lock_wait_private): Fix typo.
2749         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2750         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2751         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2752         Adjust XADD use.
2753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2754         (pthread_rwlock_timedrdlock): Return correct return value.
2755         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2756         (pthread_rwlock_timedwrlock): Likewise.
2757
2758 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2759
2760         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2761         thread returns the program exits with an error code.
2762
2763 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2764
2765         * pthread-errnos.sym: Add EOVERFLOW.
2766         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2767         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2768         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2769         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2770
2771 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2772
2773         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2774         parameter.  Passed it as permission to mmap.
2775         * allocatestack.c (allocate_stack): Pass prot as second parameter
2776         to ARCH_RETRY_MMAP.
2777
2778 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2779
2780         * tst-basic7.c: Allocate memory for the stack.
2781
2782         [BZ #5465]
2783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2784         (__pthread_cond_timedwait): Don't use VDSO.
2785         Patch by Michal Januszewski.
2786
2787 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2788
2789         [BZ #5455]
2790         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2791         Allow label before pthread_cleanup_pop.
2792         (pthread_cleanup_pop_restore_np): Likewise.
2793
2794 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2795
2796         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2797         Store 2 before returning ETIMEDOUT.
2798
2799 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2800
2801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2802         Store 2 before returning ETIMEDOUT.
2803         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2804         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2805         (__lll_lock_wait_private): Optimize.
2806         (__lll_lock_wait): Likewise.
2807
2808 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2809
2810         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2811         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2812         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2813
2814 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2815
2816         [BZ #5240]
2817         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2818         If we time out, try one last time to lock the futex to avoid
2819         losing a wakeup signal.
2820         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2821         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2822
2823         [BZ #5245]
2824         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2825         if necessary.
2826
2827 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2828
2829         [BZ #5245]
2830         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2831         mmap failed to EAGAIN.
2832         * Makefile (tests): Add tst-basic7.
2833         * tst-basic7.c: New file.
2834
2835 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2836
2837         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2838         Use __linkin_atfork.
2839
2840 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2841
2842         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2843         missing line continuations.
2844         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2845         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2846
2847 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2848
2849         [BZ #5220]
2850         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2851         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2852         (struct timer): Add next element.
2853         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2854         enqueue timer structure into __active_timer_sigev_thread list.
2855         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2856         remove timer struct from __active_timer_sigev_thread.
2857         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2858         Before using timer structure make sure it is still on the
2859         __active_timer_sigev_thread list.  Keep lock until done.
2860         Define __active_timer_sigev_thread and
2861         __active_timer_sigev_thread_lock.
2862
2863 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2864
2865         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2866         Redefine thread_atfork for use of ATFORK_MEM.
2867         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2868         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2869         function.
2870         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2871         Use atomic operation when removing first element of list.
2872
2873 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2874
2875         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2876         routine instead of an alias to __new_sem_post.
2877
2878 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2879
2880         * init.c (__pthread_initialize_minimal): Initialize word to appease
2881         valgrind.
2882
2883 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2884
2885         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2886         libc.so just clear NAME.
2887         (__libc_rwlock_fini): Nop inside of libc.so.
2888         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2889         all zeros.
2890
2891 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2892
2893         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2894         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2895         unlocking failed.
2896         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2897
2898 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2899
2900         [BZ #4938]
2901         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2902         reclaimed stack if necessary.
2903         * Makefile (tests): Add tst-tsd6.
2904         * tst-tsd6.c: New file.
2905
2906 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2907
2908         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2909         Add private argument.
2910
2911 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2912
2913         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2914         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2915
2916 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2917
2918         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2919         (__lll_robust_timedlock): Pass private as last argument to
2920         __lll_robust_timedlock_wait.
2921         (__lll_unlock): Fix a pasto.
2922
2923 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2924
2925         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2926         sparc_old_sem): New structs.
2927         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2928         (__sem_wait_cleanup): New function.
2929         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2930         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2931         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2932         lll_futex_wait.
2933         (__old_sem_wait): New function.
2934         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2935         nptl/sysdeps/unix/sysv/linux/sparc version.
2936         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2937         Likewise.
2938         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2939         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2940         (__new_sem_trywait): Use sparc_old_sem structure.
2941         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2942         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2943         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2944         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2945         lll_futex_timed_wait.
2946         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2947         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2948         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2949         lll_futex_wake.
2950         (__old_sem_post): New function.
2951         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2952         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2953         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2954         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2955         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2956         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2957
2958 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2959
2960         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2961         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2962         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2963         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2964         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2965         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2966         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2967         Use FUTEX_WAKE_OP.
2968         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2969         kernel-features.h and tcb-offsets.h.
2970         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2971         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2972         process private.
2973         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2974         tcb-offsets.h.
2975         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2976         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2977         process private.
2978         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2979         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2981         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2983         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2985
2986 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2987
2988         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2989         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2990         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2991         lll_futex_timed_wait.
2992
2993         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2994         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2995         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2996         __lll_robust_unlock, __lll_wait_tid): Likewise.
2997
2998 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2999
3000         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3001         Fix a pasto.
3002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3003         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3004         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3005         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3007         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3008         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3010         kernel-features.h.
3011         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3012         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3013         process private.  Switch DW_CFA_advance_loc1 and some
3014         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3015         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3016         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3017         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3018         process private.  Switch DW_CFA_advance_loc{1,2} and some
3019         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3020         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3021         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3022         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3023         Likewise.
3024         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3026         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3027         Likewise.
3028         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3029         (__pthread_cond_broadcast): Compare %r8 instead of
3030         dep_mutex-cond_*(%rdi) with $-1.
3031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3032         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3033         of oring.
3034
3035 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3036
3037         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3038
3039 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3040
3041         * allocatestack.c: Include kernel-features.h.
3042         * pthread_create.c: Likewise.
3043         * pthread_mutex_init.c: Likewise.
3044         * init.c: Likewise.
3045         * pthread_cond_timedwait.c: Likewise.
3046         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3047         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3048         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3049         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3050         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3053         Likewise.
3054         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3055         Likewise.
3056         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3057         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3058         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3059         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3060
3061 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3062
3063         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3064         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3065         byte elements.  One of them is the new __shared element.
3066         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3067         adjust names of other padding elements.
3068         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3069         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3070         byte elements.  One of them is the new __shared element.
3071         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3072         adjust names of other padding elements.
3073         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3074         Renamed __pad1 element to __shared, adjust names of other padding
3075         elements.
3076         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3077         (pthread_rwlock_t): Likewise.
3078         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3079         typo.
3080
3081 2007-08-09  Anton Blanchard  <anton@samba.org>
3082
3083         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3084
3085 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3086
3087         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3088         <kernel-features.h>.
3089         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3090
3091 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3092
3093         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3094         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3095         dealing with robust mutexes.
3096         * pthread_mutex_timedlock.c: Likewise.
3097         * pthread_mutex_trylock.c: Likewise.
3098         * pthread_mutex_unlock.c: Likewise.
3099         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3100
3101 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3102
3103         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3104         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3105         (PTHREAD_MUTEX_PSHARED): Define.
3106         * pthread_mutex_init.c (__pthread_mutex_init): Set
3107         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3108         mutexes.
3109         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3110         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3111         as second argument to lll_lock.
3112         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3113         instead of its __data.__lock field.
3114         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3115         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3116         to lll_robust_lock.
3117         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3118         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3119         instead of mutex->__data.__kind directly, pass
3120         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3121         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3122         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3123         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3124         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3125         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3126         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3127         of mutex->__data.__kind directly.
3128         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3129         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3130         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3131         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3132         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3133         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3134         and lll_futex_wake.
3135         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3136         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3137         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3138         directly.
3139         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3140         Take mutex as argument instead of its __data.__lock field, pass
3141         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3142         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3143         __data.__lock field.
3144         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3145         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3146         to lll_robust_cond_lock.
3147         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3148         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3149         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3150         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3151         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3152         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3153         lll_futex_wait.
3154         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3155         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3156         lll_futex_wake.
3157         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3158         pshared variable, pass it to lll_lock, lll_unlock,
3159         lll_futex_timedwait and lll_futex_wake.
3160         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3161         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3162         and lll_futex_wake.
3163         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3164         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3165         macro.
3166         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3167         lll_futex_wake_unlock): Likewise.
3168         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3169         Likewise.
3170         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3171         lll_futex_wake_unlock): Likewise.
3172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3173         Likewise.
3174         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3175         lll_futex_wake_unlock): Likewise.
3176         (lll_futex_wake): Fix a typo.
3177         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3179         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3180         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3181         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3183         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3184         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3185         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3186         (__pthread_cond_timedwait): Likewise.
3187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3188         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3189
3190 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3191
3192         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3193         Don't use CGOTSETUP and CGOTRESTORE macros.
3194         (CGOTSETUP, CGOTRESTORE): Remove.
3195         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3196         @local symbol.
3197
3198 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3199
3200         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3201         definitions for private futexes.
3202         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3203         kernel-features.h and lowlevellock.h.  Use private futexes if
3204         they are available.
3205         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3206         (__lll_mutex_lock_wait): Rename to
3207         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3208         (__lll_mutex_timedlock_wait): Rename to ...
3209         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3210         Don't compile in for libc.so.
3211         (__lll_mutex_unlock_wake): Rename to ...
3212         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3213         (__lll_timedwait_tid): Use __NR_gettimeofday.
3214         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3215         the header from assembler.  Renamed all lll_mutex_* resp.
3216         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3217         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3218         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3219         Define.
3220         (__lll_lock_wait_private): Add prototype.
3221         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3222         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3223         __lll_unlock_wake): Likewise.
3224         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3225         if private is constant LLL_PRIVATE.
3226         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3227         lll_timedlock, lll_robust_timedlock): Add private argument.
3228         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3229         if private is constant LLL_PRIVATE.
3230         (lll_robust_unlock, lll_robust_dead): Add private argument.
3231         (lll_lock_t): Remove.
3232         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3233         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3234         lll_cond_wake, lll_cond_broadcast): Remove.
3235         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3236         kernel-features.h and lowlevellock.h.
3237         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3238         (LOAD_FUTEX_WAIT): Define.
3239         (__lll_robust_mutex_lock_wait): Rename to ...
3240         (__lll_robust_lock_wait): ... this.  Add private argument.
3241         Use LOAD_FUTEX_WAIT macro.
3242         (__lll_robust_mutex_timedlock_wait): Rename to ...
3243         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3244         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3245         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3246         lowlevellock.h.
3247         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3248         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3249         __lll_mutex_{lock,unlock}_*.
3250         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3251         lowlevellock.h and pthread-errnos.h.
3252         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3253         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3254         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3255         __lll_mutex_{lock,unlock}_*.
3256         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3257         lowlevellock.h and pthread-errnos.h.
3258         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3259         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3260         __lll_mutex_{lock,unlock}_*.
3261         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3262         lowlevellock.h.
3263         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3264         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3265         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3266         (__condvar_tw_cleanup): Likewise.
3267         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3268         lowlevellock.h.
3269         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3270         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3271         __lll_mutex_{lock,unlock}_*.
3272         ( __condvar_w_cleanup): Likewise.
3273         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3274         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3276         lowlevellock.h.
3277         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3278         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3279         __lll_mutex_{lock,unlock}_*.
3280         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3281         lowlevellock.h.
3282         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3283         FUTEX_PRIVATE_FLAG): Remove.
3284         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3285         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3286         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3287         lowlevellock.h.
3288         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3289         FUTEX_PRIVATE_FLAG): Remove.
3290         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3291         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3292         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3293         lowlevellock.h.
3294         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3295         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3296         __lll_mutex_{lock,unlock}_*.
3297         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3298         lowlevellock.h.
3299         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3300         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3301         __lll_mutex_{lock,unlock}_*.
3302         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3303         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3304         (__new_sem_post): Use standard initial exec code sequences.
3305         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3306         lowlevellock.h.
3307         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3308         FUTEX_PRIVATE_FLAG): Remove.
3309         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3310         exec code sequences.
3311         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3312         (__new_sem_trywait): Use standard initial exec code sequences.
3313         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3314         (__new_sem_wait): Use standard initial exec code sequences.
3315
3316 2007-07-31  Anton Blanchard  <anton@samba.org>
3317
3318         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3319         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3320         atomic_full_barrier.
3321
3322 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3323
3324         * allocatestack.c (stack_cache_lock): Change type to int.
3325         (get_cached_stack, allocate_stack, __deallocate_stack,
3326         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3327         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3328         as second argument to lll_lock and lll_unlock macros on
3329         stack_cache_lock.
3330         * pthread_create.c (__find_in_stack_list): Likewise.
3331         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3332         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3333         as second argument.
3334         * descr.h (struct pthread): Change lock and setxid_futex field
3335         type to int.
3336         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3337         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3338         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3339         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3340         Likewise.
3341         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3342         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3343         * pthreadP.h (__attr_list_lock): Change type to int.
3344         * pthread_attr_init.c (__attr_list_lock): Likewise.
3345         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3346         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3347         lll_{,un}lock.
3348         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3349         also for lll_futex_{wake,wait}.
3350         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3351         a pointer to const.
3352         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3353         LLL_SHARED as second argument to lll_{,un}lock.
3354         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3355         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3356         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3357         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3358         Likewise.
3359         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3360         as second argument to lll_{,un}lock macros on pd->lock.
3361         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3362         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3363         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3364         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3365         Likewise.
3366         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3367         Likewise.
3368         * pthread_once.c (once_lock): Change type to int.
3369         (__pthread_once): Pass LLL_PRIVATE as second argument to
3370         lll_{,un}lock macros on once_lock.
3371         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3372         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3373         rwlock->__data.__shared as second argument to them and similarly
3374         for lll_futex_w*.
3375         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3376         Likewise.
3377         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3378         Likewise.
3379         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3380         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3381         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3382         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3383         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3384         to lll_{,un}lock macros on __sem_mappings_lock.
3385         * sem_open.c (check_add_mapping): Likewise.
3386         (__sem_mappings_lock): Change type to int.
3387         * semaphoreP.h (__sem_mappings_lock): Likewise.
3388         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3389         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3390         instead of lll_*mutex_*, pass LLL_SHARED as last
3391         argument.
3392         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3393         pass LLL_SHARED as last argument.
3394         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3395         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3396         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3397         pass LLL_SHARED as last argument.
3398         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3399         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3400         LLL_SHARED as last argument.
3401         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3402         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3403         Similarly.
3404         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3405         __libc_lock_lock_recursive, __libc_lock_unlock,
3406         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3407         argument to lll_{,un}lock.
3408         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3409         _IO_lock_unlock): Likewise.
3410         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3411         compound literal.
3412         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3413         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3414         __fork_lock.
3415         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3416         free_mem): Likewise.
3417         (__fork_lock): Change type to int.
3418         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3419         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3420         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3421         lll_futex_wake.
3422         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3423         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3424         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3425         New function.
3426         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3427         pass it through to lll_futex_*wait, only compile in when
3428         IS_IN_libpthread.
3429         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3430         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3431         argument and pass it through to lll_futex_*wait.
3432         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3433         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3434         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3435         inline functions to __lll_* resp. __lll_robust_*.
3436         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3437         (lll_mutex_dead): Add private argument.
3438         (__lll_lock_wait_private): New prototype.
3439         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3440         __lll_robust_lock_timedwait): Add private argument to prototypes.
3441         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3442         call __lll_lock_wait_private, otherwise pass private to
3443         __lll_lock_wait.
3444         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3445         __lll_robust_timedlock): Add private argument, pass it to
3446         __lll_*wait functions.
3447         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3448         call __lll_unlock_wake_private, otherwise pass private to
3449         __lll_unlock_wake.
3450         (__lll_robust_unlock): Add private argument, pass it to
3451         __lll_robust_unlock_wake.
3452         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3453         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3454         argument, pass it through to __lll_* inline function.
3455         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3456         (lll_lock_t): Remove.
3457         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3458         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3459         lll_cond_wake, lll_cond_broadcast): Remove.
3460         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3461         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3462         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3463         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3464         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3465         the header from assembler.  Renamed all lll_mutex_* resp.
3466         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3467         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3468         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3469         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3470         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3471         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3472         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3473         Remove prototype.
3474         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3475         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3476         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3477         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3478         MULTIPLE_THREADS_OFFSET as another asm operand.
3479         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3480         MULTIPLE_THREADS_OFFSET as last asm operand, call
3481         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3482         otherwise pass private as another argument to __lll_lock_wait.
3483         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3484         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3485         private as another argument to __lll_*lock_wait call.
3486         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3487         MULTIPLE_THREADS_OFFSET as another asm operand, call
3488         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3489         otherwise pass private as another argument to __lll_unlock_wake.
3490         (lll_robust_unlock): Add private argument, pass private as another
3491         argument to __lll_unlock_wake.
3492         (lll_robust_dead): Add private argument, use __lll_private_flag
3493         macro.
3494         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3495         LLL_MUTEX_LOCK_INITIALIZER.
3496         (lll_lock_t): Remove.
3497         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3498         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3499         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3500         lll_cond_wake, lll_cond_broadcast): Remove.
3501         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3502         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3503         2007-05-2{3,9} changes.
3504         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3505         kernel-features.h and lowlevellock.h.
3506         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3507         (LOAD_FUTEX_WAIT): Rewritten.
3508         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3509         define.
3510         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3511         (__lll_mutex_lock_wait): Rename to ...
3512         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3513         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3514         (__lll_mutex_timedlock_wait): Rename to ...
3515         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3516         contains private argument.  Don't compile in for libc.so.
3517         (__lll_mutex_unlock_wake): Rename to ...
3518         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3519         Don't compile in for libc.so.
3520         (__lll_timedwait_tid): Use __NR_gettimeofday.
3521         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3522         kernel-features.h and lowlevellock.h.
3523         (LOAD_FUTEX_WAIT): Define.
3524         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3525         define.
3526         (__lll_robust_mutex_lock_wait): Rename to ...
3527         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3528         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3529         macro.
3530         (__lll_robust_mutex_timedlock_wait): Rename to ...
3531         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3532         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3533         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3534         lowlevellock.h.
3535         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3536         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3537         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3538         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3539         to __lll_lock_wait in %edx.
3540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3541         Include lowlevellock.h and pthread-errnos.h.
3542         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3543         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3544         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3545         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3546         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3547         __lll_unlock_wake.
3548         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3549         Include lowlevellock.h and pthread-errnos.h.
3550         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3551         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3552         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3553         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3554         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3555         __lll_unlock_wake.
3556         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3557         Include lowlevellock.h.
3558         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3559         Don't define.
3560         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3561         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3562         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3563         __lll_unlock_wake.  Use __NR_gettimeofday.
3564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3565         Include lowlevellock.h.
3566         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3567         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3568         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3569         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3570         and __lll_unlock_wake.
3571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3572         Include lowlevellock.h.
3573         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3574         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3575         MUTEX(%ebx) address in %edx rather than %ecx to
3576         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3577         and __lll_unlock_wake.  Move return value from %ecx to %edx
3578         register.
3579         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3580         Include lowlevellock.h.
3581         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3582         Don't define.
3583         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3584         MUTEX(%ebp) address in %edx rather than %ecx to
3585         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3586         and __lll_unlock_wake.  Move return value from %ecx to %edx
3587         register.  Use __NR_gettimeofday.
3588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3589         Include lowlevellock.h.
3590         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3591         Don't define.
3592         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3593         MUTEX(%ebp) address in %edx rather than %ecx to
3594         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3595         and __lll_unlock_wake.  Move return value from %ecx to %edx
3596         register.  Use __NR_gettimeofday.
3597         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3598         Include lowlevellock.h.
3599         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3600         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3601         MUTEX(%edi) address in %edx rather than %ecx to
3602         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3603         and __lll_unlock_wake.
3604         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3605         Include lowlevellock.h.
3606         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3607         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3608         MUTEX(%ebx) address in %edx rather than %ecx to
3609         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3610         and __lll_unlock_wake.  Move return value from %ecx to %edx
3611         register.
3612         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3613         lowlevellock.h.
3614         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3615         define.
3616         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3617         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3618         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3619         lowlevellock.h.
3620         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3621         (sem_timedwait): Use __NR_gettimeofday.
3622         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3623         lowlevellock.h.
3624         (LOCK): Don't define.
3625         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3626         lowlevellock.h.
3627         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3628         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3629         are waiters.
3630         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3631         2007-05-2{3,9} changes.
3632         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3633         kernel-features.h and lowlevellock.h.
3634         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3635         (LOAD_FUTEX_WAIT): Rewritten.
3636         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3637         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3638         (__lll_mutex_lock_wait): Rename to ...
3639         (__lll_lock_wait): ... this.  %esi is now private argument.
3640         Don't compile in for libc.so.
3641         (__lll_mutex_timedlock_wait): Rename to ...
3642         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3643         Don't compile in for libc.so.
3644         (__lll_mutex_unlock_wake): Rename to ...
3645         (__lll_unlock_wake): ... this.  %esi contains private argument.
3646         Don't compile in for libc.so.
3647         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3648         kernel-features.h and lowlevellock.h.
3649         (LOAD_FUTEX_WAIT): Define.
3650         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3651         (__lll_robust_mutex_lock_wait): Rename to ...
3652         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3653         Use LOAD_FUTEX_WAIT macro.
3654         (__lll_robust_mutex_timedlock_wait): Rename to ...
3655         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3656         private, use LOAD_FUTEX_WAIT macro.
3657         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3658         lowlevellock.h.
3659         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3660         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3661         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3662         __lll_lock_wait and __lll_unlock_wake.
3663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3664         Include lowlevellock.h and pthread-errnos.h.
3665         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3666         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3667         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3668         pass LLL_SHARED in %esi to both __lll_lock_wait and
3669         __lll_unlock_wake.
3670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3671         Include lowlevellock.h and pthread-errnos.h.
3672         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3673         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3674         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3675         pass LLL_SHARED in %esi to both __lll_lock_wait and
3676         __lll_unlock_wake.
3677         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3678         Include lowlevellock.h.
3679         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3680         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3681         pass LLL_SHARED in %esi to both __lll_lock_wait and
3682         __lll_unlock_wake.
3683         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3684         Include lowlevellock.h.
3685         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3686         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3687         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3688         and __lll_unlock_wake.
3689         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3690         Include lowlevellock.h.
3691         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3692         Don't define.
3693         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3694         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3695         and __lll_unlock_wake.
3696         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3697         Include lowlevellock.h.
3698         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3699         Don't define.
3700         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3701         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3702         and __lll_unlock_wake.
3703         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3704         Include lowlevellock.h.
3705         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3706         Don't define.
3707         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3708         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3709         and __lll_unlock_wake.
3710         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3711         Include lowlevellock.h.
3712         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3713         Don't define.
3714         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3715         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3716         and __lll_unlock_wake.
3717         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3718         Include lowlevellock.h.
3719         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3720         Don't define.
3721         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3722         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3723         and __lll_unlock_wake.
3724         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3725         lowlevellock.h.
3726         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3727         define.
3728         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3729         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3730         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3731         lowlevellock.h.
3732         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3733         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3734         lowlevellock.h.
3735         (LOCK): Don't define.
3736         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3737         lowlevellock.h.
3738         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3739         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3740         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3741         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3742         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3743         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3744         (__lll_lock_wait_private): New function.
3745         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3746         it to lll_futex_*wait.  Don't compile in for libc.so.
3747         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3748         Remove.
3749         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3750         (struct sparc_pthread_barrier): Remove.
3751         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3752         struct sparc_pthread_barrier.  Pass
3753         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3754         and lll_futex_wait macros.
3755         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3756         Remove.
3757         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3758         Include sparc pthread_barrier_wait.c instead of generic one.
3759
3760 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3761
3762         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3763
3764         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3765         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3766         %ecx.
3767         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3768         (pthread_rwlock_timedwrlock): Likewise.
3769         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3770         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3771
3772 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3773
3774         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3775
3776 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3777
3778         * tst-locale2.c (useless): Add return statement.
3779
3780 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3781
3782         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3783         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3784         * pthread_create.c (start_thread): Likewise.
3785         * init.c (sighandler_setxid): Likewise.
3786         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3787         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3788         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3789         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3790         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3791         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3792         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3793         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3794         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3795         Likewise.
3796         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3797         Likewise.
3798         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3799         Likewise.
3800         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3801         __rtld_notify): Likewise.
3802         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3803         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3804         __pthread_once): Likewise.
3805         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3806         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3807         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3808         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3809         (lll_futex_wait): Add private argument, define as wrapper around
3810         lll_futex_timed_wait.
3811         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3812         use __lll_private_flag macro.
3813         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3814         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3815         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3816         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3817         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3818         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3819         (lll_futex_wait): Add private argument, define as wrapper around
3820         lll_futex_timed_wait.
3821         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3822         use __lll_private_flag macro.
3823         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3824         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3825         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3826         Define.
3827         (lll_futex_timed_wait, lll_futex_wake): Use it.
3828         (lll_private_futex_wait, lll_private_futex_timed_wait,
3829         lll_private_futex_wake): Removed.
3830         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3831         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3832         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3833         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3834         (lll_futex_wait): Add private argument, define as wrapper around
3835         lll_futex_timed_wait.
3836         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3837         use __lll_private_flag macro.
3838         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3839         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3840         to lll_futex_*.
3841         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3842         (lll_private_futex_wait, lll_private_futex_timed_wait,
3843         lll_private_futex_wake): Removed.
3844         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3845         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3846         (lll_private_futex_wait, lll_private_futex_timed_wait,
3847         lll_private_futex_wake): Removed.
3848         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3849         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3850         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3851         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3852         (lll_futex_wait): Add private argument, define as wrapper around
3853         lll_futex_timed_wait.
3854         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3855         use __lll_private_flag macro.
3856         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3857         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3858         to lll_futex_*.
3859         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3860         Define.
3861         (lll_futex_timed_wait, lll_futex_wake): Use it.
3862         (lll_private_futex_wait, lll_private_futex_timed_wait,
3863         lll_private_futex_wake): Removed.
3864
3865 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3866
3867         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3868         of the structure for sparc32.
3869
3870 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3871
3872         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3873
3874 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3875
3876         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3877         code used when private futexes are assumed.
3878         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3879         Likewise.
3880
3881 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3882
3883         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3884         (__lll_private_flag): Define.
3885         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3886         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3887         __lll_private_flag.
3888         (lll_private_futex_wait, lll_private_futex_timedwait,
3889         lll_private_futex_wake): Define as wrapper around non-_private
3890         macros.
3891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3892         (__lll_private_flag): Define.
3893         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3894         (lll_private_futex_wait, lll_private_futex_timedwait,
3895         lll_private_futex_wake): Define as wrapper around non-_private
3896         macros.
3897
3898 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3899
3900         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3901         parameter to lll_futex_wait call.
3902         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3903
3904         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3905         Replace lll_futex_wait with lll_private_futex_wait.
3906         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3907         Add LLL_SHARED parameter to lll_futex_wake().
3908
3909         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3910         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3911         lll_private_futex_wake.
3912         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3913         bit from private parm before syscall.
3914         (lll_futex_timed_wait): Likewise.
3915         (lll_futex_wake): Likewise.
3916         (lll_futex_wake_unlock): Likewise.
3917         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3918         (lll_robust_mutex_unlock): Likewise.
3919         (lll_mutex_unlock_force): Likewise.
3920         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3921
3922 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3923
3924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3925         compilation when unconditionally using private futexes.
3926         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3927         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3928         Likewise.
3929         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3930         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3931
3932 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3933
3934         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3935         Define.
3936
3937 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3938
3939         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3940         kernel-features.h.
3941
3942 2007-05-16  Roland McGrath  <roland@redhat.com>
3943
3944         * init.c (__nptl_initial_report_events): New variable.
3945         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3946         to that.
3947
3948 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3949
3950         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3951         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3952
3953 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3954
3955         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3956         implementation.
3957
3958 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3959
3960         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3961         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3962         * pthread_mutex_timedlock.c: Likewise.
3963         * pthread_mutex_trylock.c: Likewise.
3964         * pthread_mutex_unlock.c: Likewise.
3965
3966 2007-06-17  Andreas Schwab  <schwab@suse.de>
3967
3968         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3969         sections.
3970
3971 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3972
3973         * allocatestack.c (allocate_stack): Make code compile if
3974         __ASSUME_PRIVATE_FUTEX is set.
3975
3976 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3977
3978         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3979         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3981         (__pthread_rwlock_wrlock): Likewise.
3982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3983         (pthread_rwlock_timedrdlock): Likewise.
3984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3985         (pthread_rwlock_timedwrlock): Likewise.
3986         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3987         (__pthread_rwlock_unlock): Likewise.
3988
3989 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3990
3991         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3992         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3993         Split __flags into __flags, __shared, __pad1 and __pad2.
3994         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3995         futexes if they are available.
3996         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3997         in libc-lowlevellock.S allow using private futexes.
3998         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3999         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
4000         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
4001         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
4002         lll_private_futex_timed_wait and lll_private_futex_wake.
4003         (lll_robust_mutex_unlock): Fix typo.
4004         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4005         field in futex command setup.
4006         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4007         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4008         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4009         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4010         if they are available.  Remove clear_once_control.
4011         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4012         futexes if they are available.
4013         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4014         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4015         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4016         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4017         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4018         Wake only when there are waiters.
4019         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4020         support.  Indicate that there are waiters.  Remove unnecessary
4021         extra cancellation test.
4022         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
4023         left-over duplication of __sem_wait_cleanup.
4024
4025 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
4026
4027         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4028         parameter to lll_futex_wait, lll_futex_timed_wait, and
4029         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
4030         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4031         lll_private_futex_wake.
4032         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4033         * allocatestack.c: Adjust use of lll_futex_* macros.
4034         * init.c: Likewise.
4035         * lowlevellock.h: Likewise.
4036         * pthread_barrier_wait.c: Likewise.
4037         * pthread_cond_broadcast.c: Likewise.
4038         * pthread_cond_destroy.c: Likewise.
4039         * pthread_cond_signal.c: Likewise.
4040         * pthread_cond_timedwait.c: Likewise.
4041         * pthread_cond_wait.c: Likewise.
4042         * pthread_create.c: Likewise.
4043         * pthread_mutex_lock.c: Likewise.
4044         * pthread_mutex_setprioceiling.c: Likewise.
4045         * pthread_mutex_timedlock.c: Likewise.
4046         * pthread_mutex_unlock.c: Likewise.
4047         * pthread_rwlock_timedrdlock.c: Likewise.
4048         * pthread_rwlock_timedwrlock.c: Likewise.
4049         * pthread_rwlock_unlock.c: Likewise.
4050         * sysdeps/alpha/tls.h: Likewise.
4051         * sysdeps/i386/tls.h: Likewise.
4052         * sysdeps/ia64/tls.h: Likewise.
4053         * sysdeps/powerpc/tls.h: Likewise.
4054         * sysdeps/pthread/aio_misc.h: Likewise.
4055         * sysdeps/pthread/gai_misc.h: Likewise.
4056         * sysdeps/s390/tls.h: Likewise.
4057         * sysdeps/sh/tls.h: Likewise.
4058         * sysdeps/sparc/tls.h: Likewise.
4059         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4060         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4061         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4062         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4063         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4064         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4065         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4066         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4067         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4068         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4069         Likewise.
4070         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4071         * sysdeps/x86_64/tls.h: Likewise.
4072
4073 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4074
4075         * pthread_getattr_np.c: No need to install a cancellation handler,
4076         this is no cancellation point.
4077         * pthread_getschedparam.c: Likewise.
4078         * pthread_setschedparam.c: Likewise.
4079         * pthread_setschedprio.c: Likewise.
4080         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4081         lll_unlock_wake_cb.
4082         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4083         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4084         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4085         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4086         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4087         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4088         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4089         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4090         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4091         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4092         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4094
4095         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4096         whether there are more than one thread makes no sense here since
4097         we only call the slow path if the locks are taken.
4098         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4099
4100         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4101         COND_NWAITERS_SHIFT.
4102         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4103         COND_CLOCK_BITS.
4104         * pthread_cond_init.c: Likewise.
4105         * pthread_cond_timedwait.c: Likewise.
4106         * pthread_cond_wait.c: Likewise.
4107         * pthread_condattr_getclock.c: Likewise.
4108         * pthread_condattr_setclock.c: Likewise.
4109         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4110         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4111         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4114
4115 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4116
4117         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4118         unistd.h.
4119
4120         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4121         insn suffix.
4122         (THREAD_GSCOPE_GET_FLAG): Remove.
4123         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4124         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4125         changes.
4126         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4127         (THREAD_GSCOPE_GET_FLAG): Remove.
4128         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4129         instead of THREAD_GSCOPE_GET_FLAG.
4130         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4131         it.
4132         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4133         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4134         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4135         THREAD_GSCOPE_WAIT): Define.
4136         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4137         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4138         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4139         THREAD_GSCOPE_WAIT): Define.
4140         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4141         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4142         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4143         THREAD_GSCOPE_WAIT): Define.
4144         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4145         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4146         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4147         THREAD_GSCOPE_WAIT): Define.
4148
4149 2007-05-24  Richard Henderson  <rth@redhat.com>
4150
4151         * descr.h (struct pthread): Add header.gscope_flag.
4152         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4153         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4154         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4155         THREAD_GSCOPE_WAIT): Define.
4156
4157 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4158
4159         * init.c: Make it compile with older kernel headers.
4160
4161         * tst-initializers1.c: Show through exit code which test failed.
4162
4163         * pthread_rwlock_init.c: Also initialize __shared field.
4164         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4165         element in rwlock structure into four byte elements.  One of them is
4166         the new __shared element.
4167         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4168         Likewise.
4169         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4170         __shared, adjust names of other padding elements.
4171         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4172         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4173         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4174         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4175         FUTEX_PRIVATE_FLAG.
4176         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4177         futex to use private operations if possible.
4178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4179         Likewise.
4180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4181         Likewise.
4182         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4183         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4184         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4185         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4186         Likewise.
4187         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4188         Likewise.
4189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4190         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4191
4192 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4193
4194         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4195         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4196         * pthread_rwlock_timedrdlock.c: Likewise.
4197         * pthread_rwlock_tryrdlock.c: Likewise.
4198
4199         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4200         optimization.
4201
4202         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4203         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4204         duplication of __sem_wait_cleanup.
4205
4206         * allocatestack.c: Revert last change.
4207         * init.c: Likewise.
4208         * sysdeps/i386/tls.h: Likewise.
4209         * sysdeps/x86_64/tls.h: Likewise.
4210         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4211         header structure.
4212         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4213
4214         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4215         Add private field.
4216         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4217         * pthread_barrier_init.c: Set private flag if pshared and private
4218         futexes are supported.
4219         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4220         private field in futex command setup.
4221         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4222
4223 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4224
4225         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4226         support.
4227         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4228         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4229         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4230         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4231         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4232
4233         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4234         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4235         fields in the structure.
4236         (__old_sem_init): New function.
4237         * sem_open.c: Initialize all fields of the structure.
4238         * sem_getvalue.c: Adjust for renamed element.
4239         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4240         (gen-as-const-headers): Add structsem.sym.
4241         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4242         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4243         struct new_sem.  Add struct old_sem.
4244         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4245         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4246         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4247         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4248         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4249         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4250         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4251         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4252         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4253         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4254         * tst-sem10.c: New file.
4255         * tst-sem11.c: New file.
4256         * tst-sem12.c: New file.
4257         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4258         of struct sem.
4259
4260 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4261             Jakub Jelinek  <jakub@redhat.com>
4262
4263         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4264         Move __pthread_enable_asynccancel right before futex syscall.
4265         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4266         Likewise.
4267
4268 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4269
4270         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4271         THREAD_COPY_PRIVATE_FUTEX): Define.
4272         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4273         THREAD_COPY_PRIVATE_FUTEX): Define.
4274         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4275         * init.c (__pthread_initialize_minimal_internal): Use
4276         THREAD_SET_PRIVATE_FUTEX.
4277
4278         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4279         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4280         THREAD_GSCOPE_FLAG_WAIT): Define.
4281         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4282         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4283         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4284         PTR_DEMANGLE.
4285         (THREAD_GSCOPE_GET_FLAG): Define.
4286         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4287         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4288         instead of ->header.gscope_flag directly.
4289
4290 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4291
4292         * init.c (__pthread_initialize_minimal_internal): Check whether
4293         private futexes are available.
4294         * allocatestack.c (allocate_stack): Copy private_futex field from
4295         current thread into the new stack.
4296         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4297         futexes if they are available.
4298         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4299         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4300         in libc-lowlevellock.S allow using private futexes.
4301         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4302         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4303         FUTEX_PRIVATE_FLAG.
4304         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4305         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4306         if they are available.
4307         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4308         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4309         * sysdeps/i386/tcb-offsets.sym: Likewise.
4310         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4311         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4312
4313 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4314
4315         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4316         Remove ptr_wait_lookup_done again.
4317         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4318         (__pthread_initialize_minimal_internal): Initialize
4319         _dl_wait_lookup_done pointer in _rtld_global directly.
4320         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4321         Remove code to code _dl_wait_lookup_done.
4322         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4323         encrypted for now.
4324
4325 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4326
4327         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4328         pthread_mutex_init failed with ENOTSUP.
4329
4330 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4331
4332         * allocatestack.c (__wait_lookup_done): New function.
4333         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4334         Add ptr_wait_lookup_done.
4335         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4336         * pthreadP.h: Declare __wait_lookup_done.
4337         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4338         Define macros to implement reference handling of global scope.
4339         * sysdeps/x86_64/tls.h: Likewise.
4340         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4341         Initialize GL(dl_wait_lookup_done).
4342
4343 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4344
4345         [BZ #4512]
4346         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4347         is detected.
4348         * pthread_mutex_timedlock.c: Likewise.
4349         * pthread_mutex_trylock.c: Likewise.
4350         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4351
4352         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4353         * tst-robust9.c: New file.
4354         * tst-robustpi9.c: New file.
4355
4356         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4357         unnecessary extra cancellation test.
4358
4359 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4360
4361         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4362         extra cancellation test.
4363         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4364
4365 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4366
4367         * descr.h (struct pthread): Rearrange members to fill hole in
4368         64-bit layout.
4369
4370         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4371         (__pthread_setaffinity_new): If syscall was successful and
4372         RESET_VGETCPU_CACHE is defined, use it before returning.
4373         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4374
4375 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4376
4377         [BZ #4455]
4378         * tst-align2.c: Include stackinfo.h.
4379         * tst-getpid1.c: Likewise.
4380
4381 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4382
4383         [BZ #4455]
4384         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4385         * tst-getpid1.c (do_test): Likewise.
4386
4387         [BZ #4456]
4388         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4389         (allocate_stack): Likewise.
4390
4391 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4392
4393         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4394         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4395         (__lll_robust_timedlock_wait): Likewise.
4396         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4397
4398 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4399
4400         [BZ #4465]
4401         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4402         * tst-cancel4.c (tf_fdatasync): New test.
4403
4404 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4405
4406         [BZ #4392]
4407         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4408         check mutexes like normal mutexes.
4409
4410         [BZ #4306]
4411         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4412         Initialize the whole sigevent structure to appease valgrind.
4413
4414 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4415
4416         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4417         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4418
4419 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4420
4421         * tst-locale1.c: Avoid warnings.
4422         * tst-locale2.c: Likewise.
4423
4424 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4425
4426         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4427         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4428
4429 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4430
4431         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4432         __extern_always_inline where appropriate.
4433         * sysdeps/pthread/pthread.h: Likewise.
4434
4435 2007-03-13  Richard Henderson  <rth@redhat.com>
4436
4437         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4438         separate cfi regions for the two subsections.
4439
4440 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4441
4442         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4443         new thread, don't just decrement it.
4444         Patch by Suzuki K P <suzuki@in.ibm.com>.
4445
4446 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4447
4448         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4449         PTHFCT_CALL definition.
4450
4451 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4452
4453         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4454         available, don't use it.
4455
4456 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4457
4458         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4459         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4460         call into the kernel to delay.
4461
4462 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4463
4464         * tst-initializers1.c: We want to test the initializers as seen
4465         outside of libc, so undefined _LIBC.
4466
4467         * pthread_join.c (cleanup): Avoid warning.
4468
4469 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4470
4471         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4472         (__lll_timedwait_tid): Add unwind info.
4473
4474         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4475         function table, mangle the pointers.
4476         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4477         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4478         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4479         demangle pointers before use.
4480         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4481         demangle pointer.
4482         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4483         * sysdeps/pthread/setxid.h: Likewise.
4484
4485 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4486
4487         * tst-rwlock7.c: Show some more information in case of correct
4488         behavior.
4489
4490 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4491
4492         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4493         (lll_futex_timed_wait): Undo part of last change, don't negate
4494         return value.
4495
4496 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4497
4498         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4499         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4500
4501 2006-12-28  David S. Miller  <davem@davemloft.net>
4502
4503         * shlib-versions: Fix sparc64 linux target specification.
4504
4505 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4506
4507         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4508         Adjust include path for pthread_barrier_wait.c move.
4509
4510 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4511
4512         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4513         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4514
4515 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4516
4517         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4518         6 argument cancellable syscalls.
4519         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4520         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4521         6 argument cancellable syscalls.
4522         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4523
4524 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4525
4526         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4527         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4528
4529 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4530
4531         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4532         __sync_lock_release instead of __sync_lock_release_si.
4533
4534 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4535
4536         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4537         Define.
4538         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4539         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4540         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4541         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4542         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4543         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4544         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4545         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4546         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4547         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4548         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4549
4550 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4551
4552         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4553         * pthread_barrier_wait.c: ...here.
4554         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4555         * pthread_cond_broadcast.c: ...here.
4556         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4557         * pthread_cond_signal.c: ...here.
4558         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4559         * pthread_cond_timedwait.c: ...here.
4560         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4561         * pthread_cond_wait.c: ...here.
4562         * sysdeps/pthread/pthread_once.c: Move to...
4563         * pthread_once.c: ...here.
4564         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4565         * pthread_rwlock_rdlock.c: ...here.
4566         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4567         * pthread_rwlock_timedrdlock.c: ...here.
4568         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4569         * pthread_rwlock_timedwrlock.c: ...here.
4570         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4571         * pthread_rwlock_unlock.c: ...here.
4572         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4573         * pthread_rwlock_wrlock.c: ...here.
4574         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4575         * pthread_spin_destroy.c: ...here.
4576         * sysdeps/pthread/pthread_spin_init.c: Move to...
4577         * pthread_spin_init.c: ...here.
4578         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4579         * pthread_spin_unlock.c: ...here.
4580         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4581         * pthread_getcpuclockid.c: ...here.
4582
4583         * init.c: USE_TLS support is now always enabled.
4584         * tst-tls5.h: Likewise.
4585         * sysdeps/alpha/tls.h: Likewise.
4586         * sysdeps/i386/tls.h: Likewise.
4587         * sysdeps/ia64/tls.h: Likewise.
4588         * sysdeps/powerpc/tls.h: Likewise.
4589         * sysdeps/s390/tls.h: Likewise.
4590         * sysdeps/sh/tls.h: Likewise.
4591         * sysdeps/sparc/tls.h: Likewise.
4592         * sysdeps/x86_64/tls.h: Likewise.
4593
4594 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4595
4596         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4597         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4598         failed.
4599
4600         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4601         Define to THREAD_SELF->header.multiple_threads.
4602         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4603         Likewise.
4604         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4605         Likewise.
4606         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4607         (SINGLE_THREAD_P): Likewise.
4608         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4609         (SINGLE_THREAD_P): Likewise.
4610         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4611         (SINGLE_THREAD_P): Likewise.
4612         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4613         (SINGLE_THREAD_P): Likewise.
4614         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4615         Likewise.
4616         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4617         (SINGLE_THREAD_P): Likewise.
4618         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4619         (SINGLE_THREAD_P): Likewise.
4620         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4621         Likewise.
4622
4623 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4624
4625         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4626         by default rather than 2_3_3.
4627
4628 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4629
4630         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4631         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4632         atomic_* instead of catomic_* macros.
4633
4634 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4635
4636         [BZ #3285]
4637         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4638         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4639         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4640         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4641         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4642         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4643         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4644         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4645         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4646         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4647         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4648         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4649         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4650
4651 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4652
4653         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4654         cancelable syscalls with six parameters.
4655
4656         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4657         operations instead of atomic_*.
4658
4659 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4660
4661         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4662
4663 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4664
4665         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4666         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4667         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4668         New file.
4669         * pthread_attr_setstack.c: Allow overwriting the version number of the
4670         new symbol.
4671         * pthread_attr_setstacksize.c: Likewise.
4672         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4673         it.
4674         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4675         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4676
4677 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4678
4679         [BZ #3251]
4680         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4681         Patch by Petr Baudis.
4682
4683 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4684
4685         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4686
4687         * tst-cancel2.c (tf): Loop as long as something was written.
4688
4689 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4690
4691         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4692         mutexes wake all mutexes.
4693         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4694         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4695         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4696
4697 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4698
4699         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4700         to guarantee the thread is always canceled.
4701
4702 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4703
4704         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4705         Include stdlib.h.
4706         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4707         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4708         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4710         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4711
4712 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4713
4714         [BZ #3123]
4715         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4716         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4720         * Makefile (tests): Add tst-cond22.
4721         * tst-cond22.c: New file.
4722
4723 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4724
4725         [BZ #3124]
4726         * descr.h (struct pthread): Add parent_cancelhandling.
4727         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4728         cancelhandling value to child.
4729         * pthread_create.c (start_thread): If parent thread was canceled
4730         reset the SIGCANCEL mask.
4731         * Makefile (tests): Add tst-cancel25.
4732         * tst-cancel25.c: New file.
4733
4734 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4735             Ulrich Drepper  <drepper@redhat.com>
4736
4737         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4738         counterp if it is already zero.
4739         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4740
4741 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4742             Roland McGrath  <roland@redhat.com>
4743
4744         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4745         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4746         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4747         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4748         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4749         lll_robust_mutex_timedlock, lll_mutex_unlock,
4750         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4751         Add _L_*_ symbols around the subsection.
4752         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4753         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4754
4755 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4756             Roland McGrath  <roland@redhat.com>
4757
4758         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4759         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4760         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4761         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4762         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4763         lll_robust_mutex_timedlock, lll_mutex_unlock,
4764         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4765         Add _L_*_ symbols around the subsection.
4766         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4767         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4768
4769 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4770
4771         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4772         change because it can disturb too much existing code.  If real hard
4773         reader preference is needed we'll introduce another type.
4774         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4775         (pthread_rwlock_timedwrlock): Likewise.
4776         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4777         Likewise.
4778
4779 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4780
4781         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4782         reader preference.
4783         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4784         (pthread_rwlock_timedwrlock): Likewise.
4785         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4786         Likewise.
4787
4788 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4789
4790         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4791         Only define ifdef SHARED.
4792
4793 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4794
4795         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4796         (free_stacks): ...here.
4797         (__free_stack_cache): New function.
4798         * pthreadP.h: Declare __free_stack_cache.
4799         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4800         ptr_freeres.
4801         * init.c (pthread_functions): Initialize ptr_freeres.
4802         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4803         New freeres function.
4804
4805 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4806
4807         [BZ #3018]
4808         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4809
4810 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4811
4812         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4813         _XOPEN_REALTIME_THREADS.
4814
4815 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4816
4817         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4818         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4819         HAVE_CLOCK_GETTIME_VSYSCALL.
4820         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4821
4822 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4823
4824         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4825         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4826         * descr.h (struct priority_protection_data): New type.
4827         (struct pthread): Add tpp field.
4828         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4829         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4830         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4831         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4832         TPP mutexes.
4833         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4834         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4835         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4836         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4837         * tpp.c: New file.
4838         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4839         boosted by TPP.
4840         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4841         * pthread_mutexattr_getprioceiling.c
4842         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4843         in the SCHED_FIFO priority range.
4844         * pthread_mutexattr_setprioceiling.c
4845         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4846         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4847         if mutex is not TPP.  Ceiling is now in __data.__lock.
4848         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4849         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4850         is now in __data.__lock.  Add locking.
4851         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4852         * Makefile (libpthread-routines): Add tpp.
4853         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4854         * tst-tpp.h: New file.
4855         * tst-mutexpp1.c: New file.
4856         * tst-mutexpp6.c: New file.
4857         * tst-mutexpp10.c: New file.
4858         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4859         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4860
4861 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4862
4863         [BZ #2843]
4864         * pthread_join.c (pthread_join): Account for self being canceled
4865         when checking for deadlocks.
4866         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4867         (tf1): Don't print anything after pthread_join returns, this would be
4868         another cancellation point.
4869         (tf2): Likewise.
4870         * tst-join6.c: New file.
4871         * Makefile (tests): Add tst-join6.
4872
4873 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4874
4875         [BZ #2892]
4876         * pthread_setspecific.c (__pthread_setspecific): Check
4877         out-of-range index before checking for unused key.
4878
4879         * sysdeps/pthread/gai_misc.h: New file.
4880
4881 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4882
4883         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4884         file.  Don't use sysctl.
4885         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4886         overwrite the file if this is likely not true.
4887
4888 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4889
4890         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4891         * Makefile (tests): Add tst-getpid3.
4892         * tst-getpid3.c: New file.
4893
4894 2006-07-30  Roland McGrath  <roland@redhat.com>
4895
4896         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4897
4898         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4899         (pause_not_cancel): New macro.
4900         (nanosleep_not_cancel): New macro.
4901         (sigsuspend_not_cancel): New macro.
4902         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4903         nanosleep_not_cancel macro from <not-cancel.h>.
4904         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4905         macro from <not-cancel.h>.
4906
4907 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4908             Jakub Jelinek  <jakub@redhat.com>
4909
4910         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4911         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4912         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4913         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4914         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4915         * pthread_mutex_lock.c: Likewise.
4916         * pthread_mutex_timedlock.c: Likewise.
4917         * pthread_mutex_trylock.c: Likewise.
4918         * pthread_mutex_unlock.c: Likewise.
4919         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4920         all mutexes.
4921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4923         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4924         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4925         pthread-pi-defines.sym.
4926         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4927         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4928         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4929         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4930         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4931         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4932         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4933         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4934         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4935         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4936         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4937         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4938         * tst-mutex2.c: Likewise.
4939         * tst-mutex3.c: Likewise.
4940         * tst-mutex4.c: Likewise.
4941         * tst-mutex5.c: Likewise.
4942         * tst-mutex6.c: Likewise.
4943         * tst-mutex7.c: Likewise.
4944         * tst-mutex7a.c: Likewise.
4945         * tst-mutex8.c: Likewise.
4946         * tst-mutex9.c: Likewise.
4947         * tst-robust1.c: Likewise.
4948         * tst-robust7.c: Likewise.
4949         * tst-robust8.c: Likewise.
4950         * tst-mutexpi1.c: New file.
4951         * tst-mutexpi2.c: New file.
4952         * tst-mutexpi3.c: New file.
4953         * tst-mutexpi4.c: New file.
4954         * tst-mutexpi5.c: New file.
4955         * tst-mutexpi6.c: New file.
4956         * tst-mutexpi7.c: New file.
4957         * tst-mutexpi7a.c: New file.
4958         * tst-mutexpi8.c: New file.
4959         * tst-mutexpi9.c: New file.
4960         * tst-robust1.c: New file.
4961         * tst-robust2.c: New file.
4962         * tst-robust3.c: New file.
4963         * tst-robust4.c: New file.
4964         * tst-robust5.c: New file.
4965         * tst-robust6.c: New file.
4966         * tst-robust7.c: New file.
4967         * tst-robust8.c: New file.
4968         * Makefile (tests): Add the new tests.
4969
4970         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4971         * pthread_mutex_destroy.c: Remove unneeded label.
4972
4973 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4974
4975         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4976         computations to compile time.
4977
4978 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4979
4980         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4981
4982 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4983
4984         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4985
4986 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4987
4988         * pthread_key_create.c (__pthread_key_create): Do away with
4989         __pthread_keys_lock.
4990
4991         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4992         (__kernel_cpumask_size): Mark as hidden.
4993         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4994
4995         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4996         * semaphoreP.h (__sem_mappings_lock): Likewise.
4997
4998 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4999
5000         * pthread_atfork.c: Mark __dso_handle as hidden.
5001
5002 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
5003
5004         [BZ #2644]
5005         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5006         the reload problem.  Change the one path in pthread_cancel_init
5007         which causes the problem.  Force gcc to reload.  Simplify callers.
5008         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5009         (_Unwind_GetBSP): Undo last patch.
5010
5011 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
5012
5013         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5014         function pointer is reloaded after pthread_cancel_init calls.
5015
5016         [BZ #2644]
5017         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5018         pointers are reloaded after pthread_cancel_init calls.
5019
5020 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
5021
5022         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5023         __always_inline.
5024
5025 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
5026
5027         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5028         Allocate new object which is passed to timer_sigev_thread so that
5029         the timer can be deleted before the new thread is scheduled.
5030
5031 2006-04-26  Roland McGrath  <roland@redhat.com>
5032
5033         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5034
5035 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
5036
5037         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5038         suffix for conditional jumps.
5039         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5040         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5041         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5042         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5043         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5044         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5045
5046         * init.c (sigcancel_handler): Compare with correct PID even if the
5047         thread is in the middle of a fork call.
5048         (sighandler_setxid): Likewise.
5049         Reported by Suzuki K P <suzuki@in.ibm.com> .
5050
5051 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5052
5053         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5054
5055 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5056
5057         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5058         fails [Coverity CID 105].
5059
5060 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5061
5062         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5063
5064 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5065
5066         [BZ #2505]
5067         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5068         Define __lll_rel_instr using lwsync.
5069
5070 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5071
5072         * allocatestack.c (allocate_stack): Always initialize robust_head.
5073         * descr.h: Define struct robust_list_head.
5074         (struct pthread): Use robust_list_head in robust mutex list definition.
5075         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5076         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5077         (__pthread_initialize_minimal_internal): Register robust_list with
5078         the kernel.
5079         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5080         Declare __set_robust_list_avail.
5081         * pthread_create.c (start_thread): Register robust_list of new thread.
5082         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5083         waiters.
5084         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5085         number of users, it's unreliable.
5086         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5087         set_robust_list syscall is available.
5088         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5089         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5090         Set robust_head.list_op_pending before trying to lock a robust mutex.
5091         * pthread_mutex_timedlock.c: Likewise.
5092         * pthread_mutex_trylock.c: Likewise.
5093         * pthread_mutex_unlock.c: Likewise for unlocking.
5094         * Makefile (tests): Add tst-robust8.
5095         * tst-robust8.c: New file.
5096
5097 2006-03-08  Andreas Schwab  <schwab@suse.de>
5098
5099         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5100         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5101
5102 2006-03-05  Roland McGrath  <roland@redhat.com>
5103
5104         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5105         and $config_os doesn't match *linux*.
5106
5107 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5108
5109         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5110         Use __syscall_error.
5111         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5112         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5113         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5114         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5115         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5116         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5117
5118 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5119
5120         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5121
5122 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5123
5124         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5125         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5126         mutex.
5127         (__lll_robust_timedlock_wait): Likewise.
5128         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5129         (__lll_robust_lock_wait): Likewise.
5130         (__lll_robust_timedlock_wait): Likewise.
5131         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5132         (__lll_robust_lock_wait): Likewise.
5133         (__lll_robust_timedlock_wait): Likewise.
5134
5135 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5136
5137         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5138         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5139         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5140         lll_robust_mutex_unlock): Define.
5141         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5142
5143 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5144
5145         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5146         instead of <clone.S>.
5147
5148 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5149
5150         * Makefile (libpthread-routines): Add
5151         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5152         and pthread_mutex_[sg]etprioceiling.
5153         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5154         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5155         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5156         pthread_mutex_setprioceiling.
5157         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5158         PTHREAD_PRIO_PROTECT): New enum values.
5159         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5160         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5161         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5162         prototypes.
5163         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5164         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5165         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5166         Define.
5167         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5168         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5169         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5170         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5171         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5172         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5173         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5174         protocol mutexes.
5175         * pthread_mutex_getprioceiling.c: New file.
5176         * pthread_mutex_setprioceiling.c: New file.
5177         * pthread_mutexattr_getprioceiling.c: New file.
5178         * pthread_mutexattr_setprioceiling.c: New file.
5179         * pthread_mutexattr_getprotocol.c: New file.
5180         * pthread_mutexattr_setprotocol.c: New file.
5181
5182 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5183
5184         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5185
5186 2006-02-27  Roland McGrath  <roland@redhat.com>
5187
5188         * sysdeps/pthread/Subdirs: List nptl here too.
5189         * configure (libc_add_on_canonical): New variable.
5190
5191         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5192
5193         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5194         self to get main source tree's file.
5195         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5196         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5197         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5198         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5199         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5200         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5201         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5202         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5203         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5204         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5205         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5206         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5207         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5208
5209         * Makefile: Use $(sysdirs) in vpath directive.
5210
5211         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5212         (CPPFLAGS-timer_routines.c): Likewise.
5213
5214         * Makeconfig (includes): Variable removed.
5215
5216 2006-02-26  Roland McGrath  <roland@redhat.com>
5217
5218         * sysdeps/generic/pt-raise.c: Moved to ...
5219         * pt-raise.c: ... here.
5220         * sysdeps/generic/lowlevellock.h: Moved to ...
5221         * lowlevellock.h: ... here.
5222
5223 2006-02-23  Roland McGrath  <roland@redhat.com>
5224
5225         * descr.h (struct pthread): Add final member `end_padding'.
5226         (PTHREAD_STRUCT_END_PADDING): Use it.
5227
5228 2006-02-20  Roland McGrath  <roland@redhat.com>
5229
5230         * sysdeps/mips: Directory removed, saved in ports repository.
5231         * sysdeps/unix/sysv/linux/mips: Likewise.
5232
5233 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5234
5235         * tst-robust1.c: Add second mutex to check that the mutex list is
5236         handled correctly.
5237
5238 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5239
5240         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5241         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5242         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5243         lll_robust_mutex_unlock): New macros.
5244         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5245         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5246         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5247         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5248         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5249
5250 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5251
5252         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5253         definitions.
5254         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5255
5256 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5257
5258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5259         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5260         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5261         (lll_robust_mutex_unlock): Likewise.
5262
5263 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5264
5265         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5266         Set robust_list.__next rather than robust_list.
5267         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5268         (__pthread_list_t): New typedef.
5269         (pthread_mutex_t): Replace __next and __prev fields with __list.
5270         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5271         (__pthread_list_t): New typedef.
5272         (pthread_mutex_t): Replace __next and __prev fields with __list.
5273         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5274         (__pthread_list_t, __pthread_slist_t): New typedefs.
5275         (pthread_mutex_t): Replace __next and __prev fields with __list.
5276         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5277         (__pthread_list_t, __pthread_slist_t): New typedefs.
5278         (pthread_mutex_t): Replace __next and __prev fields with __list.
5279         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5280         (__pthread_list_t, __pthread_slist_t): New typedefs.
5281         (pthread_mutex_t): Replace __next and __prev fields with __list.
5282         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5283         (__pthread_slist_t): New typedef.
5284         (pthread_mutex_t): Replace __next field with __list.
5285
5286 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5287
5288         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5289         PTHREAD_MUTEX_OWNERDEAD.
5290         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5291         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5292         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5293         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5294         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5295         to PTHREAD_MUTEX_INCONSISTENT.
5296         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5297         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5298         * pthread_mutex_trylock.c: Likewise.
5299         * pthread_mutex_timedlock.c: Likewise.
5300         * pthread_mutex_unlock.c: Likewise.
5301         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5302         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5303         lowlevelrobustlock.sym.
5304         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5305         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5306         definitions.
5307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5308         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5309         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5310         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5311         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5312
5313 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5314
5315         * allocatestack.c (allocate_stack): Initialize robust_list.
5316         * init.c (__pthread_initialize_minimal_internal): Likewise.
5317         * descr.h (struct xid_command): Pretty printing.
5318         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5319         robust_list.  Adjust macros.
5320         * pthread_create.c (start_thread): Adjust robust_list handling.
5321         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5322         but the owner for all robust mutex types.
5323         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5324         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5325         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5326         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5327
5328         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5329         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5330
5331 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5332
5333         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5334         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5335
5336 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5337
5338         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5339         Return status.
5340         (lll_futex_timed_wait): Define.
5341
5342 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5343
5344         * tst-cancel4.c: Test ppoll.
5345
5346 2006-01-18  Andreas Jaeger  <aj@suse.de>
5347
5348         [BZ #2167]
5349         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5350         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5351         by Jim Gifford <patches@jg555.com>.
5352
5353 2006-01-13  Richard Henderson  <rth@redhat.com>
5354
5355         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5356
5357 2006-01-10  Roland McGrath  <roland@redhat.com>
5358
5359         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5360         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5361         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5362         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5363         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5364         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5365         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5366         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5367         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5368         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5369
5370 2006-01-09  Roland McGrath  <roland@redhat.com>
5371
5372         * tst-initializers1-c89.c: New file.
5373         * tst-initializers1-c99.c: New file.
5374         * tst-initializers1-gnu89.c: New file.
5375         * tst-initializers1-gnu99.c: New file.
5376         * Makefile (tests): Add them.
5377         (CFLAGS-tst-initializers1-c89.c): New variable.
5378         (CFLAGS-tst-initializers1-c99.c): New variable.
5379         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5380         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5381
5382         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5383         Use __extension__ on anonymous union definition.
5384         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5385         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5386         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5387         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5388         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5389
5390 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5391
5392         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5393         Don't give the union a name because it changes the mangled name.
5394         Instead name the struct for __data.
5395         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5396         Likewise.
5397         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5398         Likewise.
5399
5400 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5401
5402         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5403         stack bias to mc_ftp field.
5404
5405 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5406
5407         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5408         being too clever and reloading the futex value where it shouldn't.
5409
5410 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5411
5412         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5413         correct type.
5414
5415 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5416
5417         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5418         Add cfi directives.
5419
5420 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5421
5422         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5423         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5424         rename in tcbhead_t.
5425
5426         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5427         Don't give the union a name because it changes the mangled name.
5428         Instead name the struct for __data.
5429         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5430         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5431         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5432         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5433         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5434         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5435
5436 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5437
5438         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5439         Return status.
5440         (lll_futex_timed_wait): Define.
5441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5442         * sysdeps/pthread/aio_misc.h: New file.
5443
5444 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5445
5446         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5447
5448 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5449
5450         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5451         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5452         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5453
5454 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5455
5456         * tst-cancel24.cc: Use C headers instead of C++ headers.
5457
5458 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5459
5460         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5461         sparc-linux configured glibc.
5462         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5463         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5464         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5465         atomic_compare_and_exchange_val_24_acq instead of
5466         atomic_compare_and_exchange_val_acq.
5467         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5468         instead of atomic_exchange_rel.
5469         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5470         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5471         file.
5472         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5473         file.
5474         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5475         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5476         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5477         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5478         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5479         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5480         New file.
5481         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5482         New file.
5483         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5484         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5485         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5486         file.
5487         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5488         file.
5489         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5490
5491 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5492
5493         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5494         mutex initializers.
5495
5496 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5497
5498         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5499         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5500         THREAD_COPY_POINTER_GUARD): Define.
5501         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5502         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5503
5504 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5505
5506         * version.c: Update copyright year.
5507
5508 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5509
5510         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5511         .eh_frame section, use cfi_* directives.
5512         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5513
5514 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5515
5516         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5517         now.
5518
5519 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5520
5521         * sysdeps/pthread/sigaction.c: Removed.
5522         * sigaction.c: New file.
5523         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5524
5525 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5526
5527         * Makefile (tests): Add tst-signal7.
5528         * tst-signal7.c: New file.
5529
5530 2005-12-27  Roland McGrath  <roland@redhat.com>
5531
5532         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5533         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5534         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5535         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5536         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5537         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5538         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5539         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5540         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5541         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5542         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5543
5544 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5545
5546         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5547         and __prev field to pthread_mutex_t.
5548         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5549         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5550         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5551         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5552         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5553         to pthread_mutex_t.
5554
5555 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5556
5557         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5558         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5559         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5560         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5561         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5562         and PTHREAD_MUTEXATTR_FLAG_BITS.
5563         * descr.h (struct pthread): Add robust_list field and define
5564         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5565         * pthread_mutexattr_getrobust.c: New file.
5566         * pthread_mutexattr_setrobust.c: New file.
5567         * pthread_mutex_consistent.c: New file.
5568         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5569         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5570         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5571         Adjust pthread_mutex_t initializers.
5572         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5573         field to pthread_mutex_t.
5574         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5575         and __prev field to pthread_mutex_t.
5576         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5577         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5578         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5579         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5580         * pthread_mutexattr_gettype.c: Likewise.
5581         * pthread_mutexattr_setpshared.c: Likewise.
5582         * pthread_mutexattr_settype.c: Likewise.
5583         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5584         Initialize mutex kind according to robust flag.
5585         * pthread_mutex_lock.c: Implement local robust mutex.
5586         * pthread_mutex_timedlock.c: Likewise.
5587         * pthread_mutex_trylock.c: Likewise.
5588         * pthread_mutex_unlock.c: Likewise.
5589         * pthread_create.c (start_thread): Mark robust mutexes which remained
5590         locked as dead.
5591         * tst-robust1.c: New file.
5592         * tst-robust2.c: New file.
5593         * tst-robust3.c: New file.
5594         * tst-robust4.c: New file.
5595         * tst-robust5.c: New file.
5596         * tst-robust6.c: New file.
5597         * tst-robust7.c: New file.
5598         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5599         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5600         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5601         tst-robust5, tst-robust6, and tst-robust7.
5602
5603         * tst-typesizes.c: New file.
5604         * Makefile (tests): Add tst-typesizes.
5605
5606         * tst-once3.c: More debug output.
5607
5608 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5609
5610         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5611         missing after last change.
5612
5613         * version.c: Update copyright year.
5614
5615 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5616
5617         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5618         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5619         * pthread_mutex_trylock.c: Likewise.
5620         * pthread_mutex_timedlock.c: Likewise.
5621         * pthread_mutex_unlock.c: Likewise.
5622
5623 2005-12-22  Roland McGrath  <roland@redhat.com>
5624
5625         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5626         so that #include_next's search location is not reset to the -I..
5627         directory where <nptl/...> can be found.
5628
5629 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5630
5631         [BZ #1913]
5632         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5633         Fix unwind info.  Remove useless branch prediction prefix.
5634         * tst-cancel24.cc: New file.
5635         * Makefile: Add rules to build and run tst-cancel24.
5636
5637 2005-12-21  Roland McGrath  <roland@redhat.com>
5638
5639         * libc-cancellation.c: Use <> rather than "" #includes.
5640         * pt-cleanup.c: Likewise.
5641         * pthread_create.c: Likewise.
5642         * pthread_join.c: Likewise.
5643         * pthread_timedjoin.c: Likewise.
5644         * pthread_tryjoin.c: Likewise.
5645         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5646         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5647         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5648         * unwind.c: Likewise.
5649
5650 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5651
5652         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5653         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5654         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5655         THREAD_COPY_POINTER_GUARD): Define.
5656
5657 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5658
5659         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5660         rather than one.
5661         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5662         THREAD_COPY_POINTER_GUARD): Define.
5663         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5664         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5665         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5666         THREAD_COPY_POINTER_GUARD): Define.
5667         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5668         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5669         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5670         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5671         Use PTR_DEMANGLE for B0 if defined.
5672
5673 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5674
5675         * pthread_create.c (__pthread_create_2_1): Use
5676         THREAD_COPY_POINTER_GUARD if available.
5677         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5678         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5679         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5680         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5681         * sysdeps/x86_64/tls.h: Likewise.
5682
5683 2005-12-15  Roland McGrath  <roland@redhat.com>
5684
5685         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5686
5687 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5688
5689         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5690         sysdeps/generic.
5691         * errno-loc.c: New file.
5692
5693 2005-12-12  Roland McGrath  <roland@redhat.com>
5694
5695         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5696         adjustments before choosing stack size.  Update minimum stack size
5697         calculation to match allocate_stack change.
5698
5699 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5700
5701         * allocatestack.c (allocate_stack): Don't demand that there is an
5702         additional full page available on the stack beside guard, TLS, the
5703         minimum stack.
5704
5705 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5706
5707         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5708         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5709
5710         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5711         compiling 32-bit code we must define __cleanup_fct_attribute.
5712
5713 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5714
5715         [BZ #1920]
5716         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5717         __attribute__ instead of __attribute.
5718         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5719         (__cleanup_fct_attribute): Likewise.
5720
5721 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5722
5723         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5724         a write barrier before writing libgcc_s_getcfa.
5725
5726 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5727
5728         * sysdeps/unix/sysv/linux/configure: Removed.
5729
5730 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5731
5732         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5733         optional init_array/fini_array support.
5734
5735 2005-10-24  Roland McGrath  <roland@redhat.com>
5736
5737         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5738         versioned_symbol use.
5739
5740 2005-10-16  Roland McGrath  <roland@redhat.com>
5741
5742         * init.c (__pthread_initialize_minimal_internal): Even when using a
5743         compile-time default stack size, apply the minimum that allocate_stack
5744         will require, and round up to page size.
5745
5746 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5747
5748         * Makefile ($(test-modules)): Remove static pattern rule.
5749
5750 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5751             Ulrich Drepper  <drepper@redhat.com>
5752
5753         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5754         alignment in callback function.
5755         * Makefile: Add rules to build and run tst-align3.
5756         * tst-align3.c: New file.
5757
5758 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5759
5760         * allocatestack.c (setxid_signal_thread): Add
5761         INTERNAL_SYSCALL_DECL (err).
5762
5763 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5764
5765         * allocatestack.c (setxid_signal_thread): Need to use
5766         atomic_compare_and_exchange_bool_acq.
5767
5768 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5769             Jakub Jelinek  <jakub@redhat.com>
5770
5771         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5772         CANCEL_RESTMASK.
5773         (struct pthread): Move specific_used field to avoid padding.
5774         Add setxid_futex field.
5775         * init.c (sighandler_setxid): Reset setxid flag and release the
5776         setxid futex.
5777         * allocatestack.c (setxid_signal_thread): New function.  Broken
5778         out of the bodies of the two loops in __nptl_setxid.  For undetached
5779         threads check whether they are exiting and if yes, don't send a signal.
5780         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5781         * pthread_create.c (start_thread): For undetached threads, check
5782         whether setxid bit is set.  If yes, wait until signal has been
5783         processed.
5784
5785         * allocatestack.c (STACK_VARIABLES): Initialize them.
5786         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5787
5788 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5789
5790         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5791         waiters, awake all waiters on the associated mutex.
5792
5793 2005-09-22  Roland McGrath  <roland@redhat.com>
5794
5795         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5796         ../sysdeps/x86_64/hp-timing.h).
5797
5798 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5799
5800         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5801         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5802         (lll_futex_wake_unlock): Define.
5803         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5804         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5805         (lll_futex_wake_unlock): Define.
5806         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5807         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5808         (lll_futex_wake_unlock): Define.
5809         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5810         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5811         (lll_futex_wake_unlock): Define.
5812         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5813         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5814         (lll_futex_wake_unlock): Define.
5815         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5816         lll_futex_wake_unlock.
5817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5818         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5819         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5821         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5822         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5823
5824 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5825
5826         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5827         Fix typo in register name.
5828
5829 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5830
5831         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5832         Use __sigfillset.  Document that sigfillset does the right thing wrt
5833         to SIGSETXID.
5834
5835 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5836
5837         [BZ #1102]
5838         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5839         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5840         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5841         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5842         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5843         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5844         in the structure.
5845         * Makefile (tests): Add tst-initializers1.
5846         (CFLAGS-tst-initializers1.c): Set.
5847         * tst-initializers1.c: New test.
5848
5849 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5850
5851         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5852         Make sure __flags are located at offset 48 from the start of the
5853         structure.
5854
5855 2005-07-02  Roland McGrath  <roland@redhat.com>
5856
5857         * Makeconfig: Comment fix.
5858
5859 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5860
5861         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5862         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5863         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5864         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5865         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5866         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5867         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5868         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5869         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5870         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5871
5872 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5873
5874         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5875         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5876         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5877         fields.
5878         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5879         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5880         field.  Put in sysinfo field unconditionally.
5881         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5882         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5883         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5884         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5885         fields.
5886         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5887         * pthread_create.c (__pthread_create_2_1): Use
5888         THREAD_COPY_STACK_GUARD macro.
5889         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5890         tests.
5891         * tst-stackguard1.c: New file.
5892         * tst-stackguard1-static.c: New file.
5893
5894 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5895
5896         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5897         Invoke CGOTSETUP and CGOTRESTORE.
5898         (CGOTSETUP, CGOTRESTORE): Define.
5899
5900 2005-05-29  Richard Henderson  <rth@redhat.com>
5901
5902         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5903         (tf_write, tf_writev): Use it.
5904         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5905         the system minimum.
5906
5907 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5908
5909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5910         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5911         __librt_*_asynccancel@local.
5912
5913 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5914
5915         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5916         all occurrences of JUMPTARGET.  Instead append @local to labels.
5917
5918 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5919
5920         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5921         size/alignment of struct pthread rather than tcbhead_t.
5922         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5923         Likewise.
5924         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5925         Likewise.
5926         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5927         Likewise.
5928
5929 2005-05-19  Richard Henderson  <rth@redhat.com>
5930
5931         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5932         __sync_val_compare_and_swap, not explicit _si variant.
5933         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5934
5935 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5936
5937         [BZ #915]
5938         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5939
5940 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5941
5942         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5943         .eh_frame section, use cfi_* directives.
5944
5945 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5946
5947         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5948         of "" includes.
5949
5950 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5951
5952         [BZ #1075]
5953         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5954         aio_write blocks.
5955
5956 2005-04-27  Roland McGrath  <roland@redhat.com>
5957
5958         * Makefile (tests): Remove tst-clock2.
5959
5960         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5961         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5962         translating to the kernel clockid_t for our own process/thread clock.
5963
5964         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5965
5966 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5967
5968         * old_pthread_cond_init.c: Include <errno.h>.
5969         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5970         process shared or uses clock other than CLOCK_REALTIME.
5971         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5972
5973 2005-04-13  David S. Miller  <davem@davemloft.net>
5974
5975         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5976         * sysdeps/sparc/sparc64/clone.S: New file.
5977
5978 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5979
5980         [BZ #1102]
5981         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5982         __inline instead of inline.
5983         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5984
5985 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5986
5987         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5988         functionally equivalent, but shorter instructions.
5989         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5990         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5991         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5992         Likewise.
5993         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5994         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5995         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5996         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5998         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5999         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6000         Likewise.
6001         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6002         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6004         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6005         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6006
6007 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
6008
6009         * sysdeps/mips/Makefile: New file.
6010         * sysdeps/mips/nptl-sysdep.S: New file.
6011         * sysdeps/mips/tcb-offsets.sym: New file.
6012         * sysdeps/mips/pthread_spin_lock.S: New file.
6013         * sysdeps/mips/pthread_spin_trylock.S: New file.
6014         * sysdeps/mips/pthreaddef.h: New file.
6015         * sysdeps/mips/tls.h: New file.
6016         * sysdeps/mips/jmpbuf-unwind.h: New file.
6017         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6018         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6019         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6020         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6021         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6022         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6023         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6024         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6025         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6026         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6027
6028 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
6029
6030         [BZ #1112]
6031         * pthread_create.c (__pthread_create_2_1): Rename syscall error
6032         variable to scerr.
6033
6034 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6035
6036         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6037
6038 2005-02-25  Roland McGrath  <roland@redhat.com>
6039
6040         * alloca_cutoff.c: Correct license text.
6041         * tst-unload.c: Likewise.
6042         * sysdeps/pthread/allocalim.h: Likewise.
6043         * sysdeps/pthread/pt-initfini.c: Likewise.
6044         * sysdeps/pthread/bits/libc-lock.h: Likewise.
6045         * sysdeps/pthread/bits/sigthread.h: Likewise.
6046         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6047         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6048
6049 2005-02-16  Roland McGrath  <roland@redhat.com>
6050
6051         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6052         Use unsigned int * for ptr_nthreads.
6053
6054 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6055
6056         [BZ #721]
6057         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6058         gcc4.
6059
6060 2005-02-07  Richard Henderson  <rth@redhat.com>
6061
6062         [BZ #787]
6063         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6064         argument.
6065
6066 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6067
6068         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6069         order of arguments in invocation of atomic_add_zero.
6070
6071 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6072
6073         [BZ #737]
6074         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6075         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6076         at least gotntpoff relocation and addition.
6077         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6078         Likewise.
6079         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6080         Likewise.
6081         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6082         Likewise.
6083
6084 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6085
6086         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6087         entry for static tls deallocation fix.
6088         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6089         also contains information whether the memory pointed to is static
6090         TLS or not.
6091         * sysdeps/i386/tls.h: Likewise.
6092         * sysdeps/ia64/tls.h: Likewise.
6093         * sysdeps/powerpc/tls.h: Likewise.
6094         * sysdeps/s390/tls.h: Likewise.
6095         * sysdeps/sh/tls.h: Likewise.
6096         * sysdeps/sparc/tls.h: Likewise.
6097         * sysdeps/x86_64/tls.h: Likewise.
6098
6099 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6100
6101         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6102
6103 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6104
6105         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6106         %esp.
6107         * Makefile (tests): Add tst-align2.
6108         * tst-align2.c: New test.
6109         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6110         -mpreferred-stack-boundary=4.
6111
6112 2004-12-18  Roland McGrath  <roland@redhat.com>
6113
6114         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6115         New file removed withdrawn for the moment.
6116
6117 2004-12-17  Richard Henderson  <rth@redhat.com>
6118
6119         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6120         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6121
6122 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6123
6124         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6125         Increased PTHREAD_STACK_MIN.
6126
6127         * tst-context1.c (stacks): Use bigger stack size.
6128
6129 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6130
6131         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6132         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6133
6134 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6135
6136         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6137         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6138         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6139
6140 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6141
6142         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6143
6144 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6145
6146         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6147         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6148
6149         * tst-getpid1.c: If child crashes, report this first.  Print which
6150         signal.
6151
6152 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6153
6154         * init.c (__pthread_initialize_minimal_internal): Also unblock
6155         SIGSETXID.
6156
6157 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6158
6159         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6160         _POSIX_THREAD_CPUTIME): Define to 0.
6161         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6162         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6163         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6164         __timer_signal_thread_tclk): Remove.
6165         (init_module): Remove their initialization.
6166         (thread_cleanup): Remove their cleanup assertions.
6167         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6168         __timer_signal_thread_tclk): Remove.
6169         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6170         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6171         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6172
6173 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6174
6175         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6176         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6177
6178         * Makefile (tests): Add tst-getpid2.
6179         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6180         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6181         * tst-getpid2.c: New test.
6182
6183 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6184
6185         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6186
6187 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6188
6189         * Makefile (tests): Add tst-getpid1.
6190         * tst-getpid1.c: New file.
6191         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6192         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6193
6194 2004-12-02  Roland McGrath  <roland@redhat.com>
6195
6196         * Makefile (libpthread-nonshared): Variable removed.
6197         ($(objpfx)libpthread_nonshared.a): Target removed.
6198         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6199         These are now handled by generic magic from
6200         libpthread-static-only-routines being set.
6201
6202 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6203
6204         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6205         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6206         _POSIX_THREAD_PRIO_PROTECT): Define.
6207         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6208         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6209         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6210
6211 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6212
6213         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6214         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6215         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6216         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6217         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6218         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6219         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6220
6221 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6222
6223         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6224
6225         * Makefile (libpthread-routines): Add pthread_setschedprio.
6226         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6227         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6228         * pthread_setschedprio.c: New file.
6229
6230 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6231
6232         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6233         * pthread_cancel.c (pthread_create): Likewise.
6234
6235         * Makefile (libpthread-routines): Add vars.
6236         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6237         * init.c (__default_stacksize, __is_smp): Remove.
6238         * vars.c: New file.
6239         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6240         and define a wrapper macro.
6241         (PTHREAD_STATIC_FN_REQUIRE): Define.
6242         * allocatestack.c (__find_thread_by_id): Undefine.
6243         * pthread_create (__pthread_keys): Remove.
6244         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6245         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6246         PTHREAD_STATIC_FN_REQUIRE.
6247
6248 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6249
6250         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6251         parameter to REGISTER macro.
6252
6253 2004-11-17  Roland McGrath  <roland@redhat.com>
6254
6255         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6256         Make sure SIGCANCEL is blocked as well.
6257
6258 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6259
6260         * sysdeps/pthread/setxid.h: New file.
6261         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6262         (struct xid_command): Add forward decl.
6263         (struct pthread_functions): Change return type of __nptl_setxid hook
6264         to int.
6265         * pthreadP.h (__nptl_setxid): Change return type to int.
6266         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6267         calling thread, return its return value and set errno on failure.
6268         * descr.h (struct xid_command): Change id type to long array.
6269
6270         * Makefile: Add rules to build and test tst-setuid1 and
6271         tst-setuid1-static.
6272         * tst-setuid1.c: New test.
6273         * tst-setuid1-static.c: New test.
6274
6275 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6276
6277         * Makefile (tests): Add tst-exit3.
6278         * tst-exit3.c: New test.
6279
6280 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6281
6282         * Makefile (tests): Add tst-exit2.
6283         * tst-exit2.c: New file.
6284
6285 2004-11-09  Roland McGrath  <roland@redhat.com>
6286
6287         [BZ #530]
6288         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6289         here, before calling clone.
6290         * pthread_create.c (start_thread): Don't do it here.
6291
6292 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6293
6294         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6295
6296 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6297
6298         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6299         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6300         assembler warning.
6301
6302 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6303
6304         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6305         if sched_priority is not between minprio and maxprio.
6306
6307 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6308
6309         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6310         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6311
6312         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6313         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6314
6315 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6316
6317         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6318         not-cancelable I/O functions.
6319
6320 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6321
6322         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6323         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6324         make sure 2 is stored in the futex and we looked at the old value.
6325         Fix a few other problems to return the correct value.
6326
6327 2004-10-14  Richard Henderson  <rth@redhat.com>
6328
6329         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6330         make gcc4 happy.
6331
6332 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6333
6334         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6335         of pthread-functions.h and pthreaddef.h.
6336         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6337
6338         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6339         Change __data.__nwaiters from int to unsigned int.
6340
6341         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6342         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6343
6344         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6345         before return type.
6346
6347         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6348         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6349
6350 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6351
6352         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6353         test fails, remove message queue.
6354         (tf_msgsnd): Likewise.
6355
6356 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6357
6358         * tst-clock1.c: Change #ifdef to #if defined.
6359         * tst-clock2.c: Likewise.
6360         * tst-cond11.c: Likewise.
6361
6362         * sysdeps/pthread/timer_create.c (timer_create): Use
6363         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6364         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6365         THREAD_CPUTIME.
6366
6367 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6368
6369         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6370         _POSIX_THREAD_CPUTIME): Define to 0.
6371
6372 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6373
6374         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6375         and _POSIX_THREAD_CPUTIME to zero.
6376         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6377         * tst-barrier2.c: Fix testing for POSIX feature.
6378         * tst-clock1.c: Likewise.
6379         * tst-clock2.c: Likewise.
6380         * tst-cond11.c: Likewise.
6381         * tst-cond4.c: Likewise.
6382         * tst-cond6.c: Likewise.
6383         * tst-flock2.c: Likewise.
6384         * tst-mutex4.c: Likewise.
6385         * tst-mutex9.c: Likewise.
6386         * tst-rwlock12.c: Likewise.
6387         * tst-rwlock4.c: Likewise.
6388         * tst-signal1.c: Likewise.
6389         * tst-spin2.c: Likewise.
6390         * sysdeps/pthread/posix-timer.h: Likewise.
6391         * sysdeps/pthread/timer_create.c: Likewise.
6392         * sysdeps/pthread/timer_routines.c: Likewise.
6393
6394 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6395
6396         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6397         (__lll_mutex_timedlock_wait): Address futex correctly.
6398
6399         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6400         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6401         make sure 2 is stored in the futex and we looked at the old value.
6402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6403         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6404         which might very well made the code not working at all before.
6405         [BZ #417]
6406
6407 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6408
6409         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6410         allow SIGSETXID to be sent.
6411         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6412         for SIGSETXID to be defined.
6413         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6414         SIGSETXID cannot be blocked.
6415
6416         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6417         Add __extension__ to long long types.
6418         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6419         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6420         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6421         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6422         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6423         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6424         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6425
6426 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6427
6428         * descr.h (struct pthread): Add stopped_start field.
6429         * sysdeps/pthread/createthread.c (create_thread): Set
6430         start_stopped flag in descriptor for new thread appropriately.
6431         * pthread_create.c (start_thread): Only take lock to be stopped on
6432         startup if stopped_start flag says so.
6433
6434 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6435
6436         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6437         is created detached and if yes, do not try to free the stack in case
6438         the thread creation failed.
6439         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6440         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6441         case there has been no error.  [BZ #405]
6442
6443         * pthread_create.c (start_thread): Don't wait for scheduler data
6444         etc to be set at the beginning of the function.  The cancellation
6445         infrastructure must have been set up.  And enable async
6446         cancellation before potentially going to sleep.  [BZ #401]
6447
6448 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6449
6450         * Versions: Remove exports for pthread_set*id_np functions.
6451         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6452         for now.
6453         * Makefile: Don't build pthread_set*id code for now.
6454
6455 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6456
6457         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6458         internal use.
6459         * allocatestack.c (__nptl_setxid): New function.
6460         * descr.h (struct xid_command): Define type.
6461         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6462         (sighandler_setxid): New function.
6463         (__pthread_initialize_minimal): Register sighandler_setxid for
6464         SIGCANCEL.
6465         * pt-allocrtsig.c: Update comment.
6466         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6467         Declare __nptl_setxid.
6468         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6469         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6470         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6471         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6472         and pthread_setresuid_np.
6473         * pthread_setgid_np.c: New file.
6474         * pthread_setuid_np.c: New file.
6475         * pthread_setegid_np.c: New file.
6476         * pthread_seteuid_np.c: New file.
6477         * pthread_setregid_np.c: New file.
6478         * pthread_setreuid_np.c: New file.
6479         * pthread_setresgid_np.c: New file.
6480         * pthread_setresuid_np.c: New file.
6481         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6482         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6483         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6484         and pthread_setresuid_np.
6485         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6486         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6487         pthread_setregid, and pthread_setresgid.
6488
6489 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6490
6491         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6492         ENOMEM when out of memory.
6493
6494 2004-09-10  Roland McGrath  <roland@redhat.com>
6495
6496         [BZ #379]
6497         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6498         code, since we don't try to use the broken CLONE_STOPPED any more.
6499         * pthread_create.c (start_thread): Likewise.
6500
6501 2004-09-15  Richard Henderson  <rth@redhat.com>
6502
6503         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6504
6505 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6506
6507         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6508         (__libc_unwind_longjmp): Delete macro and declare as function.
6509         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6510         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6511         nptl directory.
6512         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6513         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6514         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6515
6516 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6517
6518         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6519         for __USE_XOPEN2K.
6520         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6521         types also for __USE_XOPEN2K.
6522         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6523         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6524         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6525         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6526         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6527         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6528         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6529         [BZ #320]
6530
6531 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6532
6533         * sysdeps/pthread/pthread.h
6534         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6535         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6536         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6537         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6538         [BZ #375]
6539
6540 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6541
6542         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6543         PSEUDO to be used with . prefix.
6544
6545         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6546         Use atomic_increment instead of atomic_exchange_and_add.
6547         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6548         Likewise.
6549         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6550         Likewise.
6551         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6552         Likewise.
6553
6554         * allocatestack.c (allocate_stack): Use atomic_increment_val
6555         instead of atomic_exchange_and_add.
6556         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6557         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6558         Likewise.
6559         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6560         Likewise.
6561
6562         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6563         the initialization function might throw.
6564
6565 2005-09-05  Richard Henderson  <rth@redhat.com>
6566
6567         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6568         Move definition inside libpthread, libc, librt check.  Provide
6569         definition for rtld.
6570
6571 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6572
6573         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6574         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6575         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6576         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6577         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6578         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6579         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6580         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6581         * unwind.c: Use it.
6582
6583         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6584         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6585         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6586         Likewise.
6587         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6588         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6589         this is the last waiter, signal pthread_cond_destroy caller and
6590         avoid using the pthread_cond_t structure after unlock.
6591         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6593         Read clock type from the least significant bits of __nwaiters instead
6594         of __clock.
6595         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6596         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6597
6598 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6599
6600         [BZ #342]
6601         * Makefile (tests): Add tst-cond20 and tst-cond21.
6602         * tst-cond20.c: New test.
6603         * tst-cond21.c: New test.
6604         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6605         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6606         it unsigned int.
6607         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6608         Likewise.
6609         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6610         (pthread_cond_t): Likewise.
6611         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6612         Likewise.
6613         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6614         Likewise.
6615         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6616         Likewise.
6617         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6618         (cond_nwaiters): New.
6619         (clock_bits): New.
6620         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6621         if there are waiters not signalled yet.
6622         Wait until all already signalled waiters wake up.
6623         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6624         __nwaiters.  If pthread_cond_destroy has been called and this is the
6625         last waiter, signal pthread_cond_destroy caller and avoid using
6626         the pthread_cond_t structure after unlock.
6627         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6628         decrement it when leaving.  If pthread_cond_destroy has been called
6629         and this is the last waiter, signal pthread_cond_destroy caller.
6630         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6631         Likewise.  Read clock type from the least significant bits of
6632         __nwaiters instead of __clock.
6633         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6634         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6635         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6636         clock type just from the last COND_CLOCK_BITS bits of value.
6637         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6638         instead of __clock, just from second bit of condattr's value.
6639
6640 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6641
6642         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6643         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6644         != 64.
6645         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6646
6647 2004-08-15  Roland McGrath  <roland@frob.com>
6648
6649         * pthread_atfork.c: Update copyright terms including special exception
6650         for these trivial files, which are statically linked into executables
6651         that use dynamic linking for the significant library code.
6652
6653 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6654
6655         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6656         pthread_rwlock_rdlock.
6657         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6658         Decrease __nr_readers_queued after reacquiring lock.
6659         * sysdeps/pthread/pthread_rwlock_timedrdlock
6660         (pthread_rwlock_timedrdlock): Likewise.
6661         Reported by Bob Cook <bobcook47@hotmail.com>.
6662
6663 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6664
6665         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6666         before pthread_barrier_wait.
6667
6668 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6669
6670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6671         Remove unnecessary exception handling data.
6672
6673 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6674
6675         [BZ #284]
6676         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6677         instead of clockid_t.
6678
6679 2004-07-21  Roland McGrath  <roland@redhat.com>
6680
6681         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6682
6683 2004-07-19  Roland McGrath  <roland@redhat.com>
6684
6685         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6686
6687 2004-07-02  Roland McGrath  <roland@redhat.com>
6688
6689         * configure: Don't exit.
6690
6691 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6692
6693         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6694         (__pthread_cond_timedwait): Check for invalid nanosecond in
6695         timeout value.
6696
6697 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6698
6699         * Makefile: Add rules to build and run tst-fini1.
6700         * tst-fini1.c: New file.
6701         * tst-fini1mod.c: New file.
6702
6703 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6704
6705         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6706         if no cancellation support is needed.
6707         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6708         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6709         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6710         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6711         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6712         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6713         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6714         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6715         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6716
6717         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6718         only if not already defined.
6719
6720 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6721
6722         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6723         constraint "m" instead of "0" for futex.
6724
6725         * shlib-versions: Add powerpc64-.*-linux.*.
6726
6727 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6728
6729         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6730         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6731         for valid tv_nsec.
6732         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6733         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6734         bits.
6735
6736 2004-06-29  Roland McGrath  <roland@redhat.com>
6737
6738         * Banner: NPTL no longer has its own version number.
6739         * Makefile (nptl-version): Variable removed.
6740         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6741         using $(version), the glibc version number.
6742
6743 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6744
6745         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6746         Fix branch offset for a PLT entry.
6747         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6748         Likewise.
6749         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6750         Likewise.
6751         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6752         Likewise.
6753         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6754         Likewise.
6755
6756 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6757
6758         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6759         unconditionally.
6760
6761 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6762
6763         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6764         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6765         instead of tv_sec.
6766         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6767         (pthread_rwlock_timedrdlock): Likewise.
6768
6769 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6770
6771         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6772         Set __r7 to val, not mutex.
6773
6774 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6775
6776         * Makefile: Add rules to build tst-rwlock14.
6777         * tst-rwlock14.c: New file.
6778
6779 2004-06-24  Boris Hu  <boris.hu@intel.com>
6780
6781         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6782         check.
6783         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6784
6785 2004-06-19  Andreas Jaeger  <aj@suse.de>
6786
6787         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6788         assembler in last patch.
6789
6790 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6791
6792         * sysdeps/pthread/pthread_cond_timedwait.c
6793         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6795         (__pthread_cond_timedwait): Check for invalid nanosecond in
6796         timeout value.
6797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6798         * tst-cond19.c: New file.
6799         * Makefile: Add rules to build and run tst-cond19.
6800
6801 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6802
6803         * tst-context1.c (GUARD_PATTERN): Defined.
6804         (tst_context_t): Define struct containing ucontext_t & guard words.
6805         (ctx): Declare as an array of tst_context_t.
6806         (fct): Verify uc_link & guard words are still valid.
6807         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6808
6809 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6810
6811         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6812         Add __data.__futex field, reshuffle __data.__clock.
6813         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6814         (__pthread_cond_signal): Increment __futex at the same time as
6815         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6816         address of low 32-bits of __wakeup_seq to futex syscall.
6817         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6818         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6819         releasing internal lock to FUTEX_WAIT.
6820         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6821         (__pthread_cond_timedwait): Likewise.
6822         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6823         (FUTEX_CMP_REQUEUE): Define.
6824         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6825         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6826         Pass __futex value from before the unlock and __futex address instead
6827         of address of low 32-bits of __wakeup_seq to futex syscall.
6828         Fallback to FUTEX_WAKE all on any errors.
6829
6830 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6831
6832         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6833         comment typo.
6834         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6835         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6836         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6837         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6838         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6839
6840 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6841
6842         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6843         Add memory clobber to inline assembly.
6844         (__lll_mutex_trylock): Likewise.
6845         (__lll_mutex_cond_trylock): Likewise.
6846
6847 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6848
6849         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6850         Pass val argument as 6th system call argument in %r7.
6851
6852 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6853
6854         * Makefile (tests): Add tst-cond16.
6855         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6856         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6857         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6858         Add __data.__futex field, reshuffle __data.__clock.
6859         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6860         (__pthread_cond_signal): Increment __futex at the same time as
6861         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6862         address of low 32-bits of __wakeup_seq to futex syscall.
6863         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6864         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6865         releasing internal lock to FUTEX_WAIT.
6866         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6867         (__pthread_cond_timedwait): Likewise.
6868         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6869         (FUTEX_CMP_REQUEUE): Define.
6870         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6871         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6872         Pass __futex value from before the unlock and __futex address instead
6873         of address of low 32-bits of __wakeup_seq to futex syscall.
6874         Fallback to FUTEX_WAKE all on any errors.
6875         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6876         Define.
6877         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6878         internally.  Return non-zero if error, zero if success.
6879         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6880         Add __data.__futex field, reshuffle __data.__clock.
6881         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6882         Define.
6883         (lll_futex_requeue): Add val argument, return 1 unconditionally
6884         for the time being.
6885         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6886         Add __data.__futex field, reshuffle __data.__clock.
6887         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6888         Define.
6889         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6890         internally.  Return non-zero if error, zero if success.
6891         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6892         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6893         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6894         Define.
6895         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6896         internally.  Return non-zero if error, zero if success.
6897         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6898         Add __data.__futex field, reshuffle __data.__clock.
6899         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6900         Define.
6901         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6902         internally.  Return non-zero if error, zero if success.
6903         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6904         Add __data.__futex field, reshuffle __data.__clock.
6905         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6906         Add __data.__futex field, reshuffle __data.__clock.
6907         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6908         Increment __futex at the same time as __wakeup_seq or __total_seq.
6909         Pass address of __futex instead of address of low 32-bits of
6910         __wakeup_seq to futex syscall.
6911         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6912         Pass __futex value from before releasing internal lock
6913         to FUTEX_WAIT.
6914         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6915         Likewise.  Avoid unnecessary shadowing of variables.
6916         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6917         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6918         unlock and __futex address instead of address of low 32-bits of
6919         __wakeup_seq to futex_requeue macro, adjust for new return value
6920         meaning.
6921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6922         (__pthread_cond_signal): Increment __futex at the same time as
6923         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6924         address of low 32-bits of __wakeup_seq to futex syscall.
6925         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6926         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6927         releasing internal lock to FUTEX_WAIT.
6928         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6929         (__pthread_cond_timedwait): Likewise.
6930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6931         (FUTEX_CMP_REQUEUE): Define.
6932         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6933         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6934         Pass __futex value from before the unlock and __futex address instead
6935         of address of low 32-bits of __wakeup_seq to futex syscall.
6936         Fallback to FUTEX_WAKE all on any errors.
6937
6938 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6939
6940         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6941         Add nop to align the end of critical section.
6942         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6943
6944 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6945
6946         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6947         Add __broadcast_seq field.
6948         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6949         all waiters as woken with woken_seq and bump broadcast counter.
6950         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6951         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6952         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6953         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6954
6955 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6956
6957         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6958         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6959         Reported by Kaz Kojima.
6960
6961 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6962
6963         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6964
6965 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6966
6967         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6968         __broadcast_seq with bc_seq after acquiring internal lock instead of
6969         before it.
6970
6971 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6972
6973         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6974         compilation.
6975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6976         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6977         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6978         (pthread_cond_t): Add __data.__broadcast_seq field.
6979         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6980         (FRAME_SIZE): Define.
6981         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6982         Comment typo fixes.
6983         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6984         Define.
6985         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6986         typo fixes.
6987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6988         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6989         fixes.
6990
6991 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6992
6993         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6994         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6995         Add __broadcast_seq field.
6996         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6997         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6998         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6999         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7000         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7001         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7002         all waiters as woken with woken_seq and bump broadcast counter.
7003         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7005         __broadcast_seq field.
7006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7007         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7008         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7009         * pthread_cond_init.c: Initialize __broadcast_seq field.
7010         * Makefile (tests): Add tst-cond17 and tst-cond18.
7011         Add .NOTPARALLEL goal.
7012         * tst-cond16.c: New file.  From Jakub.
7013         * tst-cond17.c: New file.  From Jakub.
7014         * tst-cond18.c: New file.  From Jakub.
7015
7016 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
7017
7018         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7019         unwind info.
7020
7021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7022         Parametrize frame size.  Correct some unwind info.
7023         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7024
7025 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7026
7027         * tst-stack3.c: Note testing functionality beyond POSIX.
7028
7029 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7030
7031         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7032         Change conditional from ifdef to if.
7033
7034 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
7035
7036         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7037         SYSDEP_CANCEL_ERROR): Define.
7038         (PSEUDO): Use it.
7039
7040 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
7041
7042         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7043
7044 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
7045
7046         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7047
7048 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7049
7050         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7051         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7052         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7053         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7054
7055 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7056
7057         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7058         thread has all signals blocked.
7059
7060 2004-04-18  Andreas Jaeger  <aj@suse.de>
7061
7062         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7063         (SEM_VALUE_MAX): Add missing brace.
7064
7065 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7066
7067         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7068         in rt subdir.
7069         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7070         * sysdeps/pthread/tst-mqueue8x.c: New test.
7071         * tst-cancel4.c: Update comment about message queues.
7072
7073         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7074         return it_value { 0, 0 }.
7075         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7076         like SIGEV_SIGNAL.
7077         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7078         assertion for SIGEV_NONE.
7079         (thread_attr_compare): Compare all attributes, not just a partial
7080         subset.
7081
7082 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7083
7084         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7085
7086 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7087
7088         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7089         Just use a plain number.
7090         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7091         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7092         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7093         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7094         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7095         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7096         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7097
7098 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7099
7100         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7101         frame info.
7102         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7103
7104 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7105
7106         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7107         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7108         of calling sigwaitinfo.
7109
7110 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7111
7112         * allocatestack.c (allocate_stack): Set reported_guardsize
7113         unconditionally.
7114         * pthread_getattr_np.c (pthread_getattr_np): Use
7115         reported_guardsize instead of guardsize.
7116         * descr.h (struct pthread): Add reported_guardsize field.
7117
7118 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7119
7120         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7121
7122 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7123
7124         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7125
7126 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7127
7128         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7129         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7130         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7131         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7132         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7133         Define.
7134         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7135         (_POSIX_MESSAGE_PASSING): Define.
7136         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7137         (_POSIX_MESSAGE_PASSING): Define.
7138         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7139         (_POSIX_MESSAGE_PASSING): Define.
7140
7141 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7142
7143         * tst-context1.c (fct): Check whether correct stack is used.
7144
7145 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7146
7147         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7148         matching constraints for asm mem parameters.
7149
7150         * tst-clock2.c (tf): Don't define unless needed.
7151
7152 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7153
7154         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7155         $(gnulib).
7156
7157 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7158
7159         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7160         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7161         * pthreadP.h: Declare __nptl_deallocate_tsd.
7162         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7163         Adjust caller.
7164
7165         * Makefile (tests): Add tst-tsd5.
7166         * tst-tsd5.c: New file.
7167
7168 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7169
7170         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7171         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7172         is SHLIB_COMPAT check.
7173         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7174         (__pthread_attr_getaffinity_old): Likewise.
7175         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7176         (__pthread_getaffinity_old): Likewise.
7177         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7178         (__pthread_setaffinity_old): Likewise.
7179
7180 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7181
7182         * allocatestack.c (_make_stacks_executable): Call
7183         _dl_make_stack_executable first.
7184
7185 2004-03-24  Roland McGrath  <roland@redhat.com>
7186
7187         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7188         constraint instead of "0".
7189
7190 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7191
7192         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7193         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7194
7195         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7196         code to avoid warning.
7197
7198 2004-03-24  Andreas Jaeger  <aj@suse.de>
7199
7200         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7201         (__pthread_attr_setaffinity_old): Remove const.
7202
7203 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7204
7205         * sysdeps/unix/sysv/linux/smp.h: New file.
7206         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7207         * init.c: Define __is_smp.
7208         (__pthread_initialize_minimal_internal): Call is_smp_system to
7209         initialize __is_smp.
7210         * pthreadP.h: Declare __is_smp.
7211         Define MAX_ADAPTIVE_COUNT is necessary.
7212         * pthread_mutex_init.c: Add comment regarding __spins field.
7213         * pthread_mutex_lock.c: Implement adaptive mutex type.
7214         * pthread_mutex_timedlock.c: Likewise.
7215         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7216         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7217         Add __spins field.
7218         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7219         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7220         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7221         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7222         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7223         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7224         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7225         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7226         lll_mutex_cond_trylock.
7227         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7228         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7229         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7230         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7231         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7232         Define BUSY_WAIT_NOP.
7233         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7234         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7235
7236         * tst-mutex5.c: Add support for testing adaptive mutexes.
7237         * tst-mutex7.c: Likewise.
7238         * tst-mutex5a.c: New file.
7239         * tst-mutex7a.c: New file.
7240         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7241
7242         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7243         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7244         vgettimeofday call might destroy the content.
7245
7246         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7247         @pause in the loop.
7248
7249         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7250         No need to restrict type of ret.  Make it int.  Add comment.
7251
7252         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7253         Remove unnecessary setne instruction.
7254
7255 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7256
7257         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7258         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7259         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7260         If realloc fails, break out of the loop.
7261
7262 2004-03-20  Andreas Jaeger  <aj@suse.de>
7263
7264         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7265         (__pthread_setaffinity_old): Fix interface.
7266         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7267         (__pthread_getaffinity_old): Likewise.
7268
7269         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7270         (__pthread_setaffinity_new): Remove duplicate declaration.
7271
7272 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7273
7274         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7275         the return value to a safe register.
7276         (CDISABLE): Set the function argument correctly.
7277
7278 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7279
7280         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7282         Rewrite so that only one locked memory operation per round is needed.
7283         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7284         (pthread_barrier_wait): After wakeup, release lock only when the
7285         last thread stopped using the barrier object.
7286         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7287         (__pthread_cond_wait): Don't store mutex address if the current
7288         value is ~0l.  Add correct cleanup support and unwind info.
7289         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7290         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7291         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7292         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7293         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7294         Add correct cleanup support and unwind info.
7295         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7296         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7297         information for syscall wrappers.
7298
7299 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7300
7301         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7302         cpusetsize field, remove next.
7303         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7304         parameter for size of the CPU set.
7305         (pthread_setaffinity_np): Likewise.
7306         (pthread_attr_getaffinity_np): Likewise.
7307         (pthread_attr_setaffinity_np): Likewise.
7308         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7309         interface change, keep compatibility code.
7310         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7311         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7312         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7313         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7314         __pthread_getaffinity_np.
7315         * Versions: Add version for changed interfaces.
7316         * tst-attr3.c: Adjust test for interface change.
7317         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7318         increasing buffer sizes.
7319         * pthread_attr_destroy.c: Remove unused list handling.
7320         * pthread_attr_init.c: Likewise.
7321
7322 2004-03-17  Roland McGrath  <roland@redhat.com>
7323
7324         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7325         first argument to clock_getres so we ever enable kernel timers.
7326
7327 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7328
7329         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7330
7331 2004-03-12  Richard Henderson  <rth@redhat.com>
7332
7333         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7334         oldvalue from CENABLE to CDISABLE.
7335
7336 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7337
7338         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7339         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7340         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7341         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7342
7343 2004-03-11  Richard Henderson  <rth@redhat.com>
7344
7345         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7346         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7347         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7348
7349 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7350
7351         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7352         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7353         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7354
7355 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7356
7357         * forward.c (__pthread_cond_broadcast_2_0,
7358         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7359         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7360         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7361
7362 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7363
7364         * sysdeps/sh/tcb-offsets.sym: Add PID.
7365         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7366         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7367
7368 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7369
7370         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7371         include <sysdep-cancel.h>, vfork is no cancellation point.
7372         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7373         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7374         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7375
7376 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7377
7378         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7379         libc_hidden_def.
7380         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7381         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7382         Likewise.
7383         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7384         Likewise.
7385         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7386         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7387         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7388         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7389         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7390
7391         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7392         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7393         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7394         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7395         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7396         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7397
7398         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7399         a local register for saving old PID.  Negate PID in parent upon exit.
7400
7401         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7402         tcb-offsets.h.
7403         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7404         before syscall, set to the old value in the parent afterwards.
7405         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7406         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7407         tcb-offsets.h.
7408         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7409         before syscall, set to the old value in the parent afterwards.
7410         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7411         * sysdeps/s390/tcb-offsets.sym: Add PID.
7412
7413         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7414         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7415         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7416         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7417         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7418         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7419
7420 2004-03-10  Andreas Schwab  <schwab@suse.de>
7421
7422         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7423         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7424         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7425
7426 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7427
7428         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7429         * tst-cancel21.c (do_one_test): Likewise.
7430         Reported by Gordon Jin <gordon.jin@intel.com>.
7431
7432 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7433
7434         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7435         if non-zero and set to INT_MIN if zero.
7436         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7437         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7438         (SAVE_PID, RESTORE_PID): Define.
7439         (__vfork): Use it.
7440         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7441         Use relative path to avoid including NPTL i386/vfork.S.
7442         (SAVE_PID, RESTORE_PID): Define.
7443         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7444         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7445         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7446         tst-vfork2x.
7447         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7448         * tst-vfork1.c: New test.
7449         * tst-vfork2.c: New test.
7450         * tst-vfork1x.c: New test.
7451         * tst-vfork2x.c: New test.
7452
7453 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7454
7455         * sysdeps/i386/tcb-offsets.sym: Add PID.
7456         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7457         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7458         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7459
7460 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7461
7462         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7463
7464 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7465
7466         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7467         _rtld_global_ro.
7468
7469 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7470
7471         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7472         _rtld_global_ro.
7473
7474         * tst-once4.c: Remove unnecessary macro definition.
7475
7476         * tst-mutex7.c (do_test): Limit thread stack size.
7477         * tst-once2.c (do_test): Likewise.
7478         * tst-tls3.c (do_test): Likewise.
7479         * tst-tls1.c (do_test): Likewise.
7480         * tst-signal3.c (do_test): Likewise.
7481         * tst-kill6.c (do_test): Likewise.
7482         * tst-key4.c (do_test): Likewise.
7483         * tst-join4.c (do_test): Likewise.
7484         * tst-fork1.c (do_test): Likewise.
7485         * tst-context1.c (do_test): Likewise.
7486         * tst-cond2.c (do_test): Likewise.
7487         * tst-cond10.c (do_test): Likewise.
7488         * tst-clock2.c (do_test): Likewise.
7489         * tst-cancel10.c (do_test): Likewise.
7490         * tst-basic2.c (do_test): Likewise.
7491         * tst-barrier4.c (do_test): Likewise.
7492
7493 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7494
7495         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7496
7497 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7498
7499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7500         (__pthread_cond_timedwait): Optimize wakeup test.
7501         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7502         (__pthread_cond_wait): Likewise.
7503         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7504         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7505         Likewise.
7506
7507 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7508
7509         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7510         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7511         the atomic instruction needed.
7512         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7513         (__lll_mutex_lock_wait): Likewise.
7514
7515 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7516
7517         * Makefile (tests): Add tst-cond14 and tst-cond15.
7518         * tst-cond14.c: New file.
7519         * tst-cond15.c: New file.
7520
7521 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7522
7523         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7524         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7525         needs to be implemented differently to be useful.
7526
7527 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7528
7529         * pthread_attr_setschedparam.c: Don't test priority against limits
7530         here.  Set ATTR_FLAG_SCHED_SET flag.
7531         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7532         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7533         from parent thread to child.  If attribute is used and scheduling
7534         parameters are not inherited, copy parameters from attribute or
7535         compute them.  Check priority value.
7536         * pthread_getschedparam.c: If the parameters aren't known yet get
7537         them from the kernel.
7538         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7539         ATTR_FLAG_POLICY_SET flag for thread.
7540         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7541         and ATTR_FLAG_POLICY_SET.
7542
7543         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7544
7545         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7546         fail if stack address hasn't been set.  Just return 0.
7547
7548 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7549
7550         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7551         libpthread for the files in this list.
7552         (CFLAGS-tst-unload): Removed.
7553         * tst-unload.c (do_test): Don't use complete path for
7554         LIBPHREAD_SO.
7555
7556         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7557         tst-_res1mod2.
7558
7559 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7560
7561         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7562         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7563         operation per round is needed.
7564         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7565         (__lll_mutex_lock_wait): Likewise.
7566
7567 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7568
7569         * tst-cancel9.c (cleanup): Don't print to stderr.
7570
7571 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7572
7573         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7574
7575 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7576
7577         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7578         (__syscall_error_handler2): Call CDISABLE.
7579         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7580         (__syscall_error_handler2): Call CDISABLE.
7581
7582         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7583         Release lock before the loop, don't reacquire it.
7584
7585         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7586
7587 2004-02-19  Andreas Schwab  <schwab@suse.de>
7588
7589         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7590         Fix last change.
7591
7592 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7593
7594         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7595         (pthread_barrier_wait): After wakeup, release lock only when the
7596         last thread stopped using the barrier object.
7597         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7598         (pthread_barrier_wait): Likewise.
7599         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7600         Likewise.
7601         * Makefile (tests): Add tst-barrier4.
7602         * tst-barrier4.c: New file.
7603
7604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7605         (__pthread_cond_timedwait): Perform timeout test while holding
7606         internal lock to prevent wakeup race.
7607         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7608         * sysdeps/pthread/pthread_cond_timedwait.c
7609         (__pthread_cond_timedwait): Likewise.
7610         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7611         (__pthread_cond_timedwait): Likewise.
7612
7613 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7614
7615         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7616         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7617         * Makefile (tests): Add tst-rwlock13.
7618         * tst-rwlock13.c: New test.
7619
7620 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7621
7622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7623         (__condvar_tw_cleanup): Little optimization.
7624         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7625
7626 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7627
7628         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7629         libpthread as "lib" parameter to SHLIB_COMPAT.
7630         (__novmx_siglongjmp): Fix typo in function name.
7631         (__novmx_longjmp): Fix typo in function name.
7632
7633 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7634
7635         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7636         __builtin_expect.
7637
7638         * sysdeps/generic/pt-longjmp.c: Moved to...
7639         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7640
7641 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7642
7643         * Makefile (libpthread-routines): Add pt-cleanup.
7644         * pt-longjmp.c: Removed.
7645         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7646         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7647         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7648         Version longjmp, siglongjmp for GLIBC_2.3.4.
7649         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7650
7651 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7652
7653         * sysdeps/pthread/pthread_cond_timedwait.c
7654         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7655         Reuse code.  Add __builtin_expects.
7656
7657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7658         (__pthread_cond_timedwait): Get internal lock in case timeout has
7659         passed before the futex syscall.
7660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7661
7662 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7663
7664         * allocatestack.c: Pretty printing.
7665
7666         * sysdeps/pthread/createthread.c (create_thread): Don't add
7667         CLONE_DETACHED bit if it is not necessary.
7668
7669 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7670
7671         * pthread_getattr_np.c: Include ldsodefs.h.
7672
7673 2004-01-16  Richard Henderson  <rth@redhat.com>
7674
7675         * allocatestack.c: Don't declare __libc_stack_end.
7676         * init.c (__pthread_initialize_minimal_internal): Likewise.
7677         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7678
7679 2004-01-15  Richard Henderson  <rth@redhat.com>
7680
7681         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7682         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7683         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7684         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7685         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7686         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7687         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7688         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7689
7690 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7691
7692         * init.c (pthread_functions): Make array const.
7693
7694 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7695
7696         * allocatestack.c (__make_stacks_executable): Change interface.
7697         Check parameters.  Pass parameter on to libc counterpart.
7698         * pthreadP.h: Change declaration.
7699
7700 2004-01-13  Richard Henderson  <rth@redhat.com>
7701
7702         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7703         prototype form.
7704         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7705         Likewise.
7706
7707         * sysdeps/alpha/Makefile: New file.
7708         * sysdeps/alpha/tcb-offsets.sym: New file.
7709         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7710         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7711
7712         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7713         on powerpc version.
7714
7715 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7716
7717         * Makefile (tests): Add tst-backtrace1.
7718         * tst-backtrace1.c: New test.
7719
7720 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7721
7722         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7723         register as second parameter to the REGISTER macro.
7724         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7725         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7726         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7727         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7728         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7729         of thread register as second parameter to REGISTER macro in 64 case.
7730
7731 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7732
7733         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7734         (CFLAGS-getpid.o): Defined.
7735         (CFLAGS-getpid.os): Defined.
7736
7737 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7738
7739         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7740         returned for main thread does not overlap with any other VMA.
7741         Patch by Jakub Jelinek.
7742
7743 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7744
7745         * tst-raise1.c: Include stdio.h.
7746
7747 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7748
7749         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7750         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7751         If pid is 0, set it to selftid.
7752         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7753         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7754         != 0, return self->tid without doing a syscall.
7755         * descr.h (struct pthread): Move pid field after tid.
7756
7757         * Makefile (tests): Add tst-raise1.
7758         * tst-raise1.c: New file.
7759
7760 2003-12-23  Roland McGrath  <roland@redhat.com>
7761
7762         * tst-oddstacklimit.c: New file.
7763         * Makefile (tests): Add it.
7764         (tst-oddstacklimit-ENV): New variable.
7765
7766         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7767         value up to page size for __default_stacksize.
7768
7769 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7770
7771         * Makefile (tests): Add tst-eintr5.
7772         * tst-eintr5.c: New file.
7773
7774         * eintr.c (eintr_source): Prevent sending signal to self.
7775
7776         * tst-eintr2.c (tf1): Improve error message.
7777
7778 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7779
7780         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7781         * sysdeps/unix/sysv/linux/getpid.c: New file.
7782         * pthread_cancel.c: Add comment explaining use of PID field.
7783         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7784         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7785         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7786         temporarily to signal the field must not be relied on and updated
7787         by getpid().
7788         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7789         temporarily negative.
7790         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7791
7792 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7793
7794         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7795         (eintr_source): If ARG != NULL, use pthread_kill.
7796         * tst-eintr1.c: Adjust for this change.
7797         * tst-eintr2.c: Likewise.
7798         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7799         * tst-eintr3.c: New file.
7800         * tst-eintr4.c: New file.
7801
7802 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7803
7804         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7805         if CANCELSTATE_BITMASK is set.
7806         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7807         Likewise.
7808
7809         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7810         (tests-reverse): Add tst-cancel23.
7811         * tst-cancel22.c: New test.
7812         * tst-cancel23.c: New test.
7813
7814 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7815
7816         * tst-eintr1.c: Better error messages.
7817
7818         * Makefile (tests): Add tst-eintr2.
7819         * tst-eintr2.c: New file.
7820
7821 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7822
7823         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7824         (CFLAGS-tst-cancelx21.c): Set.
7825         * tst-cancel21.c: New test.
7826         * tst-cancelx21.c: New test.
7827
7828         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7829         comparison operand.
7830         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7831         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7832         * pt-longjmp.c: Include jmpbuf-unwind.h.
7833         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7834         _JMPBUF_UNWINDS.  Adjust compared pointers.
7835         * init.c (__pthread_initialize_minimal_internal): Initialize
7836         pd->stackblock_size.
7837         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7838         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7839         * sysdeps/i386/jmpbuf-unwind.h: New file.
7840         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7841         * sysdeps/s390/jmpbuf-unwind.h: New file.
7842         * sysdeps/sh/jmpbuf-unwind.h: New file.
7843         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7844         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7845         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7846         (_JMPBUF_CFA_UNWINDS): Remove.
7847         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7848
7849 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7850
7851         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7852         (CFLAGS-tst-cancelx20.c): Set.
7853         * tst-cancel20.c: New test.
7854         * tst-cancelx20.c: New test.
7855
7856 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7857
7858         * init.c (__pthread_initialize_minimal_internal): Don't treat
7859         architectures with separate register stack special here when
7860         computing default stack size.
7861
7862 2003-12-17  Roland McGrath  <roland@redhat.com>
7863
7864         * Makefile (tst-cancelx7-ARGS): New variable.
7865         Reportd by Greg Schafer <gschafer@zip.com.au>.
7866
7867 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7868
7869         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7870         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7871         (tst-stack3-ENV): Set.
7872         ($(objpfx)tst-stack3-mem): New.
7873         * tst-stack3.c: New test.
7874
7875 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7876
7877         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7878         Add unwind directives.  Drop unused .regstk directive.
7879         (_fini_EPILOG_BEGINS): Add unwind directives.
7880
7881 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7882
7883         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7884         Assume parameter is a pointer.
7885         (lll_futex_wake): Likewise.
7886         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7887         Likewise.
7888         (lll_futex_wake): Likewise.
7889         Reported by Boris Hu.
7890         * sysdeps/unix/sysv/linux/unregister-atfork.c
7891         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7892
7893         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7894
7895 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7896
7897         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7898         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7899         __rtld_lock_initialize for ld.so lock.
7900         Patch in part by Adam Li <adam.li@intel.com>.
7901
7902 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7903
7904         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7905         in $(gnulib).  Also, remove stale comment.
7906
7907 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7908
7909         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7910         advantage of new syscall stub and optimize accordingly.
7911
7912         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7913         from SYS_futex, to match expectations of
7914         sysdep.h:DO_INLINE_SYSCALL.
7915         (lll_futex_clobbers): Remove.
7916         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7917         (lll_futex_wake): Likewise.
7918         (lll_futex_requeue): Likewise.
7919         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7920         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7921         Jelinek).
7922         (__lll_mutex_lock): Likewise.
7923         (__lll_mutex_cond_lock): Likewise.
7924         (__lll_mutex_timed_lock): Likewise.
7925         (__lll_mutex_unlock): Likewise.
7926         (__lll_mutex_unlock_force): Likewise.
7927
7928         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7929         comes before the include of <sysdep.h>.
7930         (THREAD_SELF_SYSINFO): New macro.
7931         (THREAD_SYSINFO): Likewise.
7932         (INIT_SYSINFO): New macro.
7933         (TLS_INIT_TP): Call INIT_SYSINFO.
7934
7935         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7936
7937         * sysdeps/pthread/createthread.c (create_thread): Use
7938         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7939         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7940         THREAD_SELF_SYSINFO instead of open code.
7941         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7942         (THREAD_SYSINFO): Likewise.
7943
7944         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7945
7946         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7947
7948 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7949
7950         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7951         instead of .init.  Patch by David Mosberger.
7952
7953 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7954
7955         * sysdeps/pthread/configure.in: Remove broken declaration in C
7956         cleanup handling check.
7957
7958 2003-11-30  Andreas Jaeger  <aj@suse.de>
7959
7960         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7961         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7962         Likewise.
7963
7964 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7965
7966         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7967         * pthread_attr_destroy.c: Include shlib-compat.h.
7968         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7969         is set in iattr->flags.
7970         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7971
7972 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7973
7974         * Makefile (distribute): Add tst-cleanup4aux.c.
7975
7976         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7977         include.
7978
7979 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7980
7981         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7982         pthread_cond_signal.
7983
7984         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7985         store mutex address if the current value is ~0l.
7986         * sysdeps/pthread/pthread_cond_timedwait.c
7987         (__pthread_cond_timedwait): Likewise.
7988         * sysdeps/pthread/pthread_cond_broadcast.c
7989         (__pthread_cond_broadcast): Don't use requeue for pshared
7990         condvars.
7991
7992         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7993         (__pthread_cond_wait): Don't store mutex address if the current
7994         value is ~0l.
7995         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7996         (__pthread_cond_timedwait): Likewise.
7997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7998         (__pthread_cond_broadcast): Don't use requeue for pshared
7999         condvars.
8000
8001         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8002         element with ~0l for pshared condvars, with NULL otherwise.
8003
8004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8005         (__pthread_cond_wait): Don't store mutex address if the current
8006         value is ~0l.
8007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8008         (__pthread_cond_timedwait): Likewise.
8009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8010         (__pthread_cond_broadcast): Don't use requeue for pshared
8011         condvars.
8012
8013         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8014         * tst-cond12.c: New file.
8015         * tst-cond13.c: New file.
8016
8017 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
8018
8019         * sysdeps/pthread/configure.in: Make missing forced unwind support
8020         fatal.
8021
8022 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
8023
8024         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8025
8026 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
8027
8028         * Makefile: Add magic to clean up correctly.
8029
8030 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
8031
8032         * unwind.c (FRAME_LEFT): Define.
8033         (unwind_stop): Handle old style cleanups here.
8034         (__pthread_unwind): Handle old style cleanups only if
8035         !HAVE_FORCED_UNWIND.
8036         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8037         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8038         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8039         ($(objpfx)tst-cleanupx4): Likewise.
8040         * tst-cleanup4.c: New test.
8041         * tst-cleanup4aux.c: New.
8042         * tst-cleanupx4.c: New test.
8043
8044 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
8045
8046         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8047         lll_mutex_*lock macros to skip atomic operations on some archs.
8048
8049 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
8050
8051         * sysdeps/pthread/tst-timer.c (main): Initialize
8052         sigev2.sigev_value as well.
8053
8054 2003-10-15  Roland McGrath  <roland@redhat.com>
8055
8056         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8057         is missing.
8058         * sysdeps/pthread/configure: Regenerated.
8059
8060 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8061
8062         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8063         locking macros.  No distinction between normal and mutex locking
8064         anymore.
8065         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8066         Merge bits from lowlevelmutex.S we still need.
8067         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8068         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8069         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8070         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8071         new mutex implementation.
8072         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8073         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8074         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8075         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8076         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8077         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8078         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8079         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8080         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8081         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8082         symbol for entry point to avoid cancellation.
8083
8084 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8085
8086         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8087         changes.
8088         (SAVE_OLDTYPE_0): Fix a typo.
8089
8090 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8091
8092         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8093         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8094
8095 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8096
8097         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8098         correct offset.
8099
8100 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8101
8102         * Makefile (tests): Add tst-cancel19.
8103         * tst-cancel19.c: New test.
8104
8105 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8106
8107         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8108         restoring of the old cancellation type.
8109
8110 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8111
8112         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8113
8114 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8115
8116         * sysdeps/pthread/malloc-machine.h: New file
8117
8118 2003-09-24  Roland McGrath  <roland@redhat.com>
8119
8120         * allocatestack.c (__make_stacks_executable): Don't ignore return
8121         value from _dl_make_stack_executable.
8122
8123 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8124
8125         * allocatestack.c (__make_stacks_executable): Also change
8126         permission of the currently unused stacks.
8127
8128         * allocatestack.c (change_stack_perm): Split out from
8129         __make_stacks_executable.
8130         (allocate_stack): If the required permission changed between the time
8131         we started preparing the stack and queueing it, change the permission.
8132         (__make_stacks_executable): Call change_stack_perm.
8133
8134         * Makefile: Build tst-execstack-mod locally.
8135         * tst-execstack-mod.c: New file.
8136
8137 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8138
8139         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8140
8141 2003-09-23  Roland McGrath  <roland@redhat.com>
8142
8143         * tst-execstack.c: New file.
8144         * Makefile (tests): Add it.
8145         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8146         (LDFLAGS-tst-execstack): New variable.
8147
8148         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8149         whether to use PROT_EXEC for stack mmap.
8150         (__make_stacks_executable): New function.
8151         * pthreadP.h: Declare it.
8152         * init.c (__pthread_initialize_minimal_internal): Set
8153         GL(dl_make_stack_executable_hook) to that.
8154
8155 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8156
8157         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8158         recommendation from AMD re avoidance of lock prefix.
8159
8160 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8161
8162         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8163         lll_futex_timed_wait instead of lll_futex_wait.
8164         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8165         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8166         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8167         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8168         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8169         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8170         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8171         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8172         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8173         Completely revamp the locking macros.  No distinction between
8174         normal and mutex locking anymore.
8175         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8176         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8177         __lll_lock_timedwait): Fix prototypes.
8178         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8179         __lll_lock_timedwait): Likewise.
8180         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8181         macros, add __builtin_expect.
8182         (lll_mutex_timedlock): Likewise.  Fix return value.
8183         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8184         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8185         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8186         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8187         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8188         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8189         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8190         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8191
8192 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8193
8194         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8195         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8196         operation if possible.
8197
8198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8199         like jumping over the lock prefix.
8200
8201 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8202
8203         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8204         locking macros.  No distinction between normal and mutex locking
8205         anymore.
8206         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8207         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8208         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8209         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8210         locking.  Merge bits from lowlevelmutex.S we still need.
8211         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8212         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8213         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8214         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8215         * Makefile (routines): Remove libc-lowlevelmutex.
8216         (libpthread-rountines): Remove lowlevelmutex.
8217         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8218         for new mutex implementation.
8219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8222         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8223         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8224         Likewise.
8225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8226         Likewise.
8227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8229         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8233         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8234         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8235         Likewise.
8236         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8237         Likewise.
8238         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8239         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8241         Don't use requeue.
8242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8243         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8244
8245 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8246
8247         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8248         in parameters of asm with output parameters.
8249
8250         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8251         type of DECR parameter to int.
8252         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8253
8254 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8255
8256         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8257         guardsize for each thread.
8258
8259 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8260
8261         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8262         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8263         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8264
8265         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8266         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8267         NULL.
8268         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8269         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8270         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8271         (pthread_getaffinity_np): Add hidden_def.
8272
8273         * Makefile (tests): Add tst-attr3.
8274         * tst-attr3.c: New test.
8275
8276         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8277
8278 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8279
8280         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8281         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8282
8283 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8284
8285         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8286         * tst-align.c: Include tst-stack-align.h.
8287         (tf, do_test): Use TEST_STACK_ALIGN macro.
8288
8289 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8290
8291         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8292         variable.
8293
8294 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8295
8296         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8297         stack-related values for the initial thread.
8298
8299 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8300
8301         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8302
8303 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8304
8305         * pthread_mutex_lock.c: Minor code rearrangements.
8306
8307 2003-09-05  Roland McGrath  <roland@redhat.com>
8308
8309         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8310         Instead, include ../nptl_db/db_info.c to do its magic.
8311         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8312         (__pthread_pthread_key_2ndlevel_size): Likewise.
8313         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8314         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8315         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8316         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8317         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8318         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8319         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8320         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8321         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8322         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8323         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8324         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8325         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8326         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8327         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8328         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8329         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8330
8331 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8332
8333         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8334         of pthread_t to be compatible with LT.
8335         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8336         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8337         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8338         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8339         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8340         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8341         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8342
8343 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8344
8345         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8346
8347 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8348
8349         * unwind-forcedunwind.c: Move to...
8350         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8351         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8352         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8353         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8354         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8355         * unwind.c: Include jmpbuf-unwind.h.
8356         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8357
8358 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8359
8360         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8361         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8362         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8363         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8364         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8365         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8366         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8367         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8368         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8369         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8370         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8371         function.
8372         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8373         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8374         * Makefile (tests): Add tst-stack2.
8375         * tst-stack2.c: New test.
8376         * tst-stack1.c: Include limits.h and sys/param.h.
8377         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8378
8379         * pthread_condattr_setpshared.c: Include errno.h.
8380         (pthread_condattr_setpshared): Return EINVAL if pshared
8381         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8382
8383         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8384         defined symbol for entry point to avoid cancellation.
8385         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8386         Likewise.
8387         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8388         Likewise.
8389         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8390         Likewise.
8391         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8392         Likewise.
8393         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8394         Likewise.
8395         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8396         __close_nocancel, __read_nocancel, __write_nocancel,
8397         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8398         libpthread.so or librt.so, define to corresponding function
8399         without _nocancel suffix.
8400         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8401         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8402         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8403
8404         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8405
8406 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8407
8408         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8409         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8410
8411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8412         in subsections has a symbol associated with it.
8413
8414         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8415         defined symbol for entry point to avoid cancellation.
8416         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8417
8418 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8419
8420         * Makefile (tests): Add tst-tls5.
8421         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8422         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8423         ($(objpfx)tst-tls5): New.
8424         ($(objpfx)tst-tls6.out): Likewise.
8425         (tests): Depend on $(objpfx)tst-tls6.out.
8426         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8427         (do_test): Check pthread_self () return value alignment.
8428         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8429         (tf): Check pthread_self () return value alignment.
8430         * tst-tls5.c: New test.
8431         * tst-tls5.h: New.
8432         * tst-tls5mod.c: New.
8433         * tst-tls5moda.c: New.
8434         * tst-tls5modb.c: New.
8435         * tst-tls5modc.c: New.
8436         * tst-tls5modd.c: New.
8437         * tst-tls5mode.c: New.
8438         * tst-tls5modf.c: New.
8439         * tst-tls6.sh: New test.
8440
8441         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8442         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8443         * init.c (pthread_functions): Initialize them.
8444         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8445         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8446         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8447         pthread_cond_timedwait@@GLIBC_2.3.2.
8448
8449 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8450
8451         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8452         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8453         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8454         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8455         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8456         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8457
8458         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8459
8460         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8461         _POSIX_THREAD_PRIORITY_SCHEDULING.
8462         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8463
8464 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8465
8466         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8467         nested function, use static inline function from libio.h.
8468         Code by Richard Henderson.
8469
8470         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8471         weak.
8472
8473 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8474
8475         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8476         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8477         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8478         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8479         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8480         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8481         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8482         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8483         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8484         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8485         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8486         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8487         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8488         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8489         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8490         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8491         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8492         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8493         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8494         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8495         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8496         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8497         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8498         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8499         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8500         * sysdeps/sparc/tls.h: New file.
8501         * sysdeps/sparc/tcb-offsets.sym: New file.
8502         * sysdeps/sparc/Makefile: New file.
8503         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8504         * init.c [__sparc__] (__NR_set_tid_address): Define.
8505
8506 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8507
8508         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8509         _IO_release_lock): Define.
8510
8511 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8512
8513         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8514         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8515
8516 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8517
8518         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8519         (__pthread_cleanup_class): Add missing return types of member
8520         functions.
8521
8522 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8523
8524         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8525         (lll_mutex_unlock_force): Add memory barrier between store and futex
8526         syscall.
8527
8528 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8529
8530         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8531         tempmsg in first loop.
8532
8533 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8534
8535         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8536         _POSIX_THREAD_PRIORITY_SCHEDULING.
8537         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8538
8539 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8540
8541         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8542         (__rtld_lock_default_lock_recursive,
8543         __rtld_lock_default_unlock_recursive): Define.
8544         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8545         __rtld_lock_unlock_recursive): Define using
8546         GL(_dl_rtld_*lock_recursive).
8547         * init.c (__pthread_initialize_minimal_internal): Initialize
8548         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8549         Lock GL(_dl_load_lock) the same number of times as
8550         GL(_dl_load_lock) using non-mt implementation was nested.
8551
8552         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8553         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8554
8555 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8556
8557         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8558         PIPE_BUF.
8559
8560 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8561
8562         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8563
8564 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8565
8566         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8567         to first syscall error check.  Move syscall error check for tkill
8568         into __ASSUME_CLONE_STOPPED #ifdef.
8569
8570 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8571
8572         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8573         is not defined, do explicit synchronization.
8574         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8575         is not defined also unlock pd->lock for non-debugging case in case
8576         it is necessary.
8577         * pthread_create.c (start_thread): Always get and release pd->lock
8578         if __ASSUME_CLONE_STOPPED is not defined.
8579         (start_thread_debug): Removed.  Adjust users.
8580         * allocatestack.c (allocate_stack): Always initialize lock if
8581         __ASSUME_CLONE_STOPPED is not defined.
8582         * Makefile (tests): Add tst-sched1.
8583         * tst-sched1.c: New file.
8584
8585         * sysdeps/pthread/createthread.c (do_clone): Only use
8586         sched_setschduler and pass correct parameters.
8587
8588 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8589
8590         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8591         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8592         PTHREAD_STACK_MIN in comments.
8593
8594 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8595
8596         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8597         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8598         argument.
8599         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8600         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8601         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8602         (__pthread_cleanup_upto): Fix prototype.
8603         (_longjmp_unwind): Adjust caller.
8604         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8605         Change second argument to const struct pointer.
8606         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8607         * tst-sem9.c (main): Likewise.
8608         * unwind.c: Include string.h for strlen prototype.
8609
8610 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8611
8612         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8613         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8614         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8615         Define HAVE_CMOV.
8616         Patch by Nicholas Miell <nmiell@attbi.com>.
8617
8618 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8619
8620         * init.c (__pthread_initialize_minimal_internal): Initialize
8621         GL(dl_init_static_tls).
8622         * pthreadP.h (__pthread_init_static_tls): New prototype.
8623         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8624         New functions.
8625         * Makefile (tests): Add tst-tls4.
8626         (modules-names): Add tst-tls4moda and tst-tls4modb.
8627         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8628         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8629         tst-tls4modb.so.
8630         * tst-tls4.c: New file.
8631         * tst-tls4moda.c: New file.
8632         * tst-tls4modb.c: New file.
8633
8634 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8635
8636         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8637         before __timer_dealloc.
8638         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8639         Don't call list_unlink.
8640
8641 2003-07-29  Roland McGrath  <roland@redhat.com>
8642
8643         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8644
8645 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8646
8647         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8648         Don't reuse struct aiocb A if it failed.
8649         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8650         not just one byte, as that does not block.
8651
8652 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8653
8654         * sysdeps/pthread/unwind-resume.c: New file.
8655         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8656         unwind-resume in csu subdir.
8657         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8658         exceptions.
8659         (librt-sysdep_routines, librt-shared-only-routines): Add
8660         rt-unwind-resume.
8661         * sysdeps/pthread/rt-unwind-resume.c: New file.
8662         * unwind-forcedunwind.c: New file.
8663         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8664         (libpthread-shared-only-routines): Likewise.
8665         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8666         * pthreadP.h (pthread_cancel_init): New prototype.
8667         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8668
8669         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8670         attr argument const struct pthread_attr *.
8671
8672         * res.c (__res_state): Return __resp.
8673         * descr.h: Include resolv.h.
8674         (struct pthread): Add res field.
8675         * pthread_create.c: Include resolv.h.
8676         (start_thread): Initialize __resp.
8677         * Makefile (tests): Add tst-_res1.
8678         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8679         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8680         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8681         libpthread.
8682         * tst-_res1.c: New file.
8683         * tst-_res1mod1.c: New file.
8684         * tst-_res1mod2.c: New file.
8685
8686 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8687
8688         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8689
8690         * Makefile: Define various *-no-z-defs variables for test DSOs
8691         which has undefined symbols.
8692
8693 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8694
8695         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8696         Retry if the stwcx fails to store once_control.
8697
8698 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8699
8700         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8701         pthread_attr_setaffinity.
8702         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8703         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8704         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8705         * pthread_attr_destroy.c: Free cpuset element if allocated.
8706         * pthread_create.c: Pass iattr as additional parameter to
8707         create_thread.
8708         * sysdeps/pthread/createthread.c: If attribute is provided and
8709         a new thread is created with affinity set or scheduling parameters,
8710         start thread with CLONE_STOPPED.
8711         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8712         pthread_attr_setaffinity.
8713         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8714         cpuset element.
8715
8716 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8717
8718         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8719
8720 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8721
8722         * sysdeps/pthread/configure.in: Require CFI directives also for
8723         ppc and s390.
8724
8725 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8726
8727         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8728         Add cfi directives.
8729
8730 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8731
8732         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8733         CLEANUP_JMP_BUF.
8734         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8735         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8736         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8737         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8738         not self pointer in __writer.  Compare with TID to determine
8739         deadlocks.
8740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8741         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8742         Likewise.
8743         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8744         Likewise.
8745         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8746         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8747         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8748         macros also when compiling librt.
8749
8750 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8751
8752         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8753         -fasynchronous-unwind-tables.
8754         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8755         (PSEUDO): Add cfi directives.
8756         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8757         Likewise.
8758         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8759         Likewise.
8760
8761 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8762
8763         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8764         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8765         * unwind.c (__pthread_unwind_next): Add hidden_def.
8766         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8767         Likewise.
8768         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8769         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8770         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8771         Likewise.
8772         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8773         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8774         Likewise.
8775         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8776         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8777         __pthread_unregister_cancel and __pthread_unwind_next.
8778
8779 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8780
8781         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8782         different symbol for the cancellation syscall wrapper and
8783         non-cancellation syscall wrapper.
8784         (PSEUDO_END): Define.
8785
8786 2003-07-05  Richard Henderson  <rth@redhat.com>
8787
8788         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8789         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8790         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8791         return actual return value from the syscall, not 0.
8792
8793 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8794
8795         * descr.h (struct pthread): Add pid field.
8796         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8797         (__reclaim_stacks): Likewise.
8798         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8799         also check for PID of the signal source.
8800         (__pthread_initialize_minimal_internal): Also initialize pid field
8801         of initial thread's descriptor.
8802         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8803         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8804         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8805         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8806         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8807
8808 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8809
8810         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8811         Fix use of parameter.
8812         (__libc_cleanup_pop): Likewise.
8813
8814 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8815
8816         * init.c (sigcancel_handler): Change parameters to match handler
8817         for SA_SIGACTION.  Check signal number and code to recognize
8818         invalid invocations.
8819
8820 2003-07-03  Roland McGrath  <roland@redhat.com>
8821
8822         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8823         Apply sizeof (struct pthread) bias to r13 value.
8824
8825 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8826
8827         * sysdeps/pthread/configure.in: Require CFI directives.
8828
8829         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8830         definition.
8831         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8832         libpthread compilation.
8833         * unwind.c (__pthread_unwind): Add hidden_def.
8834         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8835
8836 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8837
8838         * libc-cancellation.c (__libc_cleanup_routine): Define.
8839         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8840         (__pthread_cleanup_pop): Define.
8841
8842 2003-07-01  Richard Henderson  <rth@redhat.com>
8843
8844         * sysdeps/alpha/elf/pt-initfini.c: New file.
8845         * sysdeps/alpha/pthread_spin_lock.S: New file.
8846         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8847         * sysdeps/alpha/pthreaddef.h: New file.
8848         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8849         * sysdeps/alpha/tls.h: New file.
8850         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8851         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8852         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8853         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8854         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8855         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8856         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8857         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8858         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8859         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8860
8861 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8862
8863         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8864         cleanup support and unwind info.
8865
8866 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8867
8868         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8869         Use correct cleanup handler registration.  Add unwind info.
8870         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8871         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8872         * tst-once3.c: Add cleanup handler and check it is called.
8873         * tst-once4.c: Likewise.
8874         * tst-oncex3.c: New file.
8875         * tst-oncex4.c: New file.
8876         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8877
8878 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8879
8880         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8881
8882 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8883
8884         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8885         (tf_msgsnd): Likewise.
8886
8887         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8888         premature returns a bit more.
8889
8890 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8891
8892         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8893         definition to the front.
8894
8895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8896         the cleanup functions to make the names unique.  Fix dwarf opcode
8897         un unwind table.
8898         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8899         functions to make the names unique.  Fix CFA offset for two blocks.
8900
8901 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8902
8903         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8904         missing closing braces.
8905         Patch by Christophe Saout <christophe@saout.de>.
8906
8907 2003-06-24  Roland McGrath  <roland@redhat.com>
8908
8909         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8910
8911 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8912
8913         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8914         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8915
8916         * pthreadP.h: Declare __find_thread_by_id.
8917         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8918         * pthread_clock_gettime.c: Allow using other thread's clock.
8919         * pthread_clock_settime.c: Likewise.
8920         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8921         * Makefile: Add rules to build and run tst-clock2.
8922         * tst-clock2.c: New file.
8923
8924 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8925
8926         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8927         to use exception-based cleanup handler.
8928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8929
8930         * tst-cond8.c (ch): Announce that we are done.
8931
8932         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8933
8934         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8935         Also test aio_suspend with timeout value.
8936
8937 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8938
8939         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8940         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8941         attribute_hidden.
8942
8943         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8944         (__pthread_mutex_lock_internal): Likewise.
8945         (__pthread_mutex_unlock_internal): Likewise.
8946         (__pthread_mutex_unlock_usercnt): Declare.
8947         * pthread_mutex_destroy.c: Always fail if used in any way.
8948         * pthread_mutex_init.c: Update comment.
8949         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8950         * pthread_mutex_timedlock.c: Adjust __nusers.
8951         * pthread_mutex_trylock.c: Adjust __nusers.
8952         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8953         and public interfaces are wrapper with pass additional parameter.
8954         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8955         parameter zero.
8956         * tst-mutex8.c: New file.
8957         * Makefile (tests): Add tst-mutex8.
8958         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8959         __pthread_mutex_unlock_usercnt.
8960         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8962         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8964         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8965         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8966         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8967         Add __nusers.
8968         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8969         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8970         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8971         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8972         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8973
8974         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8975         * pthread_mutex_timedlock.c: Likewise.
8976         * pthread_mutex_trylock.c: Adjust __nusers.
8977         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8978         * tst-mutex9.c: New file.
8979         * Makefile (tests): Add tst-mutex9.
8980         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8981         * sysdeps/ia64/tls.h: Likewise.
8982         * sysdeps/powerpc/tls.h: Likewise.
8983         * sysdeps/s390/tls.h: Likewise.
8984         * sysdeps/sh/tls.h: Likewise.
8985         * sysdeps/x86_64/tls.h: Likewise.
8986         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8987         Change type of __owner.
8988         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8989         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8990         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8991         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8992         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8993
8994 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8995
8996         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8997         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8998
8999         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9000         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
9001         instead of nr to lll_futex_wake.  Only set errno and return -1
9002         if err < 0.
9003
9004         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9005         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9006         return actual return value from the syscall, not 0.
9007
9008 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
9009
9010         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9011         find a random value.
9012         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
9013         errno==EIDRM.
9014
9015         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9016         compat_timer_settime.
9017         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9018         compat_timer_gettime.
9019         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9020         compat_timer_getoverrun.
9021         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9022         compat_timer_delete.
9023
9024         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9025         error-checking mutex detect busy mutexes.
9026
9027 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9028
9029         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9030         Add ax to clobber list.
9031         (lll_mutex_cond_lock): Likewise.
9032         (lll_mutex_unlock): Likewise.
9033         (lll_lock): Likewise.
9034         (lll_unlock): Likewise.
9035
9036         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9037         * tst-cancel18.c: New file.
9038         * tst-cancelx18.c: New file.
9039
9040         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9041         and tcdrain.
9042
9043         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9044         * tst-cancel17.c: New file.
9045         * tst-cancelx17.c: New file.
9046
9047         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9048         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9049         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9050
9051         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9052
9053 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9054
9055         * sysdeps/pthread/createthread.c (create_thread): Set
9056         header.multiple_threads unconditionally.
9057         * allocatestack.c (allocate_stack): Likewise.
9058         * descr.h (struct pthread): Add header.multiple_threads
9059         unconditionally.
9060         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9061         Define for librt.  #error if neither libpthread, libc nor librt.
9062         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9063         Likewise.
9064         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9065         CDISABLE): Likewise.
9066         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9067         CDISABLE): Likewise.
9068         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9069         CDISABLE): Likewise.
9070         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9071         CDISABLE): Likewise.  Access header.multiple_threads outside of
9072         libc and libpthread.
9073         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9074         Likewise.
9075         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9076         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9077
9078 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9079
9080         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9081         Also test early cancellation before the thread reaches the cancellation
9082         point.
9083
9084         * Makefile: Compile forward.c with exceptions.
9085
9086         * sysdeps/unix/sysv/linux/sleep.c: New file.
9087
9088 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9089
9090         * Makefile: Add CFLAGS definition to compile function wrappers
9091         duplicated from libc with exceptions.
9092         * tst-cancel4.c: Also check cancellation handlers.
9093
9094         * Makefile: Add rules to build and run tst-cancel16 and
9095         tst-cancelx16.  Add missing CFLAGS definitions.
9096         * tst-cancel16.c: New file.
9097         * tst-cancelx16.c: New file.
9098
9099 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9100
9101         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9102         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9103         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9104         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9105
9106         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9107         (LIBC_CANCEL_RESET): Likewise.
9108         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9109         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9110         librt-cancellation.
9111         (CFLAGS-libcrt-cancellation.c): Define.
9112         * sysdeps/pthread/librt-cancellation.c: New file.
9113         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9114         macros also when compiling librt.
9115         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9116         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9117         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9118         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9119         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9120         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9121         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9122
9123         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9124         compat_timer_create.
9125
9126 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9127
9128         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9129
9130         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9131         __register_atfork.
9132         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9133         Add libc_hidden_def.
9134
9135 2003-06-13  Roland McGrath  <roland@redhat.com>
9136
9137         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9138         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9139
9140 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9141
9142         * allocatestack.c (queue_stack): Always inline.
9143         * ptreadhP.h (__do_cancel): Likewise.
9144
9145 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9146
9147         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9148         a typo.
9149
9150 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9151
9152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9153         (__pthread_cond_signal): Remove incorrect second addition for
9154         cond_lock!=0.
9155
9156 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9157
9158         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9159         (__pthread_cond_signal): Use correct futex pointer in
9160         __lll_mutex_lock_wait call.
9161
9162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9163         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9164
9165 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9166
9167         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9168         cancelable.
9169         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9170         Likewise.
9171
9172         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9173         hand-written CFI generation code.  Since ENTRY/END also initiated
9174         CFI frames this caused two CFI sets to be generated.
9175
9176 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9177
9178         * cleanup_routine.c: New file.
9179         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9180         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9181         cleanup handling.
9182         * Makefile (libpthread-routines): Add cleanup_routine.
9183         Add more CFLAGS variables to compile with exceptions.  Add comments
9184         why which file needs unwind tables.
9185         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9186         tests.
9187         * tst-cancelx1.c: New file.
9188         * tst-cancelx2.c: New file.
9189         * tst-cancelx3.c: New file.
9190         * tst-cancelx4.c: New file.
9191         * tst-cancelx5.c: New file.
9192         * tst-cancelx6.c: New file.
9193         * tst-cancelx7.c: New file.
9194         * tst-cancelx8.c: New file.
9195         * tst-cancelx9.c: New file.
9196         * tst-cancelx10.c: New file.
9197         * tst-cancelx11.c: New file.
9198         * tst-cancelx12.c: New file.
9199         * tst-cancelx13.c: New file.
9200         * tst-cancelx14.c: New file.
9201         * tst-cancelx15.c: New file.
9202         * tst-cleanupx0.c: New file.
9203         * tst-cleanupx0.expect: New file.
9204         * tst-cleanupx1.c: New file.
9205         * tst-cleanupx2.c: New file.
9206         * tst-cleanupx3.c: New file.
9207
9208         * tst-cleanup0.c: Make standard compliant.
9209         * tst-cleanup1.c: Likewise.
9210
9211         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9212         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9213         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9214         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9215         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9216         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9217         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9218         CLEANUP_JMP_BUF.
9219         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9220         * tst-cancel12.c: New file.
9221         * tst-cancel13.c: New file.
9222         * tst-cancel14.c: New file.
9223         * tst-cancel15.c: New file.
9224         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9225         and tst-cancel15.
9226
9227         * tst-cancel1.c: Add some comments.
9228
9229         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9230         timeout correctly.
9231
9232 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9233
9234         * Makefile (CFLAGS-pthread_cancel.c): Define.
9235
9236 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9237
9238         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9239         Change type of __writer element to int.
9240         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9241         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9242         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9243         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9244         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9245         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9246         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9247         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9248         Compare with TID to determine deadlocks.
9249         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9250         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9251         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9252         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9255         Likewise.
9256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9257         Likewise.
9258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9259         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9260         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9261         Likewise.
9262         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9263         Likewise.
9264         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9265         * Makefile (tests): Add tst-rwlock12.
9266         * tst-rwlock12.c: New file.
9267
9268 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9269
9270         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9271         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9272         Remove bogus hidden_proto.
9273         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9274         Likewise.
9275         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9276         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9277         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9278         ___lll_mutex_timedlock): Likewise.
9279
9280 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9281
9282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9283         (__pthread_cond_signal): Add some code to eventually handle
9284         cond_lock!=0.
9285
9286 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9287
9288         * Makefile (tests): Add tst-exec4.
9289         (tst-exec4-ARGS): Define.
9290         * tst-exec4.c: New file.
9291
9292 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9293
9294         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9295         Also fail if tv_nsec < 0.
9296         (__lll_timedwait_tid): Likewise.
9297         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9298         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9299         Likewise.
9300         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9301         Likewise.
9302         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9303         Likewise.
9304         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9305         Likewise.
9306         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9307         Likewise.
9308         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9309         Likewise.
9310
9311         * Makefile (tests): Add tst-sem8 and tst-sem9.
9312         * tst-sem8.c: New file.
9313         * tst-sem9.c: New file.
9314         * sem_open.c: Fix creation of in_use record if the file exists but
9315         no internal record.
9316
9317         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9318         definitions.
9319
9320         * sysdeps/pthread/timer_create.c (timer_create): In case
9321         evp==NULL, assign timer ID to sival_ptr.
9322
9323         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9324         struct pthread_unwind_buf *.
9325         (struct pthread): Likewise for cleanup_jmp_buf element.
9326
9327         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9328         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9329         * unwind.c (__pthread_unwind_next): Likewise.
9330
9331 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9332
9333         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9334         (lll_futex_timed_wait): Use int for futex value parameter.
9335         (lll_futex_wake): Likewise.
9336         (lll_futex_requeue): Likewise.
9337
9338         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9339         Replace one memory operation with one register operation.
9340
9341         * tst-join4.c (do_test): Fix error message.
9342
9343         * tst-rwlock6.c (do_test): Use correct format specifier.
9344
9345         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9346         (__lll_mutex_lock_wait): Replace one memory operation with one
9347         register operation.
9348         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9349         (__lll_mutex_lock_wait): Likewise.
9350
9351         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9352         (__lll_mutex_cond_lock): Add one to value parameter of
9353         __lll_lock_wait to reflect reality in the futex syscall.
9354         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9355         (lll_mutex_cond_lock): Likewise.
9356
9357 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9358
9359         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9360         New function.
9361         (lll_mutex_cond_lock): Define.
9362
9363 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9364
9365         * Makefile (tests): Add tst-signal6.
9366         * tst-signal6.c: New file.
9367
9368         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9369         (__lll_mutex_unlock_force): New function
9370         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9371
9372         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9373         (__lll_mutex_unlock_force): New function.
9374         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9375
9376         * tst-rwlock7.c (do_test): Use correct format specifier.
9377
9378         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9379         Find break parameter in correct asm argument.
9380
9381 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9382
9383         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9384         Remove out4.
9385         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9386         error occured.
9387         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9388         Add __mutex.
9389         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9390         lll_futex_requeue, lll_mutex_unlock_force): Define.
9391
9392 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9393
9394         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9395         (pthread_cond_t): Add __mutex.
9396         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9397         lll_futex_requeue, lll_mutex_unlock_force): Define.
9398
9399 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9400
9401         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9402         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9403         Add __mutex field.
9404         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9405         Define.
9406         (lll_futex_wait, lll_futex_wake): Define.
9407         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9408         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9409         FUTEX_REQUEUE instead of FUTEX_WAIT.
9410         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9411         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9412         mutex which was used in condvar structure.  Call
9413         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9414         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9415
9416         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9417         include tcb-offsets.h.  Read wakeup value in locked region.
9418         Use the value of gbr register as THREAD_ID.
9419         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9421         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9422
9423         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9424         macros.
9425
9426 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9427
9428         * sysdeps/pthread/pthread_cond_broadcast.c
9429         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9430
9431 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9432
9433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9434         typo in register name.
9435         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9436         correctly.  Actually use requeue.  Little optimization.
9437         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9438         mutex address early.  Handle cancellation state as 32-bit value.
9439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9440         Remove unnecessary label.
9441
9442 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9443
9444         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9445         instead of FUTEX_WAIT.
9446         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9451         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9452         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9453         of __pthread_mutex_lock_internal.
9454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9456         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9457         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9458         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9460         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9461         Add pthread_mutex_cond_lock.
9462         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9463         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9464         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9465         lll_mutex_cond_lock.
9466         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9467         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9468         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9469         Add __mutex field.
9470         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9471         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9472
9473         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9474         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9475
9476         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9477         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9478         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9479         macro don't define aliases.
9480
9481         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9482         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9483         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9484         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9487         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9489         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9490
9491 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9492
9493         * sem_open.c: Fix one endless loop.  Implement correct semantics
9494         wrt opening the same semaphore more then once.
9495         * sem_close.c: Adjust for sem_open change.
9496         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9497         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9498         * Makefile (tests): Add tst-sem7.
9499         * tst-sem7.c: New file.
9500
9501 2003-05-16  Roland McGrath  <roland@redhat.com>
9502
9503         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9504         uninitialized variable braino.
9505
9506 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9507
9508         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9509         test for syscall availability.
9510
9511         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9512         __no_posix_timers to -1 if the syscalls don't exist.
9513
9514         * pthread_join.c (pthread_join): Set tid field of the joined
9515         thread to -1.  This isn't necessary but helps to recognize some
9516         error conditions with almost no cost.
9517
9518         * allocatestack.c (FREE_P): Also negative values indicate an
9519         unused stack.
9520
9521         * unwind.c: Include <unistd.h>.
9522
9523 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9524
9525         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9526
9527 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9528
9529         * Makefile (crti-objs, crtn-objs): New variables.
9530         (omit-deps, extra-objs): Add crtn.
9531         ($(objpfx)libpthread.so): Depend on both crti and crtn
9532         and links to them in multidir.
9533         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9534
9535 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9536
9537         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9538         (lll_mutex_unlock): Use atomic_exchange_rel.
9539
9540 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9541
9542         * cond-perf.c (cons): Add missing locking around setting of alldone.
9543
9544 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9545
9546         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9547         related macros.
9548         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9549
9550 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9551
9552         * tst-sem6.c: New file.
9553         * Makefile (tests): Add tst-sem6.
9554
9555         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9556         Use atomic_exchange_rel instead of atomic_exchange.
9557         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9558         Likewise.
9559
9560         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9561         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9562         vsyscall is possible.
9563
9564         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9565         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9566         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9567         pthread_setaffinity_np.
9568         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9569         and pthread_setaffinity_np.
9570         * Makefile (libpthread-routines): Add pthread_getaffinity and
9571         pthread_setaffinity.
9572
9573         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9574         use it in case mmap to allocate the stack fails.
9575         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9576         ARCH_MAP_FLAGS here.
9577         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9578         ARCH_RETRY_MMAP.
9579
9580 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9581
9582         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9583         handler implementation.  It is now lockless in fork().
9584         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9585         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9586         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9587         declare the __fork_*_lists.
9588         (struct fork_handler): Include pointers to all three functions.
9589         Add next, refcntr and need_signal elements.
9590         (__fork_handlers): New declaration.
9591         (__register_atfork_malloc): Remove declaration.
9592         (HAVE_register_atfork_malloc): Remove definition.
9593         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9594         __pthread_child_handler variable.
9595         (__libc_pthread_init): Use __register_atfork instead of explicitly
9596         adding to the list.
9597         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9598         and lll_futex_wake.
9599         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9600
9601         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9602         function must never be reached.
9603
9604         * cond-perf.c: New file.
9605
9606 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9607
9608         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9609
9610 2003-05-04  Roland McGrath  <roland@redhat.com>
9611
9612         * Makefile ($(objpfx)../libc.so): New target.
9613
9614 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9615
9616         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9617         (pthread_condattr_t): Size is only an int, don't use long for
9618         alignment.
9619         (pthread_mutexattr_t): Likewise.
9620         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9621         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9622         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9623
9624 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9625
9626         * sysdeps/i386/tls.h: Define THREAD_ID.
9627         * sysdeps/ia64/tls.h: Likewise.
9628         * sysdeps/powerpc/tls.h: Likewise.
9629         * sysdeps/s390/tls.h: Likewise.
9630         * sysdeps/sh/tls.h: Likewise.
9631         * sysdeps/x86_64/tls.h: Likewise.
9632         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9633         record ownership.
9634         * pthread_mutex_timedlock.c: Likewise.
9635         * pthread_mutex_trylock.c: Likewise.
9636         * pthread_mutex_unlock.c: Likewise.
9637         * pthread_rwlock_trywrlock.c: Likewise.
9638         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9639         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9640         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9641         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9642
9643         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9644         flag.
9645
9646 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9647
9648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9649         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9650         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9651         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9652         Make __align long long instead of long.
9653         (pthread_rwlock_t): Formatting.
9654         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9655         (pthread_rwlock_t): Formatting.
9656         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9657         (pthread_cond_t): Make __align long long instead of long.
9658         (pthread_rwlock_t): Move __flags field to the same position as in
9659         linuxthreads.
9660
9661 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9662
9663         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9664         * tst-rwlock7.c (do_test): Likewise.
9665
9666 2003-04-26  Roland McGrath  <roland@redhat.com>
9667
9668         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9669
9670 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9671
9672         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9673         sizeof (struct pthread).
9674         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9675         1 struct pthread.
9676         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9677         to 0.
9678         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9679         struct pthread.
9680         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9681         to 32-bit bytes.
9682         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9683         tcbp.
9684         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9685         unneccessarily.
9686         (NO_TLS_OFFSET): Define.
9687         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9688         add TLS_TCB_SIZE unnecessarily.
9689
9690 2003-04-22  Roland McGrath  <roland@redhat.com>
9691
9692         * Makeconfig (shared-thread-library): Reverse link order to work
9693         around linker bug.
9694
9695 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9696
9697         * semaphore.h: Fix typo in comment.
9698
9699 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9700
9701         * sysdeps/pthread/sigfillset.c: New file.
9702
9703         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9704         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9705         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9706         * sysdeps/pthread/sigaction.c: Likewise.
9707         * sysdeps/pthread/sigprocmask.c: New file.
9708         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9709         __SIGRTMIN+1.
9710         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9711         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9712         in this case.
9713
9714 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9715
9716         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9717         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9718
9719         * sysdeps/unix/sysv/linux/unregister-atfork.c
9720         (__unregister_atfork): Don't free memory not allocated dynamically.
9721
9722         * semaphore.h: Remove __THROW marker from cancellation points.
9723         * nptl/sysdeps/pthread/pthread.h: Likewise.
9724
9725 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9726
9727         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9728         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9729         __THROW.
9730
9731 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9732
9733         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9734
9735 2003-04-15  Roland McGrath  <roland@redhat.com>
9736
9737         * forward.c (__pthread_unwind): Tweak to avoid warning.
9738
9739 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9740
9741         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9742
9743 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9744
9745         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9746         overflow CFA advance instructions.
9747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9748
9749 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9750
9751         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9752         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9753         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9754         defined.
9755
9756         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9757         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9758         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9759         DW_CFA_advance_loc for .Laddl-.Lsubl.
9760
9761 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9762
9763         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9764         position-independent unwind data for static libraries.
9765         Add missing unwind info.  Add comments.
9766
9767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9769         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9771
9772 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9773
9774         * Makefile: Make sure all cancellation points are compiled with
9775         exception and asynchronous unwind tables.
9776
9777         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9778         which mishandles loading of global object addresses in PIC.
9779         (THREAD_SETMEM_NC): Likewise.
9780
9781 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9782
9783         * pthread.h: Define new data structure for cleanup buffer.  Declare
9784         new cleanup handler interfaces.
9785         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9786         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9787         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9788         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9789         it.  Declare old cleanup handler installation functions.
9790         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9791         handling.
9792         * cleanup_defer.c: Likewise.
9793         * cleanup_compat.c: New file.  Old cleanup code.
9794         * cleanup_def_compat.c: New file.  Old cleanup code.
9795         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9796         if own thread descriptor.
9797         * unwind.c: New file.
9798         * forward.c: Add __pthread_unwind.
9799         * init.c (pthread_functions): Add __pthread_unwind.
9800         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9801         Add ptr___pthread_unwind.
9802         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9803         and unwind function.
9804         * Makefile (libpthread-routines): Add cleanup_compat,
9805         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9806         table generation if necessary.
9807         * version.c: Record whether unwind support is compiled in.
9808         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9809         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9810         handler interfaces.
9811         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9812         complication to generate unwind information for syscall wrappers.
9813         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9814         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9815         __cleanup_fct_attribute.
9816
9817         * Makefile: Add rules to build and run tst-cleanup0.
9818         * tst-cleanup0.c: New file.
9819         * tst-cleanup0.expect: New file.
9820
9821         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9822         caller.  Optimize to avoid often unecessary local variable.
9823
9824 2003-04-11  Roland McGrath  <roland@redhat.com>
9825
9826         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9827         sets variable `multidir'; include that.
9828         (generated): Add it.
9829         ($(objpfx)$(multidir)/crti.o): New target.
9830         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9831
9832 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9833
9834         * tst-attr2.c (do_test): Add cast to avoid warning.
9835         * tst-mutex4.c (do_test): Likewise.
9836
9837 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9838
9839         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9840         in child.
9841
9842 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9843
9844         * Makefile (tests): Add tst-detach1.
9845         * tst-detach1.c: New file.
9846
9847 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9848
9849         * sysdeps/pthread/pthread.h: Remove duplicate
9850         pthread_cleanup_{push,pop} definitions.
9851
9852         * tst-barrier2.c: Eliminate warnings.
9853         * tst-cancel4.c: Likewise.
9854         * tst-cond4.c: Likewise.
9855         * tst-cond6.c: Likewise.
9856         * tst-detach1.c: Likewise.
9857         * tst-rwlock4.c: Likewise.
9858         * tst-rwlock6.c: Likewise.
9859         * tst-rwlock7.c: Likewise.
9860         * tst-sem3.c: Likewise.
9861         * tst-spin2.c: Likewise.
9862         * tst-umask1.c: Likewise.
9863
9864 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9865
9866         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9867
9868 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9869
9870         * descr.h (struct pthread): Move cancelhandling member to the front.
9871
9872 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9873
9874         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9875         malloc_parent, and malloc_child statically.
9876         (__register_atfork_malloc): New function.
9877         (free_mem): Don't free any of the malloc_* variables on the list.
9878         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9879         Define HAVE_register_atfork_malloc.
9880
9881 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9882
9883         * sysdeps/pthread/createthread.c (create_thread): Add some more
9884         comments explaining when to set multiple_threads and when not.
9885
9886         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9887         THREAD_ATOMIC_BIT_SET if not already defined.
9888         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9889         THREAD_ATOMIC_BIT_SET:
9890         * sysdeps/x86_64/tls.h: Likewise.
9891         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9892         THREAD_ATOMIC_CMPXCHG_VAL.
9893         (_pthread_cleanup_pop_restore): Likewise.
9894         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9895         (__pthread_enable_asynccancel_2): Likewise.
9896         (__pthread_disable_asynccancel): Likewise.
9897         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9898         (__libc_disable_asynccancel): Likewise.
9899         * init.c (sigcancel_handler): Likewise.
9900         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9901         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9902
9903 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9904
9905         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9906         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9907         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9908         * Makefile (tests): Add tst-cancel11.
9909         * tst-cancel11.c: New file.
9910
9911 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9912
9913         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9914         round, not the first.  Use specific_used flag instead of local
9915         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9916         (__free_tcb): Don't call deallocate_tsd here.
9917         (start_thread): Call deallocate_tsd here.
9918         * pthread_setspecific.c: Set specific_used flag really only when
9919         needed.
9920         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9921         * tst-tsd3.c: New file.
9922         * tst-tsd4.c: New file.
9923
9924 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9925
9926         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9927         Use atomic_exchange_and_add instead of __lll_add.
9928         (__lll_mutex_timedlock): Likewise.
9929         Patch by Ian Wienand.
9930
9931 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9932
9933         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9934         (SINGLE_THREAD_P): Fix typo.
9935         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9936
9937 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9938
9939         * Makefile (tests): Add tst-align.
9940         * tst-align.c: New file.
9941         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9942
9943         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9944         function correctly.
9945
9946         * tst-tsd2.c: Add casts to avoid warnings.
9947
9948 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9949
9950         * descr.h (struct pthread): Move most often used elements to the front.
9951
9952 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9953
9954         * Makefile (libpthread-routines): Add pthread_atfork.
9955         (libpthread-static-only-routines): Add pthread_atfork.
9956
9957 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9958
9959         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9960         of TLS_DTV_AT_TP.
9961         (INSTALL_DTV): Add parens.
9962         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9963         Use passed descr instead of THREAD_SELF.
9964         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9965         (__lll_mutex_timedlock_wait): Correct expected value after
9966         spurious wakeup.
9967         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9968         Release lock before waking up the waiters.
9969         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9970         criteria.  Reorderstruct passed to cleanup handler.  Fix
9971         handling of cancellation and failung pthread_mutex_unlock call.
9972         Use __pthread_enable_asynccancel_2 instead of
9973         __pthread_enable_asynccancel.
9974         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9975         Return result of lock re-get if it fails.
9976         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9977         for __pthread_cleanup_push.
9978         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9979         completely broken rwlock implementation.
9980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9981         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9983         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9985         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9986         versioned_symbol macro.
9987         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9988         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9989
9990 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9991
9992         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9993         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9994         and __helper_tid.
9995         (struct timer): Remove th and bar field.
9996         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9997         debugging code.  Create only one helper thread.
9998         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9999         helper thread.
10000         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10001         Renamed.  Define statically.  Use thread info from siginfo.
10002         (__helper_once): New variable.
10003         (__helper_tid): New variable.
10004         (__reset_helper_control): New function.
10005         (__start_helper_thread): New function.
10006
10007         * pthread_create.c (start_thread): Don't use setjmp inside
10008         __builtin_expect to work around gcc bug.
10009
10010         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10011         timer_delete syscall fails, but not with ENOSYS, set
10012         __no_posix_timers.
10013
10014         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10015         (timer_settime): Fix typo.
10016         * sysdeps/unix/sysv/linux/timer_getoverr.c
10017         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10018
10019 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
10020
10021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10022         offset of cleanupbuf.__prev.
10023
10024 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
10025
10026         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10027         of included file.
10028
10029 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
10030
10031         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10032         NULL provide default definition to syscall.
10033
10034 2003-03-25  Roland McGrath  <roland@redhat.com>
10035
10036         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10037         (timer_id2ptr): Fix typo.
10038
10039 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
10040
10041         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10042         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10043         * sysdeps/ia64/pthreaddef.h: Likewise.
10044         * sysdeps/powerpc/pthreaddef.h: Likewise.
10045         * sysdeps/s390/pthreaddef.h: Likewise.
10046         * sysdeps/sh/pthreaddef.h: Likewise.
10047         * sysdeps/x86_64/pthreaddef.h: Likewise.
10048         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10049         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10050         being changed.
10051         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10052         SIGTIMER is not unblocked.
10053         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10054         RT signal taken.
10055         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10056         be send.
10057         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10058         pass pointer through as ID.
10059         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10060         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10061         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10062         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10063         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10064         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10065         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10066         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10067         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10068         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10069         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10070         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10071         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10072         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10073         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10074         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10075         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10076         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10077         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10078         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10079         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10080         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10081         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10082         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10083         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10084         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10085         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10086         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10087         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10088         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10089         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10090         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10091         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10092
10093         * pthreadP.h: Remove FRAME_LEFT definition.
10094         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10095         already left frame.  Programs which have this problem are not POSIX
10096         compliant.
10097         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10098
10099 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10100
10101         * sysdeps/pthread/tst-timer.c: Check return values of the
10102         functions we test.
10103
10104 2003-03-23  Roland McGrath  <roland@redhat.com>
10105
10106         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10107         * tst-tls3mod.c: Likewise.
10108         * tst-tls1.c: Likewise.
10109         * tst-tls2.c: Likewise.
10110
10111         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10112         undefined behavior.
10113
10114         * tst-join5.c (tf1, tf2): Add a cast.
10115
10116         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10117
10118         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10119         Don't test anything.
10120         * tst-cond4.c: Likewise.
10121         * tst-cond6.c: Likewise.
10122         * tst-flock2.c: Likewise.
10123         * tst-mutex4.c: Likewise.
10124         * tst-rwlock4.c: Likewise.
10125         * tst-signal1.c: Likewise.
10126         * tst-spin2.c: Likewise.
10127         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10128
10129         * tst-mutex4.c: Use test-skeleton.c.
10130         * tst-spin2.c: Likewise.
10131         * tst-sysconf.c: Likewise.
10132         * tst-barrier2.c: Likewise.
10133         * tst-cond4.c: Likewise.
10134         * tst-cond6.c: Likewise.
10135         * tst-rwlock4.c: Likewise.
10136         * tst-unload.c: Likewise.
10137         * tst-flock2.c (do_test): Use return instead of exit.
10138
10139 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10140
10141         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10142
10143 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10144
10145         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10146         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10147         instead of __lll_compare_and_swap.
10148         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10149         Likewise.
10150         Removed definition if __lll_compare_and_swap.
10151
10152         * cancellation.c: Adjust for new form of compare&exchange macros.
10153         * cleanup_defer.c: Likewise.
10154         * init.c: Likewise.
10155         * libc-cancellation.c: Likewise.
10156         * old_pthread_cond_broadcast.c: Likewise.
10157         * old_pthread_cond_signal.c: Likewise.
10158         * old_pthread_cond_timedwait.c: Likewise.
10159         * old_pthread_cond_wait.c: Likewise.
10160         * pthread_cancel.c: Likewise.
10161         * pthread_create.c: Likewise.
10162         * pthread_detach.c: Likewise.
10163         * pthread_join.c: Likewise.
10164         * pthread_key_delete.c: Likewise.
10165         * pthread_setcancelstate.c: Likewise.
10166         * pthread_setcanceltype.c: Likewise.
10167         * pthread_timedjoin.c: Likewise.
10168         * pthread_tryjoin.c: Likewise.
10169         * sysdeps/pthread/createthread.c: Likewise.
10170
10171 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10172
10173         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10174         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10175         definitions.  Replace uses with calls to atomic_* functions.
10176         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10177         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10178         __lll_test_and_set calls with atomic_exchange_and_add and
10179         atomic_exchange calls respectively.
10180         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10181         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10182         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10183         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10184         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10185         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10186         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10187
10188         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10189         returns the old value.
10190
10191 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10192
10193         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10194         int for variable OLDVAL and correct inline assembler contraint.
10195         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10196         type int for variable OLD.
10197
10198         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10199         only for s390-32.
10200         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10201         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10202         instead of multiple_threads field in the TCB.
10203
10204 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10205
10206         * sysdeps/i386/i686/bits/atomic.h: Removed.
10207         * sysdeps/i386/i586/bits/atomic.h: Removed.
10208         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10209         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10210         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10211         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10212         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10213         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10214         * atomic.h: Removed.  Moved to glibc.
10215
10216         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10217         support for clock selection.
10218
10219         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10220         signalling waiters.
10221
10222 2003-03-18  Roland McGrath  <roland@redhat.com>
10223
10224         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10225         Add __lll_rel_instr first.  Add memory clobber.
10226         (lll_mutex_unlock): Use __lll_test_and_set.
10227         From Paul Mackerras <paulus@samba.org>.
10228
10229         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10230         unconditionally.
10231         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10232         (SINGLE_THREAD_P):  Add `header.' prefix.
10233         From Paul Mackerras <paulus@samba.org>.
10234
10235         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10236         pthread_timedjoin_np to ...
10237         (libpthread: GLIBC_2.3.3): ... here.
10238         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10239
10240         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10241         Avoid shadowing VAL variable.
10242
10243         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10244         New macro.
10245
10246 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10247
10248         * Makefile (tests): Add tst-cond11.
10249         * tst-cond11.c: New file.
10250
10251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10252         struct passed to cleanup handler to eliminate one more
10253         instruction.
10254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10255
10256         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10257         (pthrad_cond_t): Replace __unused field with __clock.
10258
10259         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10260         waken all waiters in cleanup handler.
10261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10263
10264         * pthread_condattr_getclock.c: New file.
10265         * pthread_condattr_setclock.c: New file.
10266         * sysdeps/pthread/pthread.h: Declare these new functions.
10267         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10268         * Makefile (libpthread-routines): Add the new functions.
10269         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10270         Renamed field to value.  Document use of the bits.
10271         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10272         change.
10273         * pthread_condattr_setpshared.c: Likewise.
10274         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10275         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10276         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10277         Add __clock field.
10278         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10279         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10280         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10281         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10283         Implement clock selection.
10284         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10285         * pthread-errnos.sym: Add ENOSYS.
10286         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10287         _POSIX_CLOCK_SELECTION.
10288         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10289
10290         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10291         invalid .size directive.
10292
10293 2003-03-17  Roland McGrath  <roland@redhat.com>
10294
10295         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10296         Formatting tweaks.
10297
10298 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10299
10300         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10301         Use __lll_add instead of spelling it out.  Use protected symbol names.
10302         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10303         Use __lll_add.
10304         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10305         Renamed from lll_compare_and_swap.  Use new name where necessary.
10306         (__lll_add): Defined.
10307         (__lll_dec_if_positive): Defined.
10308         (__lll_test_and_set): Defined.
10309         * sysdeps/ia64/pthread_spin_init.c: Removed.
10310         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10311         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10312         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10313         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10314         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10315         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10316         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10317         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10318         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10319         __sync_lock_release_si.
10320         Patch by Jakub Jelinek.
10321
10322         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10323         Fix timeout handling.
10324         (__lll_timedwait_tid): Likewise.
10325         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10326         Patch by Jakub Jelinek.
10327
10328         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10329
10330 2003-03-17  Roland McGrath  <roland@redhat.com>
10331
10332         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10333         * sysdeps/pthread/pthread_spin_init.c: New file.
10334         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10335         * sysdeps/powerpc/Makefile: New file.
10336         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10337         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10338         * sysdeps/powerpc/pthreaddef.h: New file.
10339         * sysdeps/powerpc/tcb-offsets.sym: New file.
10340         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10341         * sysdeps/powerpc/tls.h: New file.
10342         * sysdeps/powerpc/bits/atomic.h: New file.
10343         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10344         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10345         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10346
10347         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10348         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10349         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10350         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10351         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10352         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10353         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10354         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10355         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10356         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10357         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10358         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10359         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10360         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10361         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10362
10363         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10364         not gettimeofday.
10365         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10366         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10367         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10368         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10369         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10370
10371 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10372
10373         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10374         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10377         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10378
10379 2003-03-16  Roland McGrath  <roland@redhat.com>
10380
10381         * tst-fork4.c: Include <string.h>.
10382         * tst-signal2.c: Likewise.
10383         * tst-mutex5.c (do_test): exit -> return.
10384         * tst-mutex2.c: Include <stdlib.h>.
10385
10386 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10387
10388         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10389         (__lll_mutex_timedlock_wait): Correct expected value after
10390         spurious wakeup.  Otherwise we would never wait again.
10391
10392         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10393         zone versus inline asm stupidity.  Use correct instructions.
10394
10395         * tst-rwlock6.c: Add some more status output.
10396
10397 2003-03-15  Roland McGrath  <roland@redhat.com>
10398
10399         * sysdeps/pthread/configure.in: New file.
10400         * sysdeps/pthread/configure: New file (generated).
10401
10402 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10403
10404         * allocatestack.c (allocate_stack): Store the exact stack size of
10405         user allocated stacks.
10406
10407 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10408
10409         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10410         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10411         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10412         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10413         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10414         Use `header.' prefix.
10415         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10416
10417 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10418
10419         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10420         __builtin_frame_address, use stack pointer.
10421
10422         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10423         instead of __builtin_frame_pointer.
10424
10425 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10426
10427         * tst-basic1.c (do_test): Add cast to avoid warning.
10428         * tst-basic2.c (do_test): Likewise.
10429
10430         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10431         amount of stack correction.
10432
10433         * tst-fork4.c: Use test-skeleton.c.
10434
10435 2003-03-14  Roland McGrath  <roland@redhat.com>
10436
10437         * init.c: Fix typo "#eli" for "#else".
10438
10439 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10440
10441         * allocatestack.c (__stack_user): Use hidden_data_def.
10442         * pthread_create.c (__pthread_keys): Likewise.
10443
10444         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10445
10446 2003-03-14  Roland McGrath  <roland@redhat.com>
10447
10448         * tst-fork4.c: New file.
10449         * Makefile (tests): Add it.
10450
10451         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10452         we always define the padding space.
10453         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10454         stopped supporting its own extensions fully.
10455         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10456         struct also called `header', so `header.multiple_threads' is the field
10457         name to use on all machines.
10458         * allocatestack.c (allocate_stack): Use `header.' prefix.
10459         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10460         * pthread_create.c (__pthread_create_2_1): Likewise.
10461         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10462         (THREAD_SELF): Likewise.
10463         * sysdeps/x86_64/tls.h: Likewise.
10464         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10465         (SINGLE_THREAD_P): Likewise.
10466         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10467         (SINGLE_THREAD_P): Likewise.
10468         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10469         (SINGLE_THREAD_P): Likewise.
10470
10471         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10472         value directly.
10473
10474 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10475
10476         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10477         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10478
10479         * pthread_create.c (start_thread): setjmp is expected to return 0.
10480
10481         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10482         (THREAD_GETMEM_NC): Likewise.
10483
10484 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10485
10486         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10487         and the size of the stack which must be allocated is a multiple,
10488         allocate one more page.
10489         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10490         MULTI_PAGE_ALIASING.
10491
10492 2003-03-13  Roland McGrath  <roland@redhat.com>
10493
10494         * pthread_create.c (start_thread): Set EXITING_BIT after the
10495         event-reporting (and destructors), not before.
10496
10497 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10498
10499         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10500         lll_futex_wake): Declare register variables as long int instead of
10501         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10502         Make syscall arguments clobbered by the syscall.
10503         (lll_futex_wait): Define using lll_futex_timed_wait.
10504
10505         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10506         to void *.
10507
10508         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10509         PPID if [! NDEBUG].
10510
10511         * allocatestack.c (nptl_ncreated): Only declare if
10512         COLORING_INCREMENT != 0.
10513
10514         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10515         (__libc_enable_asynccancel_2): Remove prototype.
10516
10517         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10518         ctid to match kernel.
10519
10520 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10521
10522         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10523         libc_multiple_threads.
10524         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10525         __libc_multiple_threads to...
10526         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10527
10528         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10529         versioning.
10530         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10531         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10532
10533         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10534         (__pthread_once_internal): Define.
10535
10536         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10537         macros instead of .symver directly.
10538         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10539         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10540
10541         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10542         * sysdeps/x86_64/tcb-offsets.sym: New file.
10543         * sysdeps/x86_64/Makefile: New file.
10544
10545         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10546         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10547         to access own pthread_t in TCB.
10548         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10549         Likewise.
10550         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10551         Likewise.
10552         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10553
10554 2003-03-12  Roland McGrath  <roland@redhat.com>
10555
10556         * pthread-errnos.sym: New file.
10557         * Makefile (gen-as-const-headers): New variable, list that file.
10558         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10559         header <pthread-errnos.h> instead of defining errno values here.
10560         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10561         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10562         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10563         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10564         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10565         Likewise.
10566         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10567         Likewise.
10568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10570         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10571         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10572         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10573         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10574         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10575         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10577         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10578         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10579         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10580         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10581         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10582         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10583         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10584         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10585         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10586         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10587         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10588         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10589         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10590         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10591         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10592         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10593         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10594         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10595
10596         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10597         CLONE_CHILD_SETTID worked.
10598
10599 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10600
10601         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10602         file.
10603         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10604         file.
10605
10606         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10607         (pthread_cond_t): Add padding.
10608
10609         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10610         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10611         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10612
10613         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10614         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10615         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10616         (__pthread_rwlock_timedrdlock): Likewise.
10617         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10618         (__pthread_rwlock_wrlock): Likewise.
10619         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10620         (__pthread_rwlock_rdlock): Likewise.
10621
10622         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10623
10624         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10625         result of lock re-get if it fails.
10626
10627 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10628
10629         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10631         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10634         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10635         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10636         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10637         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10638         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10639
10640         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10641         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10642
10643         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10644         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10645         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10646         (create_thread): Likewise.
10647         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10648         * init.c (__pthread_initialize_minimal_internal): Initialize
10649         __libc_multiple_threads_ptr if necessary.
10650         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10651         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10652         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10653         __libc_multiple_threads.
10654         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10655         necessary.
10656
10657         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10658         (THREAD_SETMEM_NC): Likewise.
10659
10660         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10661         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10662         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10663         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10664
10665         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10666         Eliminate one entire instruction.
10667
10668         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10669         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10671         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10672         instead of __pthread_enable_asynccancel.
10673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10674         (__pthread_cond_wait): Likewise.
10675         * sysdeps/pthread/pthread_cond_timedwait.c
10676         (__pthread_cond_timedwait): Likewise.
10677         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10678
10679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10680         (__condvar_cleanup): Wake up all waiters in case we got signaled
10681         after being woken up but before disabling asynchronous
10682         cancellation.
10683         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10685         (__condvar_cleanup): Likewise.
10686
10687         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10688         Make it an error if architecture has no #if case.  Add x86-64.
10689
10690         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10691         pt-initfini.s generation.
10692
10693         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10694         (TLS_INIT_TP): Fix typo.
10695
10696 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10697
10698         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10699         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10700
10701         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10702         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10703         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10704         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10705         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10706         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10707         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10708         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10709
10710 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10711
10712         * sysdeps/pthread/pthread_cond_timedwait.c
10713         (__pthread_cond_timedwait): Return the result of the final
10714         locking.  If it succeeds, the regular function return value.
10715
10716         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10717         Return result of the final locking.
10718         * version.c (__nptl_main): Work around problems with the strange
10719         INTERNAL_SYSCALL macro on ppc32.
10720         * init.c (__pthread_initialize_minimal_internal): Unblock
10721         SIGCANCEL in case the parent blocked it.
10722         Reported by Paul Mackerras <paulus@samba.org>.
10723
10724         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10725         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10727
10728 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10729
10730         * sysdeps/pthread/pthread_cond_timedwait.c
10731         (__pthread_cond_timedwait): Unlock and fail if
10732         __pthread_mutex_unlock_internal failed.
10733
10734         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10735         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10736         Use ARCH_CLONE.
10737         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10738         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10739         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10740         ALLOCATE_STACK): New macros.
10741         (TLS_TPADJ): New macro.
10742         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10743         (allocate_stack): Handle TLS_DTV_AT_TP and
10744         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10745         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10746         Don't set PD->self.
10747         * init.c [__ia64__] (__NR_set_tid_address): Define.
10748
10749         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10750         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10751         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10752         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10753         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10754         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10755         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10756         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10757         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10758         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10759         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10760         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10761         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10762         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10763         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10764         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10765         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10766         * sysdeps/ia64/bits/atomic.h: New file.
10767         * sysdeps/ia64/Makefile: New file.
10768         * sysdeps/ia64/pthread_spin_init.c: New file.
10769         * sysdeps/ia64/pthread_spin_lock.c: New file.
10770         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10771         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10772         * sysdeps/ia64/pthreaddef.h: New file.
10773         * sysdeps/ia64/tcb-offsets.sym: New file.
10774         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10775         * sysdeps/ia64/tls.h: New file.
10776
10777         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10778         to syscall instead of no arguments.
10779
10780 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10781
10782         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10783         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10784         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10785         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10786
10787         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10788         unused code.
10789
10790         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10791
10792         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10793         lowlevelbarrier.sym.
10794         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10795         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10796         Include lowlevelbarrier.h and don't define offsets locally.
10797         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10798
10799         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10800         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10801         (__lll_mutex_timedlock_wait): Likewise.
10802         (lll_mutex_lock): Adjust asm for that.
10803         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10804         (lll_lock): Adjust asm for operand order change.
10805         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10806         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10807
10808         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10809         Reverse order of parameters.
10810         (__lll_timedwait_tid): Remove regparms attribute.
10811         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10812         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10813
10814         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10815         (__lll_timedwait_tid): Remove one unnecessary instruction.
10816
10817         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10818         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10819         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10820         lowlevelmutex.S.
10821
10822         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10823         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10824         for NOT_IN_libc.
10825         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10826         lowlevellock.S.
10827
10828         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10829         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10830         for libc.so.
10831         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10832         define LOCK here (if UP is not defined).  The actual code is in
10833         lowlevelmutex.S.
10834
10835         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10836         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10837         __lll_timedwait_tid for libc.so.
10838         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10839         define LOCK here (if UP is not defined).  The actual code is in
10840         lowlevellock.S.
10841
10842         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10843         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10844         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10845         instead of lowlevelsem.h.
10846         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10847         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10848         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10849
10850         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10851         lowlevelrwlock.sym.
10852         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10853         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10854         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10855
10856         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10857         register loading.
10858         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10859         last changed.  D'oh.
10860
10861         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10862
10863         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10864         of __libc_locking_needed.
10865         (lll_trylock): Initialize %eax to zero.
10866
10867         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10868         pthread_cond_t definition.
10869
10870 2003-03-10  Roland McGrath  <roland@redhat.com>
10871
10872         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10873         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10874         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10875         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10876         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10877
10878         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10879         Instead of setting PD->multiple_threads, set globals
10880         __pthread_multiple_threads and __libc_multiple_threads.
10881         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10882         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10883         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10884
10885         * descr.h (struct pthread): Conditionalize first member on
10886         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10887         containing an anonymous tcbhead_t.  Move `list' member out.
10888         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10889         * allocatestack.c: Remove use of `header.data.' prefix.
10890         * pthread_create.c: Likewise.
10891         * init.c (__pthread_initialize_minimal_internal): Likewise.
10892         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10893         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10894         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10895         * sysdeps/x86_64/tls.h: Likewise.
10896         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10897         (SINGLE_THREAD_P): Likewise.
10898         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10899         (SINGLE_THREAD_P): Likewise.
10900         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10901         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10902
10903 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10904
10905         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10906
10907         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10908         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10909
10910         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10911         leftovers from the ia32 code.
10912
10913         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10914         memory load.
10915         (clear_once_control): Don't load %esi.
10916
10917         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10918         handling.
10919
10920         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10921
10922         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10923         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10924
10925         * Makefile (tests): Add tst-cond10.
10926         * tst-cond10.c: New file.
10927
10928 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10929
10930         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10931         * tst-signal3.c (do_test): Likewise.
10932         * tst-sem5.c (do_test): Likewise.
10933         * tst-kill6.c (do_test): Likewise.
10934         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10935
10936         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10937         of inc/dec.
10938         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10939         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10940         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10941         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10942         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10943         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10944         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10945         Likewise.
10946         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10947         Likewise.
10948         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10952         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10953         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10954         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10955         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10956
10957         * allocatestack.c (allocate_stack): If mprotect() fails free the
10958         TLS memory.
10959
10960 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10961
10962         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10963
10964         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10965         lll_wake_tid.  This was used only to work around kernel limits in
10966         the early days.
10967         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10968         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10969         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10970         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10971
10972         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10973         (__pthread_initialize_minimal_internal): Change initialization of
10974         __static_tls_align_m1 appropriately.
10975         * pthreadP.h (__static_tls_align_m1): Renamed from
10976         __static_tls_align.
10977         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10978         instead of __static_tls_align-1.
10979
10980 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10981
10982         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10983
10984         * pthread_create.c: Define __pthread_keys using nocommon
10985         attribute, not by placing it explicitly in bss.
10986         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10987
10988         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10989         Use it in mmap call to allocate stacks.
10990
10991         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10992
10993         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10994         result of the thread function.
10995
10996 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10997
10998         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10999         version is just fine.
11000
11001         * sysdeps/unix/sysv/linux/libc_pthread_init.c
11002         (__pthread_child_handler): Renamed from pthread_child_handler,
11003         exported, and marked hidden.  Change all users.
11004         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11005         free __pthread_child_handler from child list.
11006
11007 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11008
11009         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11010
11011         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11012         Fix handling of cancellation and failing pthread_mutex_unlock call.
11013         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11014         (__pthread_cond_wait): Likewise.
11015
11016         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11017         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11018         lll_futex_timed_wait call.
11019         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11020         (pthread_rwlock_timedwrlock): Likewise.
11021
11022         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11023         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11024         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11025
11026         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11027         check of lll_futex_wake return value.
11028
11029 2003-03-03  Roland McGrath  <roland@redhat.com>
11030
11031         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11032
11033         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11034         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11035         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11036
11037 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
11038
11039         * sysdeps/pthread/timer_create.c (timer_create): Return correct
11040         error for CPU clocks.
11041
11042         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11043         _POSIX_MONOTONIC_CLOCK.
11044         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11045
11046         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11047         recent kernels.
11048
11049 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11050
11051         * descr.h (struct pthread): Move cleanup field to the front.
11052
11053 2003-03-01  Roland McGrath  <roland@redhat.com>
11054
11055         * sem_open.c (sem_open): Braino fix.
11056
11057 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11058
11059         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11061         __pthread_cleanup_pop functionality.
11062         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11063
11064         * descr.h (struct pthread): Move tid field to the front now that
11065         it is often used.
11066
11067         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11068         (__lll_mutex_timedlock_wait): Remove.
11069         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11070         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11071         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11072         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11073         (lll_unlock_wake_cb): Don't save and restore %esi.
11074         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11075         %esi.
11076         (__lll_timedwait_tid): Add alignment.
11077         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11078         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11079         %esi.
11080         (__lll_timedwait_tid): Removed.
11081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11082         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11083         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11084         (pthread_barrier_wait): Don't save, load, and restore %esi for
11085         last thread.
11086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11087         (__pthread_cond_signal): Don't save, load, and restore %esi.
11088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11089         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11090         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11091         Don't save, load, and restore %esi.
11092
11093 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11094
11095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11096         Release lock before waking up the waiters.
11097
11098         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11099
11100         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11101         (reader_thread): Likewise.
11102
11103         * sysdeps/pthread/pthread_rwlock_unlock.c
11104         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11105         to wake up readers if there are none.
11106
11107         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11108         Release internal lock before wake threads.
11109
11110 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11111
11112         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11113         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11114         predefined.
11115         * tst-rwlock9.c: Likewise.
11116         * tst-rwlock10.c: New file.
11117         * tst-rwlock11.c: New file.
11118
11119         * Makefile (tests): Add tst-dlsym1.
11120         * tst-dlsym1.c: New file.
11121
11122         * init.c (__pthread_initialize_minimal_internal): Set
11123         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11124         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11125
11126 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11127
11128         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11129
11130         * tst-cond2.c: Fix sychronization with child.
11131
11132         * tst-rwlock8.c (reader_thread): Remove unused variable.
11133
11134         * Makefile: Add rules to build and run tst-tls3.
11135         * tst-tls3.c: New file.
11136         * tst-tls3mod.c: New file.
11137
11138         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11139         * tst-rwlock8.c: New file.
11140         * tst-rwlock9.c: New file.
11141         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11142         complete broken rwlock implementation.
11143         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11144         Likewise.
11145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11146         Likewise.
11147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11148         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11149         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11150         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11151         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11152         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11153         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11154
11155 2003-02-23  Roland McGrath  <roland@redhat.com>
11156
11157         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11158
11159 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11160
11161         * Makefile (tests): Add tst-context1.
11162         * tst-context1.c: New file.
11163
11164         * Makefile (tests): Add tst-tls1 and tst-tls2.
11165         * tst-tls1.c: New file.
11166         * tst-tls2.c: New file.
11167
11168         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11169         for failed cmpxchg.
11170
11171         * pthread_create.c (start_thread): Set EXITING_BIT early.
11172
11173         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11174         (THREAD_GETMEM_NC): Likewise.
11175
11176 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11177
11178         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11179         off 3 more bytes by using offset-less instructions when possible.
11180
11181         * Makefile: Add dependency for $(objpfx)version.d.
11182
11183         * eintr.c (eintr_source): Add unnecessary return but the compiler
11184         insists.
11185
11186         * tst-kill3.c: Include <unistd.h>.
11187
11188 2003-02-21  Roland McGrath  <roland@redhat.com>
11189
11190         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11191
11192 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11193
11194         * Makefile (tests): Add tst-eintr1.
11195         (distribute): Add eintr.c.
11196         * tst-eintr1.c: New file.
11197         * eintr.c: New file.
11198
11199         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11200
11201         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11202         Disallow sending SIGCANCEL.
11203
11204         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11205         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11206         * tst-kill1.c: New file.
11207         * tst-kill2.c: New file.
11208         * tst-kill3.c: New file.
11209         * tst-kill5.c: New file.
11210         * tst-kill6.c: New file.
11211         * tst-basic7.c: Renamed to...
11212         * tst-kill4.c: ...this.
11213
11214 2003-02-21  Roland McGrath  <roland@redhat.com>
11215
11216         * Makefile (install-lib-ldscripts): New variable.
11217
11218 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11219
11220         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11221         * pthread_cancel.c: Use INVALID_TD_P.
11222         * pthread_detach.c: Likewise.
11223         * pthread_getschedparam.c: Likewise.
11224         * pthread_setschedparam.c: Likewise.
11225         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11226         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11227         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11228         * pthread_timedjoin.c: Likewise.
11229
11230         * tst-basic7.c: Include <signal.h>.
11231
11232         * pthread_join.c (pthread_join): Limited checking for invalid
11233         descriptors.
11234         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11235
11236 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11237
11238         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11239         beginning of the loop.  Clear the entire first block of TSD.
11240         * Makefile (tests): Add tst-key4.
11241         * tst-key4.c: New file.
11242
11243 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11244
11245         * Makefile (tests): Add tst-basic7.
11246         * tst-basic7.c: New file.
11247
11248         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11249         Add some more __builtin_expect.
11250
11251         * pthreadP.h: Define dummy version of DEBUGGING_P.
11252
11253 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11254
11255         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11256         _POSIX_THREAD_PRIORITY_SCHEDULING.
11257         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11258         _XOPEN_REALTIME_THREADS.
11259         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11260
11261         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11262         kernel returns EINVAL for PID <= 0, work around it.
11263
11264         * Makefile (tests): Add tst-signal5.
11265         * tst-signal5.c: New file.
11266
11267         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11268         and LOGIN_NAME_MAX.
11269
11270         * tst-cancel1.c (tf): Block all signals.
11271
11272         * Makefile (tests): Add tst-basic6.
11273         * tst-basic6.c: New file.
11274
11275         * tst-basic1.c: Add test for process ID.
11276
11277         * Makefile (tests): Add tst-cancel10.
11278         * tst-cancel10.c: New file.
11279
11280         * Makefile (tests): Add tst-signal4.
11281         * tst-signal4.c: New file.
11282
11283         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11284         __sigismember instead of sigismember.  Add __builtin_expect.
11285
11286 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11287
11288         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11289         pthread_setcancelstate, and pthread_rwlock_setpshared.
11290
11291         * tst-cancel7.c (do_test): Make sure the pid file exists before
11292         canceling the thread.
11293
11294         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11295         pthread_rwlock_timedrdlock tests.
11296         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11297         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11298         Check for invalid tv_nsec field.
11299         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11300         Likewise.
11301
11302         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11303         recursive mutex of overflow.
11304
11305         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11306
11307         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11308         going into an endless loop.
11309         * Makefile (tests): Add tst-cancel9.
11310         * tst-cancel9.c: New file.
11311
11312         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11313
11314 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11315
11316         * tst-mutex5.c (do_test): Add more timedlock tests.
11317
11318         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11319         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11320
11321         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11322         use INLINE_SYSCALL.  Error number is returned, not -1.
11323
11324         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11325         and __deallocate_stack with internal_function.
11326         * pthread_create.c: Adjust definitions appropriately.
11327         * allocatestack.c: Likewise.
11328
11329         * pthread_join.c: Add one more __builtin_expect.
11330         * pthread_timedjoin.c: Likewise.
11331
11332         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11333         not data of sequence number does not match.
11334         Add one __builtin_expect.
11335
11336         * Makefile (tests): Add tst-clock1.
11337         * tst-clock1.c: New file.
11338
11339         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11340         negative arguments.
11341         * Makefile (tests): Add tst-basic5.
11342         * tst-basic5.c: New file.
11343
11344 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11345
11346         * Makefile (tests): Add tst-basic4.
11347         * tst-basic4.c: New file.
11348
11349         * pthreadP.h: Add declaraction for __nptl_nthreads.
11350         * pthread_create.c: Define __nptl_nthreads
11351         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11352         after thread is done.  If then zero, call exit(0).
11353         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11354         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11355         * init.c (pthread_functions): Initialize ptr_nthreads.
11356         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11357         (__reclaim_stacks): Decrement __nptl_nthreads.
11358         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11359         Define.
11360         * Makefile (tests): Add tst-basic3.
11361         * tst-basic3.c: New file.
11362
11363         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11364         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11365         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11366         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11367         if asynchronous canceling is enabled.
11368         * pthread_join.c (pthread_join): When recognizing circular joins,
11369         take into account the other thread might be already canceled.
11370         * Makefile (tests): Add tst-join5.
11371         * tst-join5.c: New file.
11372
11373         * Makefile (tests): Add tst-join4.
11374         * tst-join4.c: New file.
11375
11376 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11377
11378         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11379
11380 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11381
11382         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11383         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11384         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11385         warning.
11386         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11387         to avoid warning.
11388         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11389         error if lll_futex_wake failed.
11390
11391 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11392
11393         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11394         handling of cancellation and failung pthread_mutex_unlock call.
11395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11396         * Makefile (tests): Add tst-cond8 and tst-cond9.
11397         * tst-cond8.c: New file.
11398         * tst-cond9.c: New file.
11399
11400         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11401
11402         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11403         non-standard initializers with __USE_GNU.
11404
11405         * Makefile (tests): Add tst-cleanup3.
11406         * tst-cleanup3.c: New file.
11407
11408 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11409
11410         * Makefile (tests): Add tst-attr1 and tst-attr2.
11411         * tst-attr1.c: New file.
11412         * tst-attr2.c: New file.
11413
11414         * Makefile: Add rules to build and run tst-atfork2 test.
11415         * tst-atfork2.c: New file.
11416         * tst-atfork2mod.c: New file.
11417
11418         * sysdeps/unix/sysv/linux/unregister-atfork.c
11419         (__unregister_atfork): Free the memory allocated for the handlers
11420         after removing them from the lists.
11421
11422         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11423         cleanup function.
11424
11425         * tst-atfork1.c (do_test): Wait for the child we forked.
11426         Report error in child.
11427
11428         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11429
11430         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11431
11432 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11433
11434         * Makefile (tests): Add tst-cancel8.
11435         * tst-cancel8.c: New file.
11436
11437         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11438         clearing of control variable.
11439         * Makefile (tests): Add tst-once3 and tst-once4.
11440         * tst-once3.c: New file.
11441         * tst-once4.c: New file.
11442
11443 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11444
11445         * sysdeps/sh/Makefile: New file.
11446         * sysdeps/sh/bits/atomic.h: New file.
11447         * sysdeps/sh/pthread_spin_init.c: New file.
11448         * sysdeps/sh/pthread_spin_lock.c: New file.
11449         * sysdeps/sh/pthread_spin_trylock.S: New file.
11450         * sysdeps/sh/pthread_spin_unlock.S: New file.
11451         * sysdeps/sh/pthreaddef.h: New file.
11452         * sysdeps/sh/tcb-offsets.sym: New file.
11453         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11454         * sysdeps/sh/tls.h: New file.
11455         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11456         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11457         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11458         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11459         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11460         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11461         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11462         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11463         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11464         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11465         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11466         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11467         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11468         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11469         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11470         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11471         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11472         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11473         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11474         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11475         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11476         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11477         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11478         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11479         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11480         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11481         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11482         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11483         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11484         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11485
11486 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11487
11488         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11489         according to POSIX.
11490
11491         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11492
11493 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11494
11495         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11496         (TLS_GET_FS): New #define.
11497         (TLS_SET_FS): New #define.
11498         Correct value of __NR_set_thread_area.
11499
11500         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11501
11502 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11503
11504         * Makefile (tests): Add tst-popen1.
11505         * tst-popen1.c: New file.
11506
11507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11508         but inactive generalization.
11509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11511         Minor optimization, remove one instruction.
11512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11513
11514 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11515
11516         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11517
11518 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11519
11520         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11521         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11522         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11523         * sysdeps/pthread/pthread_cond_signal.c: New file.
11524         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11525         * sysdeps/pthread/pthread_cond_wait.c: New file.
11526         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11527         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11528         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11529         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11530         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11531         * sysdeps/s390/Makefile: New file.
11532         * sysdeps/s390/bits/atomic.h: New file.
11533         * sysdeps/s390/pthread_spin_init.c: New file.
11534         * sysdeps/s390/pthread_spin_lock.c: New file.
11535         * sysdeps/s390/pthread_spin_trylock.c: New file.
11536         * sysdeps/s390/pthread_spin_unlock.c: New file.
11537         * sysdeps/s390/pthreaddef.h: New file.
11538         * sysdeps/s390/tcb-offsets.sym: New file.
11539         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11540         * sysdeps/s390/tls.h: New file.
11541         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11542         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11543         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11544         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11545         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11546         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11547         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11548         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11549         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11550         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11551         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11552         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11553         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11554         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11555         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11556         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11557         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11558         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11559         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11560         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11561         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11562         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11563         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11564
11565 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11566
11567         * atomic.h: Add a couple more default implementations.
11568         (atomic_compare_and_exchange_acq): Use
11569         __arch_compare_and_exchange_32_acq in return value definition.  It
11570         always exists.
11571         (atomic_bit_set): Renamed from atomic_set_bit.
11572         Add missing atomic_ prefixes.
11573
11574         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11575         thread library is available, use correct value to mark initialized
11576         once variable.
11577
11578 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11579
11580         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11581         __sysconf to determine pagesize.
11582
11583         * pthread_create.c: Include <atomic.h>.
11584         * allocatestack.c (allocate_stack): Implement coloring of the
11585         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11586         size minus one.  Adjust users.
11587         * sysdeps/i386/i686/Makefile: New file.
11588
11589 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11590
11591         * allocatestack.c: Improve comment throughout the file.
11592
11593         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11594         (__lll_lock_wait): Add branch prediction.
11595         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11596         (__lll_lock_wait): Likewise.
11597         (lll_unlock_wake_cb): Removed.
11598
11599 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11600
11601         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11602         _POSIX_THREAD_PRIORITY_SCHEDULING.
11603
11604 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11605
11606         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11607         Fix return type of ptr___pthread_getspecific.
11608
11609 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11610
11611         * Makefile (tests): Add tst-umask1.
11612         (tst-umask1-ARGS): Define.
11613         * tst-umask1.c: New file.
11614
11615 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11616
11617         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11618         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11619         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11620         pthread_rwlock_unlock.
11621         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11622         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11623         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11624         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11626         New file.
11627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11628         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11629         New file.
11630         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11631         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11632         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11633         New file.
11634         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11635         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11636         New file.
11637         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11638         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11639         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11640         New file.
11641         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11642         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11643         New file.
11644         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11645
11646         * Makefile (libpthread-routines): Remove lowlevelcond and
11647         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11648         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11649         and pthread_cond_broadcast.
11650         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11651         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11652         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11653         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11654         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11655         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11656         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11657         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11658         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11659         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11663         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11664         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11665         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11666         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11667         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11668         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11669         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11670         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11671         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11672         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11673         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11674         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11675         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11676         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11677         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11678         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11679         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11680         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11681
11682         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11683         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11684         of the code is moved to ...
11685         * sysdeps/pthread/createthread.c: ...here.  New file.
11686
11687 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11688
11689         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11690         (__new_sem_post): Clear %eax before returning.
11691         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11692
11693         * Makefile (tests): Add tst-cleanup2.
11694         * tst-cleanup2.c: New file.
11695
11696         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11697         Interpret first parameter correctly.
11698
11699 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11700
11701         * Makefile (headers): Add bits/semaphore.h.
11702
11703 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11704
11705         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11706         if not SHARED.
11707
11708 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11709
11710         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11711         must be used and mapping failed.
11712         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11713
11714         * Makefile (CFLAGS-pthread_self.os): Define this, not
11715         CFLAGS-pthread_self.c.
11716
11717 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11718
11719         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11720         lll_unlock_wake_cb.
11721
11722         * Makefile (libpthread-routines): Add version.  Add rules to build
11723         version.os and banner.h.
11724         * version.c: New file.
11725
11726 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11727
11728         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11729         the alias unconditional.
11730         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11731
11732 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11733
11734         * Makefile (CFLAGS-pthread_self.c): New definition.
11735
11736 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11737
11738         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11739         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11740         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11741         * init.c (__pthread_initialize_minimal_internal): Likewise.
11742
11743 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11744
11745         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11746
11747         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11748         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11749         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11750         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11751         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11752         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11753
11754 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11755
11756         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11757         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11758         * tst-cancel-wrappers.sh: Remove all exceptions.
11759
11760 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11761
11762         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11763         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11764
11765         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11766         Use __libc_pthread_functions array if SHARED.
11767
11768         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11769         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11770
11771         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11772         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11773         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11774         __libc_ptf_call instead of __libc_maybe_call.
11775         (PTF): New #define.
11776         (__libc_cleanup_region_start): Wrap function name with PTF call.
11777         (__libc_cleanup_region_end): Likewise.
11778         (__libc_cleanup_end): Likewise.
11779
11780         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11781         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11782         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11783         * pthreadP.h: Add prototypes.
11784
11785         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11786         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11787         __pthread_rwlock_unlock aliases.
11788         * pthreadP.h: Add prototypes for new aliases.
11789
11790         * pthreadP.h (struct pthead_functions): Moved to...
11791         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11792         * init.c (pthread_functions): Add initializers for new elements.
11793
11794         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11795         __pthread_cleanup_pop_restore aliases.
11796         * pthreadP.h: Add prototypes.
11797
11798         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11799         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11800         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11801         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11802         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11803         * pthreadP.h: Adjust prototypes and callers.
11804
11805 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11806
11807         * Makefile (tests): Add tst-cancel7.
11808         (tst-cancel7-ARGS): New variable.
11809         * tst-cancel7.c: New file.
11810
11811         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11812         around gcc defficiencies.
11813         * old_pthread_cond_signal.c: Likewise.
11814         * old_pthread_cond_timedwait.c: Likewise.
11815         * old_pthread_cond_wait.c: Likewise.
11816
11817         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11818
11819 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11820
11821         * Makefile (tests): Add tst-cond7.
11822         * tst-cond7.c: New file.
11823
11824         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11825         (condvar_cleanup): Get condvar address from the right place.
11826
11827         * atomic.h: Correct definitions of atomic_full_barrier,
11828         atomic_read_barrier, atomic_write_barrier.
11829
11830         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11831         race-free.
11832         * old_pthread_cond_signal.c: Likewise.
11833         * old_pthread_cond_timedwait.c: Likewise.
11834         * old_pthread_cond_wait.c: Likewise.
11835
11836 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11837
11838         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11839
11840 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11841
11842         * pthreadP.h (pthread_cond_2_0_t): New type.
11843         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11844         Use new type for the 2.0 condvar function prototypes.
11845         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11846         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11847         parameter.
11848         * old_pthread_cond_destroy.c: Likewise.
11849         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11850         * old_pthread_cond_signal.c: Likewise.
11851         * old_pthread_cond_timedwait.c: Likewise.
11852         * old_pthread_cond_wait.c: Likewise.
11853
11854         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11855         (__pthread_cond_wait): Don't save cancellation mode and seq value
11856         in same location.
11857
11858         * herrno.c (__h_errno_location): Don't define as weak.
11859
11860 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11861
11862         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11863         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11864         and pthread_cond_wait.
11865         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11866         Renamed to...
11867         (__pthread_cond_broadcast_2_0): ... this.
11868         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11869         Renamed to...
11870         (__pthread_cond_destroy_2_0): ... this.
11871         * old_pthread_cond_init.c (__old_pthread_cond_init):
11872         Renamed to...
11873         (__pthread_cond_init_2_0): ... this.
11874         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11875         Renamed to...
11876         (__pthread_cond_signal_2_0): ... this.
11877         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11878         Renamed to...
11879         (__pthread_cond_wait_2_0): ... this.
11880         * pthread_cond_destroy.c: Include shlib-compat.h.
11881         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11882         * pthread_cond_init.c: Include shlib-compat.h.
11883         (pthread_cond_init): Change strong_alias into versioned_symbol.
11884         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11885         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11886         fields.
11887         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11888         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11889         __pthread_cond_wait_2_0): New prototypes.
11890         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11891         __old_pthread_cond_init, __old_pthread_cond_signal,
11892         __old_pthread_cond_wait): Removed.
11893         * init.c: Include shlib-compat.h.
11894         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11895         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11896         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11897         ptr___pthread_cond_*_2_0 fields.
11898         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11899         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11900
11901         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11902         LIBC_SIGACTION was not yet defined.
11903         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11904         [!defined LIBC_SIGACTION] (__sigaction): New function and
11905         libc_hidden_weak.
11906         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11907         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11908
11909 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11910
11911         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11912
11913 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11914
11915         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11916         New, larger type definition.
11917         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11918         implementation.
11919         * Versions [libpthread]: Add definitions for new pthread_cond_*
11920         interfaces for version GLIBC_2.3.2.
11921         * pthread_cond_init.c: Update initialization for new type definition.
11922         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11923         pthread_cond_timedwait, pthread_cond_signal, and
11924         pthread_cond_broadcast.  Add old_pthread_cond_init,
11925         old_pthread_cond_destroy, old_pthread_cond_wait,
11926         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11927         old_pthread_cond_broadcast.
11928         * old_pthread_cond_broadcast.c: New file.
11929         * old_pthread_cond_destroy.c: New file.
11930         * old_pthread_cond_init.c: New file.
11931         * old_pthread_cond_signal.c: New file.
11932         * old_pthread_cond_timedwait.c: New file.
11933         * old_pthread_cond_wait.c: New file.
11934         * pthreadP.h: Add prototypes for the compatibility interfaces.
11935
11936         * pthread_cond_destroy.c: Don't include <errno.h>.
11937
11938 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11939
11940         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11941         unnecessary zero offset when addressing MUTEX.
11942
11943 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11944
11945         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11946         __register_atfork.
11947         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11948         for __register_atfork.
11949
11950 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11951
11952         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11953         instead of ASSEMBLER test macro.
11954
11955         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11956         __libc_current_sigrtmax): Add libc_hidden_def.
11957
11958         * sysdeps/pthread/list.h: Remove assert.h include.
11959
11960 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11961
11962         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11963         __pthread_initialize_minimal_internal not
11964         __pthread_initialize_minimal.
11965
11966 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11967
11968         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11969         __pthread_initialize_minimal as hidden.
11970
11971         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11972         constructor.
11973
11974 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11975
11976         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11977         $(common-objpfx)format.lds, include that into the output script.
11978         Fix comment.
11979         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11980
11981 2002-12-28  Andreas Jaeger  <aj@suse.de>
11982
11983         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11984         nsec resolution changes.
11985         (xstat64_conv): Likewise.
11986         (xstat32_conv): Likewise.
11987         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11988         struct kernel_stat.
11989         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11990         structs stat and stat64.
11991         * time/time.h (__timespec_defined): Define for __USE_MISC.
11992         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11993
11994 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11995
11996         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11997         argument.
11998         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11999         (pthread_exit): Use strong_alias to avoid warnings.
12000         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12001         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12002         ptr___pthread_attr_init_2_*.
12003         * init.c (pthread_functions): Adjust.
12004
12005 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
12006
12007         * forward.c: Make all functions available by default again.  It
12008         caused too much trouble.
12009
12010         * pt-siglongjmp.c: Removed.
12011
12012 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
12013
12014         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12015         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12016         * sysdeps/i386/Makefile: New file.
12017         * sysdeps/i386/tcb-offsets.sym: New file.
12018         * sysdeps/pthread/tcb-offsets.h: New file.
12019         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12020         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12021
12022         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12023         __register_atfork...
12024         (GLIBC_2.3.2): ...here.
12025
12026 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12027
12028         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12029         pthread_attr_setstackaddr with __attribute_deprecated__.
12030
12031 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12032
12033         * pt-system.c (system): Remove cancellation handling.
12034         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12035         cancellation routines.
12036
12037 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12038
12039         * descr.h: Include <dl-sysdep.h>.
12040         (struct pthread): Move header.data.list to the back of the struct.
12041         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12042         (MULTIPLE_THREADS_OFFSET): Adjust offset.
12043         (SYSINFO_OFFSEET): Likewise.
12044
12045 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12046
12047         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12048         Define.
12049         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12050         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12051         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12052         (USE_DL_SYSINFO): Undef.
12053
12054 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12055
12056         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12057         $(common-objpfx)libc.so.
12058         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12059         it is bigger than pipe buffer size even on arches with bigger
12060         page size.
12061         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12062
12063 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12064
12065         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12066         correct errno access for case that USE___THREAD is not defined.
12067
12068 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12069
12070         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12071         Patch by Marijn Ros <marijn@mad.scientist.com>.
12072
12073 2002-12-22  Roland McGrath  <roland@redhat.com>
12074
12075         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12076
12077 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12078
12079         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12080
12081 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12082
12083         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12084         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12085         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12086
12087         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12088         of int $0x80.
12089         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12090         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12091         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12092         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12093         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12094         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12095         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12096         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12097
12098         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12099         sysenter.
12100         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12101
12102         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12103
12104         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12105         in new TCB.
12106         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12107         that sysinfo is properly initialized.
12108         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12109         to 1 only for ld.so.
12110
12111         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12112         RTLD_CORRECT_DYNAMIC_WEAK.
12113
12114 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12115
12116         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12117         Use return 0 as 6th argument to FORWARD4.
12118         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12119
12120 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12121
12122         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12123         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12124         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12125         (INIT_SYSINFO): New #define.
12126         (TLS_TP_INIT): Use INIT_SYSINFO.
12127         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12128         At test to make sure SYSINFO_OFFSET value is correct.
12129         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12130
12131 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12132
12133         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12134         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12135         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12136         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12137         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12138         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12139         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12140
12141 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12142
12143         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12144         macro instead of using int $0x80 directly.
12145
12146         * sysdeps/pthread/bits/stdio-lock.h: New file.
12147         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12148         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12149         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12150         * Makefile (routines): Add libc-lowlevelmutex.
12151
12152         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12153         __i686.get_pc_thunk.dx.
12154
12155 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12156
12157         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12158         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12159         ($(objpfx)tst-cancel-wrappers.out): New rule.
12160         * tst-cancel-wrappers.sh: New test.
12161         * tst-locale1.c: Include signal.h.
12162         (uselocale): Test static linking of __libc_current_sigrt*.
12163
12164 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12165
12166         * Makefile (tests): Add tst-cancel6.
12167         * tst-cancel6.c: New file
12168
12169 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12170
12171         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12172         Define meaningfully for assembler as well.
12173         * pthreadP.h (struct pthread_functions): Remove
12174         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12175         and ptr_pthread_attr_init_2_1 fields.
12176         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12177         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12178         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12179         (FORWARD3): Define using FORWARD4.
12180         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12181         versions.
12182         * pt-system.c: Remove duplicate stdlib.h include.
12183
12184 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12185
12186         * sem_init.c: Define sem_init@GLIBC_2.0.
12187         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12188         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12189
12190         * flockfile.c: Moved to...
12191         * sysdeps/pthread/flockfile.c: ...here.  New file.
12192         * funlockfile.c: Moved to...
12193         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12194         * ftrylockfile.c: Moved to...
12195         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12196
12197 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12198
12199         * libc-cancellation.c: Guard both function with
12200         #if !defined NOT_IN_libc.
12201         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12202         automatically provided pthread wrappers.
12203         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12204         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12205         nor in libpthread.
12206         * pt-open.c: Removed.
12207         * pt-fcntl.c: Removed.
12208         * pt-fsync.c: Removed.
12209         * pt-lseek.c: Removed.
12210         * pt-msgrcv.c: Removed.
12211         * pt-msgsnd.c: Removed.
12212         * pt-msync.c: Removed.
12213         * pt-nanosleep.c: Removed.
12214         * pt-open64.c: Removed.
12215         * pt-pause.c: Removed.
12216         * pt-pread.c: Removed.
12217         * pt-pread64.c: Removed.
12218         * pt-pwrite.c: Removed.
12219         * pt-pwrite64.c: Removed.
12220         * pt-read.c: Removed.
12221         * pt-recv.c: Removed.
12222         * pt-recvfrom.c: Removed.
12223         * pt-recvmsg.c: Removed.
12224         * pt-send.c: Removed.
12225         * pt-sendto.c: Removed.
12226         * pt-sigtimedwait.c: Removed.
12227         * pt-sigwait.c: Removed.
12228         * pt-wait.c: Removed.
12229         * pt-waitpid.c: Removed.
12230         * pt-write.c: Removed.
12231         * pt-accept.c: Removed.
12232         * pt-close.c: Removed.
12233         * pt-connect.c: Removed.
12234         * pt-lseek64.c: Removed.
12235         * pt-sendmsg.c: Removed.
12236         * pt-tcdrain.c: Removed.
12237
12238 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12239
12240         * init.c (__pthread_initialize_minimal_internal): Renamed from
12241         __pthread_initialize_minimal.  Make old name an alias.  This
12242         converts a normal relocation into a relative relocation.
12243
12244         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12245
12246         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12247         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12248         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12249         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12250         pt-sigwaitinfo, pt-waitid, and pt-writev.
12251         * pt-creat.c: Removed.
12252         * pt-poll.c: Removed.
12253         * pt-pselect.c: Removed.
12254         * pt-readv.c: Removed.
12255         * pt-select.c: Removed.
12256         * pt-sigpause.c: Removed.
12257         * pt-sigsuspend.c: Removed.
12258         * pt-sigwaitinfo.c: Removed.
12259         * pt-waitid.c: Removed.
12260         * pt-writev.c: Removed.
12261
12262         * init.c (pthread_functions): New variable.
12263         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12264         (or NULL) to __libc_pthread_init.
12265         * forward.c: Rewrite to use __libc:pthread_functions array to get
12266         function addresses.
12267         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12268         prototype.
12269         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12270         Take new parameter.  Copy content of variable pointed to by it
12271         to __libc_pthread_init.
12272
12273         * pthreadP.h (struct pthread_functions): New type.
12274         (__libc_pthread_init): Declare.
12275
12276         * pthread_attr_destroy.c: Add namespace protected alias.
12277         * pthread_attr_getdetachstate.c: Likewise.
12278         * pthread_attr_getinheritsched.c: Likewise.
12279         * pthread_attr_getschedparam.c: Likewise.
12280         * pthread_attr_getschedpolicy.c: Likewise.
12281         * pthread_attr_getscope.c: Likewise.
12282         * pthread_attr_setdetachstate.c: Likewise.
12283         * pthread_attr_setinheritsched.c: Likewise.
12284         * pthread_attr_setschedparam.c: Likewise.
12285         * pthread_attr_setschedpolicy.c: Likewise.
12286         * pthread_attr_setscope.c: Likewise.
12287         * pthread_cond_broadcast.c: Likewise.
12288         * pthread_cond_destroy.c: Likewise.
12289         * pthread_cond_init.c: Likewise.
12290         * pthread_cond_signal.c: Likewise.
12291         * pthread_cond_wait.c: Likewise.
12292         * pthread_condattr_destroy.c: Likewise.
12293         * pthread_condattr_init.c: Likewise.
12294         * pthread_equal.c: Likewise.
12295         * pthread_exit.c: Likewise.
12296         * pthread_getschedparam.c: Likewise.
12297         * pthread_self.c: Likewise.
12298         * pthread_setcancelstate.c: Likewise.
12299         * pthread_setschedparam.c: Likewise.
12300         * pthread_mutex_destroy.c: Likewise.
12301         * pthread_mutex_init.c: Likewise.
12302         * pthreadP.h: Add prototypes for the aliases.
12303
12304         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12305         multiple_threads member in correct TCB to 1.
12306
12307         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12308         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12309         member of thread decriptor, otherwise return unconditionally 1.
12310
12311 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12312
12313         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12314         regular Linux version.  Remove file.
12315         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12316         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12317         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12318         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12319         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12320         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12321         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12322         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12323         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12324         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12325         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12326         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12327         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12328         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12329         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12330         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12331         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12332         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12333         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12334         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12335         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12336         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12337         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12338         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12339         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12340         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12341         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12342         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12343         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12344         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12345
12346 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12347
12348         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12349         * sysdeps/unix/sysv/linux/open.c: Removed.
12350         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12351         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12352         * sysdeps/unix/sysv/linux/msync.c: Removed.
12353         * sysdeps/unix/sysv/linux/read.c: Removed.
12354         * sysdeps/unix/sysv/linux/close.c: Removed.
12355         * sysdeps/unix/sysv/linux/creat.c: Removed.
12356         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12357         * sysdeps/unix/sysv/linux/pause.c: Removed.
12358         * sysdeps/unix/sysv/linux/select.c: Removed.
12359         * sysdeps/unix/sysv/linux/write.c: Removed.
12360
12361 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12362
12363         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12364         element in TCB to see whether locking is needed.
12365
12366         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12367         MULTIPLE_THREADS_OFFSET value is correct.
12368
12369         * sysdeps/unix/sysv/linux/close.c: New file.
12370         * sysdeps/unix/sysv/linux/connect.S: New file.
12371         * sysdeps/unix/sysv/linux/creat.c: New file.
12372         * sysdeps/unix/sysv/linux/fsync.c: New file.
12373         * sysdeps/unix/sysv/linux/llseek.c: New file.
12374         * sysdeps/unix/sysv/linux/lseek.c: New file.
12375         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12376         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12377         * sysdeps/unix/sysv/linux/msync.c: New file.
12378         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12379         * sysdeps/unix/sysv/linux/open.c: New file.
12380         * sysdeps/unix/sysv/linux/open64.c: New file.
12381         * sysdeps/unix/sysv/linux/pause.c: New file.
12382         * sysdeps/unix/sysv/linux/poll.c: New file.
12383         * sysdeps/unix/sysv/linux/pread.c: New file.
12384         * sysdeps/unix/sysv/linux/pread64.c: New file.
12385         * sysdeps/unix/sysv/linux/pselect.c: New file.
12386         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12387         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12388         * sysdeps/unix/sysv/linux/readv.c: New file.
12389         * sysdeps/unix/sysv/linux/recv.S: New file.
12390         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12391         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12392         * sysdeps/unix/sysv/linux/select.c: New file.
12393         * sysdeps/unix/sysv/linux/send.S: New file.
12394         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12395         * sysdeps/unix/sysv/linux/sendto.S: New file.
12396         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12397         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12398         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12399         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12400         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12401         * sysdeps/unix/sysv/linux/system.c: New file.
12402         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12403         * sysdeps/unix/sysv/linux/wait.c: New file.
12404         * sysdeps/unix/sysv/linux/waitid.c: New file.
12405         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12406         * sysdeps/unix/sysv/linux/writev.c: New file.
12407         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12408
12409         * pt-readv.c: Fix comment.
12410
12411 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12412
12413         * tst-cleanup1.c: Include stdlib.h.
12414
12415         * tst-cancel5.c: New test.
12416         * Makefile (tests): Add tst-cancel5.
12417         (tst-cancel5): Link against libc.so libpthread.so in that order.
12418
12419 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12420
12421         * forward.c (test_loaded): Prevent recursive calls.
12422
12423         * Makefile (routines): Add libc-cancellation.
12424         * libc-cancellation.c: New file.
12425         * descr.h (struct pthread): Add multiple_threads field.
12426         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12427         new thread descriptor to 1.
12428         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12429         Initialize multiple_thread field after successful thread creation.
12430         * cancellation.c (__do_cancel): Move to pthreadP.h.
12431         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12432         (__pthread_disable_asynccancel): Add internal_function attribute.
12433         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12434         * pthread_setcancelstate.c: Likewise.
12435         * pthread_setcanceltype.c: Likewise.
12436         * pthread_exit.c: Likewise.
12437         * pthreadP.h (CANCELLATION_P): Likewise.
12438         (__do_cancel): Define as static inline.
12439         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12440         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12441         declarations.
12442         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12443         fields.  Define MULTIPLE_THREADS_OFFSET.
12444         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12445         declaration.
12446         * sysdeps/unix/sysv/linux/accept.S: New file.
12447         * sysdeps/unix/sysv/linux/read.c: New file.
12448         * sysdeps/unix/sysv/linux/write.c: New file.
12449         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12450         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12451         initialization of __libc_locking_needed.
12452         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12453         __libc_locking_needed, use multiple_threads field in TCB.
12454         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12455
12456 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12457
12458         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12459         version.
12460         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12461
12462         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12463         access to __libc_locking_needed for PIC.
12464
12465 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12466
12467         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12468         declare for libc.so.
12469         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12470         expression.
12471         (__libc_lock_lock): Put into statement expression.
12472         (__libc_lock_unlock): Remove trailing semicolon.
12473         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12474
12475 2002-12-12  Roland McGrath  <roland@redhat.com>
12476
12477         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12478         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12479
12480 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12481
12482         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12483         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12484         Initialize __libc_locking_needed.
12485         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12486         instead of __register_pthread_fork_handler.
12487         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12488         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12489         fork-gen with libc_pthread_init.
12490         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12491         of __register_pthread_fork_handler.
12492         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12493         of __register_pthread_fork_handler.
12494         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12495         __libc_locking_needed to determine whether lock prefix can be avoided.
12496         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12497
12498 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12499
12500         * Makefile (tests): Add tst-cleanup1.
12501         * tst-cleanup1.c: New file.
12502         * cancellation.c (__cleanup_thread): Removed.
12503         (__do_cancel): Remove call to __cleanup_thread.
12504         * pthreadP.h: Remove __cleanup_thread prorotype.
12505
12506         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12507         Remember function and argument even if cancellation handler
12508         function is not available.
12509         (__libc_cleanup_region_end): Execute registered function directly if
12510         pthread functions are not available.
12511         (__libc_cleanup_end): Likewise.
12512
12513         * init.c (__pthread_initialize_minimal): Fix initialization in
12514         static lib by preventing gcc from being too clever.
12515
12516 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12517
12518         * init.c (__pthread_initialize_minimal): Remove unneccesary
12519         sigaddset call.
12520
12521         * Makefile (tests): We can run tst-locale2 now.
12522
12523 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12524
12525         * Versions: Remove duplicated sigwait entry.
12526
12527 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12528
12529         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12530         inside libpthread.
12531
12532         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12533
12534         * pthreadP.h: Declare __pthread_enable_asynccancel and
12535         __pthread_disable_asynccancel.
12536         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12537         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12538         * cancellation.c (__pthread_enable_asynccancel): New function.
12539         (__pthread_disable_asynccancel): New function.
12540         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12541         * pt-close.c: Likewise.
12542         * pt-connect.c: Likewise.
12543         * pt-creat.c: Likewise.
12544         * pt-fcntl.c: Likewise.
12545         * pt-fsync.c: Likewise.
12546         * pt-lseek.c: Likewise.
12547         * pt-lseek64.c: Likewise.
12548         * pt-msgrcv.c: Likewise.
12549         * pt-msgsnd.c: Likewise.
12550         * pt-msync.c: Likewise.
12551         * pt-nanosleep.c: Likewise.
12552         * pt-open.c: Likewise.
12553         * pt-open64.c: Likewise.
12554         * pt-pause.c: Likewise.
12555         * pt-poll.c: Likewise.
12556         * pt-pread.c: Likewise.
12557         * pt-pread64.c: Likewise.
12558         * pt-pselect.c: Likewise.
12559         * pt-pwrite.c: Likewise.
12560         * pt-pwrite64.c: Likewise.
12561         * pt-read.c: Likewise.
12562         * pt-readv.c: Likewise.
12563         * pt-recv.c: Likewise.
12564         * pt-recvfrom.c: Likewise.
12565         * pt-recvmsg.c: Likewise.
12566         * pt-select.c: Likewise.
12567         * pt-send.c: Likewise.
12568         * pt-sendmsg.c: Likewise.
12569         * pt-sendto.c: Likewise.
12570         * pt-sigpause.c: Likewise.
12571         * pt-sigsuspend.c: Likewise.
12572         * pt-sigtimedwait.c: Likewise.
12573         * pt-sigwait.c: Likewise.
12574         * pt-sigwaitinfo.c: Likewise.
12575         * pt-system.c: Likewise.
12576         * pt-tcdrain.c: Likewise.
12577         * pt-wait.c: Likewise.
12578         * pt-waitid.c: Likewise.
12579         * pt-waitpid.c: Likewise.
12580         * pt-write.c: Likewise.
12581         * pt-writev.c: Likewise.
12582         * pthread_join.c: Likewise.
12583         * pthread_timedjoin.c: Likewise.
12584
12585         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12586         (__xpg_sigpause): New function.
12587         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12588
12589 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12590
12591         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12592
12593         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12594         _GI_pthread_cleanup_pop to pthreadP.h.
12595
12596         * ftrylockfile.c: Use _IO_lock_trylock instead of
12597         pthread_mutex_trylock.
12598
12599         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12600         (CANCEL_RESET): Likewise.
12601         (__pthread_setcanceltype_): Declare.
12602         (__pthread_mutex_lock_internal): Declare.
12603         (__pthread_mutex_unlock_internal): Declare.
12604         (__pthread_once_internal): Declare.
12605         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12606         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12607
12608         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12609         and pthread_mutex_unlock.
12610         * pthread_cond_wait.c: Likewise.
12611         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12612         * pthread_mutex_unlock.c: Likewise.
12613
12614         * pthread_setcanceltype.c: Add additional alias
12615         __pthread_setcanceltype.
12616
12617         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12618         * sem_open.c (sem_open): Likewise.
12619         Use __libc_open, __libc_write, and __libc_close instead of
12620         open, write, and close respectively.
12621
12622         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12623         Rewrite as statement expression since it must return a value.
12624
12625         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12626         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12627         __pthread_kill.
12628
12629         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12630         alias __pthread_once_internal.
12631
12632         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12633
12634 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12635
12636         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12637         * tst-stdio1.c: New file.
12638         * tst-stdio2.c: New file.
12639
12640         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12641
12642         * Makefile (tests): Comment out tst-locale2 for now.
12643         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12644
12645         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12646         -D_IO_MTSAFE_IO.
12647         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12648         Use _IO_lock_init instead of explicit assignment.
12649
12650         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12651         Define __libc_lock_* and __libc_lock_recursive macros with
12652         lowlevellock macros, not pthread mutexes.
12653
12654         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12655         of pthread_mutex_lock.
12656         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12657         instead of pthread_mutex_unlock.
12658
12659 2002-12-06  Roland McGrath  <roland@redhat.com>
12660
12661         * allocatestack.c (__stack_user): Use uninitialized defn.
12662         * init.c (__pthread_initialize_minimal): Initialize it here.
12663
12664 2002-12-05  Roland McGrath  <roland@redhat.com>
12665
12666         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12667         string.
12668         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12669
12670         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12671         missing & here too.
12672
12673 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12674
12675         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12676         lowlevellock.
12677         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12678         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12679         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12680         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12681         for __libc_lock_* macros.
12682         * Makefile (routines): Add libc-lowlevellock.
12683
12684 2002-10-09  Roland McGrath  <roland@redhat.com>
12685
12686         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12687         Under [__PIC__], call the function via the pointer fetched for
12688         comparison rather than a call by name that uses the PLT.
12689         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12690         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12691         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12692         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12693         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12694
12695 2002-12-04  Roland McGrath  <roland@redhat.com>
12696
12697         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12698
12699         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12700         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12701
12702         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12703
12704 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12705
12706         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12707         a completely opaque, non-integer type.
12708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12709
12710 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12711
12712         * sysdeps/i386/tls.h: Include stdlib.h.
12713         * sysdeps/x86_64/tls.h: Likewise.
12714
12715 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12716
12717         * Makefile (tests): Add tst-locale2.
12718         (tests-static): Likewise.
12719         * tst-locale2.c: New file.
12720
12721         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12722         volatile and add memory clobbers to lock operations.
12723
12724 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12725
12726         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12727         * sysdeps/i386/i486/bits/atomic.h: New file.
12728         * sysdeps/i386/i586/bits/atomic.h: New file.
12729         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12730         include i486 version.
12731         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12732         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12733         Patch by Marijn Ros <marijn@mad.scientist.com>.
12734
12735         * allocatestack.c (get_cached_stack): Don't crash if we first
12736         found a stack with a larger size then needed.
12737         Reported by Hui Huang <hui.huang@sun.com>.
12738
12739         * Makefile (tests): Add tst-sysconf.
12740         * tst-sysconf.c: New file.
12741
12742         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12743         PTHREAD_THREADS_MAX.
12744
12745 2002-12-02  Roland McGrath  <roland@redhat.com>
12746
12747         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12748         Declare using hidden_proto instead of attribute_hidden, so there are
12749         non-.hidden static symbols for gdb to find.
12750         (__pthread_keys): Likewise.
12751         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12752         * allocatestack.c (__stack_user): Likewise.
12753         * pthread_create.c (__pthread_keys): Likewise.
12754         (__nptl_threads_events, __nptl_last_event): Make these static instead
12755         of hidden.
12756         * pthread_key_create.c (__pthread_pthread_keys_max,
12757         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12758
12759 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12760
12761         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12762         statically.
12763         * tst-locale1.c: New file.
12764
12765         * pthread_cond_timedwait.c: Include <stdlib.h>.
12766
12767         * Makefile (tests): Add tst-fork2 and tst-fork3.
12768         * tst-fork2.c: New file.
12769         * tst-fork3.c: New file.
12770
12771 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12772
12773         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12774
12775         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12776         require it to 200112L.
12777
12778         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12779         instruction only if HAVE_CMOV is defined.
12780         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12781
12782         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12783
12784         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12785
12786         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12787
12788         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12789
12790 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12791
12792         * sysdeps/x86_64/bits/atomic.h: New file.
12793
12794         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12795         16-bit operations.
12796
12797         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12798         possible since gettid cannot fail.
12799
12800         * sysdeps/x86_64/pthreaddef.h: New file.
12801
12802         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12803
12804         * sysdeps/x86_64/pthread_spin_init.c: New file.
12805         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12806         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12807         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12808
12809         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12810         Add missing lock prefix.  Minute optimization.
12811
12812         * tst-spin2.c (main): Also check successful trylock call.
12813
12814         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12815         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12816
12817         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12818         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12819
12820         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12821         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12822         value in case of an error.  Add support for INTERNAL_SYSCALL.
12823
12824         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12825         value in case of an error.
12826
12827         * sysdeps/x86_64/tls.h: New file.
12828
12829 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12830
12831         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12832         takes the array member name and the index as parameters.
12833         (THREAD_SETMEM_NC): Likewise.
12834         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12835         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12836         interfaces.
12837
12838         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12839         to decide which code to use.
12840         (THREAD_SETMEM_NC): Likewise.
12841
12842         * allocatestack.c (queue_stack): Don't remove stack from list here.
12843         Do it in the caller.  Correct condition to prematurely terminate
12844         loop to free stacks.
12845         (__deallocate_stack): Remove stack from list here.
12846
12847 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12848
12849         * Makefile (tests): Add tst-stack1.
12850         * tst-stack1.c: New file.
12851
12852         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12853         provided stack.
12854
12855         * pthread_attr_getstack.c: Return bottom of the thread area.
12856
12857 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12858
12859         * Makefile (libpthread-routines): Add pt-allocrtsig and
12860         pthread_kill_other_threads.
12861         * pt-allocrtsig.c: New file.
12862         * pthread_kill_other_threads.c: New file.
12863         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12864         all three functions.
12865         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12866         allocrtsig.
12867         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12868         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12869         and __libc_allocate_rtsig_private.
12870         * Versions (libpthread): Export pthread_kill_other_threads_np,
12871         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12872
12873 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12874
12875         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12876         the end of the stack.  Adjust computations.
12877         When mprotect call fails dequeue stack and free it.
12878         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12879         attribute.
12880         * pthread_getattr_np.c: Likewise.
12881
12882         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12883         surprises.
12884
12885 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12886
12887         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12888         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12889
12890 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12891
12892         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12893         * pthread_setspecific.c: Likewise.
12894
12895 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12896
12897         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12898         definitions.  Get them from the official place.
12899         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12900
12901         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12902         Use new CLONE_ flags in clone() calls.
12903
12904         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12905         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12906
12907         * Versions: Add pthread_* functions for libc.
12908         * forward.c: New file.
12909
12910         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12911         errno-loc.
12912         * herrno.c: New file.
12913         * res.c: New file.
12914
12915         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12916         sem_trywait, and sem_timedwait.  Add herrno and res.
12917         * sem_init.c: Don't initialize lock and waiters members.
12918         * sem_open.c: Likewise.
12919         * sem_post.c: Removed.
12920         * sem_wait.c: Removed.
12921         * sem_trywait.c: Removed.
12922         * sem_timedwait.c: Removed.
12923         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12924         Includes full implementations of sem_post, sem_wait, sem_trywait,
12925         and sem_timedwait.
12926         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12927         for new implementation.
12928         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12929         and waiters fields.
12930
12931         * tst-sem3.c: Improve error message.
12932         * tst-signal3.c: Likewise.
12933
12934         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12935         to tell the kernel about the termination futex and to initialize tid
12936         member.  Don't initialize main_thread.
12937         * descr.h (struct pthread): Remove main_thread member.
12938         * cancelllation.c (__do_cancel): Remove code handling main thread.
12939         The main thread is not special anymore.
12940
12941         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12942         size of the stacks to stack_cache_actsize.
12943
12944         * pt-readv.c: Add missing "defined".
12945         * pt-sigwait.c: Likewise.
12946         * pt-writev.c: Likewise.
12947
12948 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12949
12950         * Versions: Export __connect from libpthread.
12951         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12952
12953         * Makefile (libpthread-routines): Add pt-raise.
12954         * sysdeps/unix/sysv/linux/raise.c: New file.
12955         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12956         * sysdeps/generic/pt-raise.c: New file.
12957
12958         * pthread_cond_init.c: Initialize all data elements of the condvar
12959         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12960
12961         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12962         * pthread_create.c: Likewise.
12963
12964         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12965         * tst-key1.c: New file.
12966         * tst-key2.c: New file.
12967         * tst-key3.c: New file.
12968
12969         * Versions: Export pthread_detach for version GLIBC_2.0.
12970         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12971
12972 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12973
12974         * pthread_key_create.c: Terminate search after an unused key was found.
12975         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12976
12977         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12978         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12979
12980 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12981
12982         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12983         dynamic lookup for errno in PIC.
12984
12985         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12986         release the stack lock as soon as possible.
12987         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12988         the static TLS block.
12989         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12990
12991         * cancellation.c: Renamed from cancelation.c.
12992         * Makefile: Adjust accordingly.
12993         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12994         * cleanup_defer.c: Use CANCELLATION_P.
12995         * pthread_testcancel.c: Likewise.
12996         * descr.h: Fix spelling in comments.
12997         * init.c: Likewise.
12998         * pthread_getattr_np.c: Likewise.
12999         * pthread_getschedparam.c: Likewise.
13000         * pthread_setschedparam.c: Likewise.
13001         * Versions: Likewise.
13002
13003         * pt-pselect.c: New file.
13004         * Makefile (libpthread-routines): Add pt-pselect.
13005         * Versions: Add pselect.
13006
13007         * tst-cancel4.c: New file.
13008         * Makefile (tests): Add tst-cancel4.
13009
13010 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
13011
13012         * pthread_mutex_lock.c: Always record lock ownership.
13013         * pthread_mutex_timedlock.c: Likewise.
13014         * pthread_mutex_trylock.c: Likewise.
13015
13016         * pt-readv.c: New file.
13017         * pt-writev.c: New file.
13018         * pt-creat.c: New file.
13019         * pt-msgrcv.c: New file.
13020         * pt-msgsnd.c: New file.
13021         * pt-poll.c: New file.
13022         * pt-select.c: New file.
13023         * pt-sigpause.c: New file.
13024         * pt-sigsuspend.c: New file.
13025         * pt-sigwait.c: New file.
13026         * pt-sigwaitinfo.c: New file.
13027         * pt-waitid.c: New file.
13028         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13029         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13030         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13031         * Versions: Add all the new functions.
13032
13033         * tst-exit1.c: New file.
13034         * Makefile (tests): Add tst-exit1.
13035
13036         * sem_timedwait.c: Minor optimization for more optimal fastpath.
13037
13038 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
13039
13040         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13041
13042         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13043         call.  pthread_join is an official cancellation point.
13044         * pthread_timedjoin.c: Likewise.
13045
13046         * pthread_cond_wait.c: Revert order in which internal lock are dropped
13047         and the condvar's mutex are retrieved.
13048         * pthread_cond_timedwait.c: Likewise.
13049         Reported by dice@saros.East.Sun.COM.
13050
13051 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13052
13053         * pthreadP.h: Cut out all type definitions and move them...
13054         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13055         * pthreadP.h: Include <internaltypes.h>.
13056
13057         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13058         performance tweaks.
13059
13060         * sem_trywait.c: Shuffle #includes around to get right order.
13061         * sem_timedwait.c: Likewise.
13062         * sem_post.c: Likewise.
13063         * sem_wait.c: Likewise.
13064
13065         * nptl 0.3 released.
13066
13067         * Makefile (tests): Add tst-signal3.
13068         * tst-signal3.c: New file.
13069
13070 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13071
13072         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13073         the asms modify the sem object.
13074         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13075
13076         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13077         the actual members.
13078         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13079         * semaphoreP.h: Include pthreadP.h.
13080         * sem_getvalue.c: Adjust to sem_t change.
13081         * sem_init.c: Likewise.
13082         * sem_open.c: Likewise.
13083         * sem_post.c: Likewise.
13084         * sem_timedwait.c: Likewise.
13085         * sem_trywait.c: Likewise.
13086         * sem_wait.c: Likewise.
13087
13088 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13089
13090         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13091         * tst-basic2.c: New file.
13092         * tst-exec1.c: New file.
13093         * tst-exec2.c: New file.
13094         * tst-exec3.c: New file.
13095
13096         * tst-fork1.c: Remove extra */.
13097
13098         * nptl 0.2 released.  The API for IA-32 is complete.