Update.
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2
3         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4
5 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6
7         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
8
9 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
10
11         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
12         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
13         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
14         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
15         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
16         Define.
17         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
18         (_POSIX_MESSAGE_PASSING): Define.
19         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
20         (_POSIX_MESSAGE_PASSING): Define.
21         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
22         (_POSIX_MESSAGE_PASSING): Define.
23
24 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
25
26         * tst-context1.c (fct): Check whether correct stack is used.
27
28 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
29
30         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
31         matching constraints for asm mem parameters.
32
33         * tst-clock2.c (tf): Don't define unless needed.
34
35 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
36
37         * Makefile (link-libc-static): Use $(static-gnulib) instead of
38         $(gnulib).
39
40 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
41
42         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
43         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
44         * pthreadP.h: Declare __nptl_deallocate_tsd.
45         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
46         Adjust caller.
47
48         * Makefile (tests): Add tst-tsd5.
49         * tst-tsd5.c: New file.
50
51 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
52
53         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
54         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
55         is SHLIB_COMPAT check.
56         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
57         (__pthread_attr_getaffinity_old): Likewise.
58         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
59         (__pthread_getaffinity_old): Likewise.
60         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
61         (__pthread_setaffinity_old): Likewise.
62
63 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
64
65         * allocatestack.c (_make_stacks_executable): Call
66         _dl_make_stack_executable first.
67
68 2004-03-24  Roland McGrath  <roland@redhat.com>
69
70         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
71         constraint instead of "0".
72
73 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
74
75         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
76         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
77
78         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
79         code to avoid warning.
80
81 2004-03-24  Andreas Jaeger  <aj@suse.de>
82
83         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
84         (__pthread_attr_setaffinity_old): Remove const.
85
86 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
87
88         * sysdeps/unix/sysv/linux/smp.h: New file.
89         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
90         * init.c: Define __is_smp.
91         (__pthread_initialize_minimal_internal): Call is_smp_system to
92         initialize __is_smp.
93         * pthreadP.h: Declare __is_smp.
94         Define MAX_ADAPTIVE_COUNT is necessary.
95         * pthread_mutex_init.c: Add comment regarding __spins field.
96         * pthread_mutex_lock.c: Implement adaptive mutex type.
97         * pthread_mutex_timedlock.c: Likewise.
98         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
99         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
100         Add __spins field.
101         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
102         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
103         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
104         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
105         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
106         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
108         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
109         lll_mutex_cond_trylock.
110         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
111         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
112         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
113         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
114         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
115         Define BUSY_WAIT_NOP.
116         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
117         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
118
119         * tst-mutex5.c: Add support for testing adaptive mutexes.
120         * tst-mutex7.c: Likewise.
121         * tst-mutex5a.c: New file.
122         * tst-mutex7a.c: New file.
123         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
124
125         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
126         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
127         vgettimeofday call might destroy the content.
128
129         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
130         @pause in the loop.
131
132         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
133         No need to restrict type of ret.  Make it int.  Add comment.
134
135         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
136         Remove unnecessary setne instruction.
137
138 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
139
140         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
141         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
142         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
143         If realloc fails, break out of the loop.
144
145 2004-03-20  Andreas Jaeger  <aj@suse.de>
146
147         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
148         (__pthread_setaffinity_old): Fix interface.
149         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
150         (__pthread_getaffinity_old): Likewise.
151
152         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
153         (__pthread_setaffinity_new): Remove duplicate declaration.
154
155 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
156
157         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
158         the return value to a safe register.
159         (CDISABLE): Set the function argument correctly.
160
161 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
162
163         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
164         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
165         Rewrite so that only one locked memory operation per round is needed.
166         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
167         (pthread_barrier_wait): After wakeup, release lock only when the
168         last thread stopped using the barrier object.
169         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
170         (__pthread_cond_wait): Don't store mutex address if the current
171         value is ~0l.  Add correct cleanup support and unwind info.
172         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
173         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
174         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
175         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
176         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
177         Add correct cleanup support and unwind info.
178         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
179         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
180         information for syscall wrappers.
181
182 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
183
184         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
185         cpusetsize field, remove next.
186         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
187         parameter for size of the CPU set.
188         (pthread_setaffinity_np): Likewise.
189         (pthread_attr_getaffinity_np): Likewise.
190         (pthread_attr_setaffinity_np): Likewise.
191         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
192         interface change, keep compatibility code.
193         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
194         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
195         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
196         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
197         __pthread_getaffinity_np.
198         * Versions: Add version for changed interfaces.
199         * tst-attr3.c: Adjust test for interface change.
200         * pthread_getattr_np.c: Query the kernel about the affinity mask with
201         increasing buffer sizes.
202         * pthread_attr_destroy.c: Remove unused list handling.
203         * pthread_attr_init.c: Likewise.
204
205 2004-03-17  Roland McGrath  <roland@redhat.com>
206
207         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
208         first argument to clock_getres so we ever enable kernel timers.
209
210 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
211
212         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
213
214 2004-03-12  Richard Henderson  <rth@redhat.com>
215
216         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
217         oldvalue from CENABLE to CDISABLE.
218
219 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
220
221         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
222         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
223         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
224         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
225
226 2004-03-11  Richard Henderson  <rth@redhat.com>
227
228         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
229         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
230         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
231
232 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
233
234         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
235         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
236         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
237
238 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
239
240         * forward.c (__pthread_cond_broadcast_2_0,
241         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
242         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
243         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
244
245 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
246
247         * sysdeps/sh/tcb-offsets.sym: Add PID.
248         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
249         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
250
251 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
252
253         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
254         include <sysdep-cancel.h>, vfork is no cancellation point.
255         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
256         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
257         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
258
259 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
260
261         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
262         libc_hidden_def.
263         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
264         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
265         Likewise.
266         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
267         Likewise.
268         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
269         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
270         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
271         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
272         of DO_CALL_VIA_BREAK.  Work around a gas problem.
273
274         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
275         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
276         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
277         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
278         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
279         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
280
281         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
282         a local register for saving old PID.  Negate PID in parent upon exit.
283
284         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
285         tcb-offsets.h.
286         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
287         before syscall, set to the old value in the parent afterwards.
288         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
289         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
290         tcb-offsets.h.
291         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
292         before syscall, set to the old value in the parent afterwards.
293         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
294         * sysdeps/s390/tcb-offsets.sym: Add PID.
295
296         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
297         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
298         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
299         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
300         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
301         * sysdeps/sparc/tcb-offsets.sym: Add PID.
302
303 2004-03-10  Andreas Schwab  <schwab@suse.de>
304
305         * sysdeps/ia64/tcb-offsets.sym: Add PID.
306         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
307         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
308
309 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
310
311         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
312         * tst-cancel21.c (do_one_test): Likewise.
313         Reported by Gordon Jin <gordon.jin@intel.com>.
314
315 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
316
317         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
318         if non-zero and set to INT_MIN if zero.
319         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
320         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
321         (SAVE_PID, RESTORE_PID): Define.
322         (__vfork): Use it.
323         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
324         Use relative path to avoid including NPTL i386/vfork.S.
325         (SAVE_PID, RESTORE_PID): Define.
326         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
327         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
328         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
329         tst-vfork2x.
330         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
331         * tst-vfork1.c: New test.
332         * tst-vfork2.c: New test.
333         * tst-vfork1x.c: New test.
334         * tst-vfork2x.c: New test.
335
336 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
337
338         * sysdeps/i386/tcb-offsets.sym: Add PID.
339         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
340         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
341         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
342
343 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
344
345         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
346
347 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
348
349         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
350         _rtld_global_ro.
351
352 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
353
354         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
355         _rtld_global_ro.
356
357         * tst-once4.c: Remove unnecessary macro definition.
358
359         * tst-mutex7.c (do_test): Limit thread stack size.
360         * tst-once2.c (do_test): Likewise.
361         * tst-tls3.c (do_test): Likewise.
362         * tst-tls1.c (do_test): Likewise.
363         * tst-signal3.c (do_test): Likewise.
364         * tst-kill6.c (do_test): Likewise.
365         * tst-key4.c (do_test): Likewise.
366         * tst-join4.c (do_test): Likewise.
367         * tst-fork1.c (do_test): Likewise.
368         * tst-context1.c (do_test): Likewise.
369         * tst-cond2.c (do_test): Likewise.
370         * tst-cond10.c (do_test): Likewise.
371         * tst-clock2.c (do_test): Likewise.
372         * tst-cancel10.c (do_test): Likewise.
373         * tst-basic2.c (do_test): Likewise.
374         * tst-barrier4.c (do_test): Likewise.
375
376 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
377
378         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
379
380 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
381
382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
383         (__pthread_cond_timedwait): Optimize wakeup test.
384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
385         (__pthread_cond_wait): Likewise.
386         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
387         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
388         Likewise.
389
390 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
391
392         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
393         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
394         the atomic instruction needed.
395         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
396         (__lll_mutex_lock_wait): Likewise.
397
398 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
399
400         * Makefile (tests): Add tst-cond14 and tst-cond15.
401         * tst-cond14.c: New file.
402         * tst-cond15.c: New file.
403
404 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
405
406         * sysdeps/pthread/createthread.c (create_thread): Remove use of
407         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
408         needs to be implemented differently to be useful.
409
410 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
411
412         * pthread_attr_setschedparam.c: Don't test priority against limits
413         here.  Set ATTR_FLAG_SCHED_SET flag.
414         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
415         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
416         from parent thread to child.  If attribute is used and scheduling
417         parameters are not inherited, copy parameters from attribute or
418         compute them.  Check priority value.
419         * pthread_getschedparam.c: If the parameters aren't known yet get
420         them from the kernel.
421         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
422         ATTR_FLAG_POLICY_SET flag for thread.
423         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
424         and ATTR_FLAG_POLICY_SET.
425
426         * sysdeps/pthread/createthread.c: Use tgkill if possible.
427
428         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
429         fail if stack address hasn't been set.  Just return 0.
430
431 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
432
433         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
434         libpthread for the files in this list.
435         (CFLAGS-tst-unload): Removed.
436         * tst-unload.c (do_test): Don't use complete path for
437         LIBPHREAD_SO.
438
439         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
440         tst-_res1mod2.
441
442 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
443
444         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
445         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
446         operation per round is needed.
447         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
448         (__lll_mutex_lock_wait): Likewise.
449
450 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
451
452         * tst-cancel9.c (cleanup): Don't print to stderr.
453
454 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
455
456         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
457
458 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
459
460         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
461         (__syscall_error_handler2): Call CDISABLE.
462         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
463         (__syscall_error_handler2): Call CDISABLE.
464
465         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
466         Release lock before the loop, don't reacquire it.
467
468         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
469
470 2004-02-19  Andreas Schwab  <schwab@suse.de>
471
472         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
473         Fix last change.
474
475 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
476
477         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
478         (pthread_barrier_wait): After wakeup, release lock only when the
479         last thread stopped using the barrier object.
480         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
481         (pthread_barrier_wait): Likewise.
482         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
483         Likewise.
484         * Makefile (tests): Add tst-barrier4.
485         * tst-barrier4.c: New file.
486
487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
488         (__pthread_cond_timedwait): Perform timeout test while holding
489         internal lock to prevent wakeup race.
490         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
491         * sysdeps/pthread/pthread_cond_timedwait.c
492         (__pthread_cond_timedwait): Likewise.
493         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
494         (__pthread_cond_timedwait): Likewise.
495
496 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
497
498         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
499         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
500         * Makefile (tests): Add tst-rwlock13.
501         * tst-rwlock13.c: New test.
502
503 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
504
505         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
506         (__condvar_tw_cleanup): Little optimization.
507         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
508
509 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
510
511         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
512         libpthread as "lib" parameter to SHLIB_COMPAT.
513         (__novmx_siglongjmp): Fix typo in function name.
514         (__novmx_longjmp): Fix typo in function name.
515
516 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
517
518         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
519         __builtin_expect.
520
521         * sysdeps/generic/pt-longjmp.c: Moved to...
522         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
523
524 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
525
526         * Makefile (libpthread-routines): Add pt-cleanup.
527         * pt-longjmp.c: Removed.
528         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
529         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
530         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
531         Version longjmp, siglongjmp for GLIBC_2.3.4.
532         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
533
534 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
535
536         * sysdeps/pthread/pthread_cond_timedwait.c
537         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
538         Reuse code.  Add __builtin_expects.
539
540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
541         (__pthread_cond_timedwait): Get internal lock in case timeout has
542         passed before the futex syscall.
543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
544
545 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
546
547         * allocatestack.c: Pretty printing.
548
549         * sysdeps/pthread/createthread.c (create_thread): Don't add
550         CLONE_DETACHED bit if it is not necessary.
551
552 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
553
554         * pthread_getattr_np.c: Include ldsodefs.h.
555
556 2004-01-16  Richard Henderson  <rth@redhat.com>
557
558         * allocatestack.c: Don't declare __libc_stack_end.
559         * init.c (__pthread_initialize_minimal_internal): Likewise.
560         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
561
562 2004-01-15  Richard Henderson  <rth@redhat.com>
563
564         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
565         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
566         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
567         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
568         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
569         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
570         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
571         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
572
573 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
574
575         * init.c (pthread_functions): Make array const.
576
577 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
578
579         * allocatestack.c (__make_stacks_executable): Change interface.
580         Check parameters.  Pass parameter on to libc counterpart.
581         * pthreadP.h: Change declaration.
582
583 2004-01-13  Richard Henderson  <rth@redhat.com>
584
585         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
586         prototype form.
587         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
588         Likewise.
589
590         * sysdeps/alpha/Makefile: New file.
591         * sysdeps/alpha/tcb-offsets.sym: New file.
592         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
593         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
594
595         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
596         on powerpc version.
597
598 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
599
600         * Makefile (tests): Add tst-backtrace1.
601         * tst-backtrace1.c: New test.
602
603 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
604
605         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
606         register as second parameter to the REGISTER macro.
607         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
608         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
609         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
610         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
611         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
612         of thread register as second parameter to REGISTER macro in 64 case.
613
614 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
615
616         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
617         (CFLAGS-getpid.o): Defined.
618         (CFLAGS-getpid.os): Defined.
619
620 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
621
622         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
623         returned for main thread does not overlap with any other VMA.
624         Patch by Jakub Jelinek.
625
626 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
627
628         * tst-raise1.c: Include stdio.h.
629
630 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
631
632         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
633         setting with __ASSUME_TGKILL || defined __NR_tgkill.
634         If pid is 0, set it to selftid.
635         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
636         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
637         != 0, return self->tid without doing a syscall.
638         * descr.h (struct pthread): Move pid field after tid.
639
640         * Makefile (tests): Add tst-raise1.
641         * tst-raise1.c: New file.
642
643 2003-12-23  Roland McGrath  <roland@redhat.com>
644
645         * tst-oddstacklimit.c: New file.
646         * Makefile (tests): Add it.
647         (tst-oddstacklimit-ENV): New variable.
648
649         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
650         value up to page size for __default_stacksize.
651
652 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
653
654         * Makefile (tests): Add tst-eintr5.
655         * tst-eintr5.c: New file.
656
657         * eintr.c (eintr_source): Prevent sending signal to self.
658
659         * tst-eintr2.c (tf1): Improve error message.
660
661 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
662
663         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
664         * sysdeps/unix/sysv/linux/getpid.c: New file.
665         * pthread_cancel.c: Add comment explaining use of PID field.
666         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
667         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
668         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
669         temporarily to signal the field must not be relied on and updated
670         by getpid().
671         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
672         temporarily negative.
673         * sysdeps/unix/sysv/linux/raise.c: Likewise.
674
675 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
676
677         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
678         (eintr_source): If ARG != NULL, use pthread_kill.
679         * tst-eintr1.c: Adjust for this change.
680         * tst-eintr2.c: Likewise.
681         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
682         * tst-eintr3.c: New file.
683         * tst-eintr4.c: New file.
684
685 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
686
687         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
688         if CANCELSTATE_BITMASK is set.
689         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
690         Likewise.
691
692         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
693         (tests-reverse): Add tst-cancel23.
694         * tst-cancel22.c: New test.
695         * tst-cancel23.c: New test.
696
697 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
698
699         * tst-eintr1.c: Better error messages.
700
701         * Makefile (tests): Add tst-eintr2.
702         * tst-eintr2.c: New file.
703
704 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
705
706         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
707         (CFLAGS-tst-cancelx21.c): Set.
708         * tst-cancel21.c: New test.
709         * tst-cancelx21.c: New test.
710
711         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
712         comparison operand.
713         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
714         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
715         * pt-longjmp.c: Include jmpbuf-unwind.h.
716         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
717         _JMPBUF_UNWINDS.  Adjust compared pointers.
718         * init.c (__pthread_initialize_minimal_internal): Initialize
719         pd->stackblock_size.
720         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
721         * sysdeps/alpha/jmpbuf-unwind.h: New file.
722         * sysdeps/i386/jmpbuf-unwind.h: New file.
723         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
724         * sysdeps/s390/jmpbuf-unwind.h: New file.
725         * sysdeps/sh/jmpbuf-unwind.h: New file.
726         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
727         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
728         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
729         (_JMPBUF_CFA_UNWINDS): Remove.
730         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
731
732 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
733
734         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
735         (CFLAGS-tst-cancelx20.c): Set.
736         * tst-cancel20.c: New test.
737         * tst-cancelx20.c: New test.
738
739 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
740
741         * init.c (__pthread_initialize_minimal_internal): Don't treat
742         architectures with separate register stack special here when
743         computing default stack size.
744
745 2003-12-17  Roland McGrath  <roland@redhat.com>
746
747         * Makefile (tst-cancelx7-ARGS): New variable.
748         Reportd by Greg Schafer <gschafer@zip.com.au>.
749
750 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
751
752         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
753         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
754         (tst-stack3-ENV): Set.
755         ($(objpfx)tst-stack3-mem): New.
756         * tst-stack3.c: New test.
757
758 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
759
760         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
761         Add unwind directives.  Drop unused .regstk directive.
762         (_fini_EPILOG_BEGINS): Add unwind directives.
763
764 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
765
766         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
767         Assume parameter is a pointer.
768         (lll_futex_wake): Likewise.
769         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
770         Likewise.
771         (lll_futex_wake): Likewise.
772         Reported by Boris Hu.
773         * sysdeps/unix/sysv/linux/unregister-atfork.c
774         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
775
776         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
777
778 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
779
780         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
781         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
782         __rtld_lock_initialize for ld.so lock.
783         Patch in part by Adam Li <adam.li@intel.com>.
784
785 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
786
787         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
788         in $(gnulib).  Also, remove stale comment.
789
790 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
791
792         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
793         advantage of new syscall stub and optimize accordingly.
794
795         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
796         from SYS_futex, to match expectations of
797         sysdep.h:DO_INLINE_SYSCALL.
798         (lll_futex_clobbers): Remove.
799         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
800         (lll_futex_wake): Likewise.
801         (lll_futex_requeue): Likewise.
802         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
803         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
804         Jelinek).
805         (__lll_mutex_lock): Likewise.
806         (__lll_mutex_cond_lock): Likewise.
807         (__lll_mutex_timed_lock): Likewise.
808         (__lll_mutex_unlock): Likewise.
809         (__lll_mutex_unlock_force): Likewise.
810
811         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
812         comes before the include of <sysdep.h>.
813         (THREAD_SELF_SYSINFO): New macro.
814         (THREAD_SYSINFO): Likewise.
815         (INIT_SYSINFO): New macro.
816         (TLS_INIT_TP): Call INIT_SYSINFO.
817
818         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
819
820         * sysdeps/pthread/createthread.c (create_thread): Use
821         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
822         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
823         THREAD_SELF_SYSINFO instead of open code.
824         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
825         (THREAD_SYSINFO): Likewise.
826
827         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
828
829         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
830
831 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
832
833         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
834         instead of .init.  Patch by David Mosberger.
835
836 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
837
838         * sysdeps/pthread/configure.in: Remove broken declaration in C
839         cleanup handling check.
840
841 2003-11-30  Andreas Jaeger  <aj@suse.de>
842
843         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
844         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
845         Likewise.
846
847 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
848
849         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
850         * pthread_attr_destroy.c: Include shlib-compat.h.
851         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
852         is set in iattr->flags.
853         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
854
855 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
856
857         * Makefile (distribute): Add tst-cleanup4aux.c.
858
859         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
860         include.
861
862 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
863
864         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
865         pthread_cond_signal.
866
867         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
868         store mutex address if the current value is ~0l.
869         * sysdeps/pthread/pthread_cond_timedwait.c
870         (__pthread_cond_timedwait): Likewise.
871         * sysdeps/pthread/pthread_cond_broadcast.c
872         (__pthread_cond_broadcast): Don't use requeue for pshared
873         condvars.
874
875         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
876         (__pthread_cond_wait): Don't store mutex address if the current
877         value is ~0l.
878         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
879         (__pthread_cond_timedwait): Likewise.
880         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
881         (__pthread_cond_broadcast): Don't use requeue for pshared
882         condvars.
883
884         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
885         element with ~0l for pshared condvars, with NULL otherwise.
886
887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
888         (__pthread_cond_wait): Don't store mutex address if the current
889         value is ~0l.
890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
891         (__pthread_cond_timedwait): Likewise.
892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
893         (__pthread_cond_broadcast): Don't use requeue for pshared
894         condvars.
895
896         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
897         * tst-cond12.c: New file.
898         * tst-cond13.c: New file.
899
900 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
901
902         * sysdeps/pthread/configure.in: Make missing forced unwind support
903         fatal.
904
905 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
906
907         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
908
909 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
910
911         * Makefile: Add magic to clean up correctly.
912
913 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
914
915         * unwind.c (FRAME_LEFT): Define.
916         (unwind_stop): Handle old style cleanups here.
917         (__pthread_unwind): Handle old style cleanups only if
918         !HAVE_FORCED_UNWIND.
919         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
920         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
921         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
922         ($(objpfx)tst-cleanupx4): Likewise.
923         * tst-cleanup4.c: New test.
924         * tst-cleanup4aux.c: New.
925         * tst-cleanupx4.c: New test.
926
927 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
928
929         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
930         lll_mutex_*lock macros to skip atomic operations on some archs.
931
932 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
933
934         * sysdeps/pthread/tst-timer.c (main): Initialize
935         sigev2.sigev_value as well.
936
937 2003-10-15  Roland McGrath  <roland@redhat.com>
938
939         * sysdeps/pthread/configure.in: Barf if visibility attribute support
940         is missing.
941         * sysdeps/pthread/configure: Regenerated.
942
943 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
944
945         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
946         locking macros.  No distinction between normal and mutex locking
947         anymore.
948         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
949         Merge bits from lowlevelmutex.S we still need.
950         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
951         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
952         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
953         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
954         new mutex implementation.
955         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
956         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
957         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
958         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
959         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
962         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
964         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
965         symbol for entry point to avoid cancellation.
966
967 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
968
969         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
970         changes.
971         (SAVE_OLDTYPE_0): Fix a typo.
972
973 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
974
975         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
976         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
977
978 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
979
980         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
981         correct offset.
982
983 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
984
985         * Makefile (tests): Add tst-cancel19.
986         * tst-cancel19.c: New test.
987
988 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
989
990         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
991         restoring of the old cancellation type.
992
993 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
994
995         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
996
997 2003-09-27  Wolfram Gloger  <wg@malloc.de>
998
999         * sysdeps/pthread/malloc-machine.h: New file
1000
1001 2003-09-24  Roland McGrath  <roland@redhat.com>
1002
1003         * allocatestack.c (__make_stacks_executable): Don't ignore return
1004         value from _dl_make_stack_executable.
1005
1006 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
1007
1008         * allocatestack.c (__make_stacks_executable): Also change
1009         permission of the currently unused stacks.
1010
1011         * allocatestack.c (change_stack_perm): Split out from
1012         __make_stacks_executable.
1013         (allocate_stack): If the required permission changed between the time
1014         we started preparing the stack and queueing it, change the permission.
1015         (__make_stacks_executable): Call change_stack_perm.
1016
1017         * Makefile: Build tst-execstack-mod locally.
1018         * tst-execstack-mod.c: New file.
1019
1020 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
1021
1022         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1023
1024 2003-09-23  Roland McGrath  <roland@redhat.com>
1025
1026         * tst-execstack.c: New file.
1027         * Makefile (tests): Add it.
1028         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1029         (LDFLAGS-tst-execstack): New variable.
1030
1031         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1032         whether to use PROT_EXEC for stack mmap.
1033         (__make_stacks_executable): New function.
1034         * pthreadP.h: Declare it.
1035         * init.c (__pthread_initialize_minimal_internal): Set
1036         GL(dl_make_stack_executable_hook) to that.
1037
1038 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
1039
1040         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1041         recommendation from AMD re avoidance of lock prefix.
1042
1043 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
1044
1045         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1046         lll_futex_timed_wait instead of lll_futex_wait.
1047         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1048         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1049         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1050         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1051         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1052         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1053         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1054         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1055         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1056         Completely revamp the locking macros.  No distinction between
1057         normal and mutex locking anymore.
1058         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1059         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1060         __lll_lock_timedwait): Fix prototypes.
1061         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1062         __lll_lock_timedwait): Likewise.
1063         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1064         macros, add __builtin_expect.
1065         (lll_mutex_timedlock): Likewise.  Fix return value.
1066         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1067         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1068         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1069         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1070         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1071         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1072         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1073         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1074
1075 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
1076
1077         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1078         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1079         operation if possible.
1080
1081         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1082         like jumping over the lock prefix.
1083
1084 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
1085
1086         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1087         locking macros.  No distinction between normal and mutex locking
1088         anymore.
1089         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1090         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1091         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1092         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1093         locking.  Merge bits from lowlevelmutex.S we still need.
1094         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1095         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1096         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
1097         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
1098         * Makefile (routines): Remove libc-lowlevelmutex.
1099         (libpthread-rountines): Remove lowlevelmutex.
1100         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1101         for new mutex implementation.
1102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1105         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1106         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1107         Likewise.
1108         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1109         Likewise.
1110         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1112         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1116         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1117         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1118         Likewise.
1119         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1120         Likewise.
1121         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1124         Don't use requeue.
1125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1126         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
1127
1128 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
1129
1130         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1131         in parameters of asm with output parameters.
1132
1133         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1134         type of DECR parameter to int.
1135         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
1136
1137 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
1138
1139         * tst-attr3.c (tf, do_test): Print stack start/end/size and
1140         guardsize for each thread.
1141
1142 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
1143
1144         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1145         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1146         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
1147
1148         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1149         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
1150         NULL.
1151         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
1152         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
1153         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1154         (pthread_getaffinity_np): Add hidden_def.
1155
1156         * Makefile (tests): Add tst-attr3.
1157         * tst-attr3.c: New test.
1158
1159         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
1160
1161 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
1162
1163         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
1164         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
1165
1166 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
1167
1168         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
1169         * tst-align.c: Include tst-stack-align.h.
1170         (tf, do_test): Use TEST_STACK_ALIGN macro.
1171
1172 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
1173
1174         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
1175         variable.
1176
1177 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
1178
1179         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
1180         stack-related values for the initial thread.
1181
1182 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
1183
1184         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1185
1186 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
1187
1188         * pthread_mutex_lock.c: Minor code rearrangements.
1189
1190 2003-09-05  Roland McGrath  <roland@redhat.com>
1191
1192         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1193         Instead, include ../nptl_db/db_info.c to do its magic.
1194         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1195         (__pthread_pthread_key_2ndlevel_size): Likewise.
1196         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1197         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1198         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1199         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1200         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1201         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1202         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1203         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1204         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1205         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1206         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1207         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1208         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1209         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1210         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1211         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1212         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1213
1214 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
1215
1216         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1217         of pthread_t to be compatible with LT.
1218         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1219         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1220         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1221         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1222         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1223         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1224         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1225
1226 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
1227
1228         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1229
1230 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
1231
1232         * unwind-forcedunwind.c: Move to...
1233         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1234         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1235         * sysdeps/pthread/jmpbuf-unwind.h: New file.
1236         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1237         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1238         * unwind.c: Include jmpbuf-unwind.h.
1239         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1240
1241 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
1242
1243         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1244         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1245         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1246         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1247         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1248         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1249         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1250         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1251         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1252         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1253         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1254         function.
1255         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1256         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1257         * Makefile (tests): Add tst-stack2.
1258         * tst-stack2.c: New test.
1259         * tst-stack1.c: Include limits.h and sys/param.h.
1260         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1261
1262         * pthread_condattr_setpshared.c: Include errno.h.
1263         (pthread_condattr_setpshared): Return EINVAL if pshared
1264         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1265
1266         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1267         defined symbol for entry point to avoid cancellation.
1268         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1269         Likewise.
1270         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1271         Likewise.
1272         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1273         Likewise.
1274         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1275         Likewise.
1276         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1277         Likewise.
1278         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1279         __close_nocancel, __read_nocancel, __write_nocancel,
1280         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
1281         libpthread.so or librt.so, define to corresponding function
1282         without _nocancel suffix.
1283         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
1284         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
1285         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
1286
1287         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
1288
1289 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
1290
1291         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1292         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
1293
1294         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
1295         in subsections has a symbol associated with it.
1296
1297         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
1298         defined symbol for entry point to avoid cancellation.
1299         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
1300
1301 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
1302
1303         * Makefile (tests): Add tst-tls5.
1304         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
1305         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1306         ($(objpfx)tst-tls5): New.
1307         ($(objpfx)tst-tls6.out): Likewise.
1308         (tests): Depend on $(objpfx)tst-tls6.out.
1309         * tst-tls3.c: Include stdint.h and pthreaddef.h.
1310         (do_test): Check pthread_self () return value alignment.
1311         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
1312         (tf): Check pthread_self () return value alignment.
1313         * tst-tls5.c: New test.
1314         * tst-tls5.h: New.
1315         * tst-tls5mod.c: New.
1316         * tst-tls5moda.c: New.
1317         * tst-tls5modb.c: New.
1318         * tst-tls5modc.c: New.
1319         * tst-tls5modd.c: New.
1320         * tst-tls5mode.c: New.
1321         * tst-tls5modf.c: New.
1322         * tst-tls6.sh: New test.
1323
1324         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1325         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
1326         * init.c (pthread_functions): Initialize them.
1327         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1328         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1329         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1330         pthread_cond_timedwait@@GLIBC_2.3.2.
1331
1332 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
1333
1334         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
1335         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
1336         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
1337         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
1338         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
1339         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1340
1341         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1342
1343         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
1344         _POSIX_THREAD_PRIORITY_SCHEDULING.
1345         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1346
1347 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
1348
1349         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
1350         nested function, use static inline function from libio.h.
1351         Code by Richard Henderson.
1352
1353         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
1354         weak.
1355
1356 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
1357
1358         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
1359         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
1360         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
1361         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
1362         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
1363         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
1364         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1365         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1366         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
1367         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
1368         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
1369         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
1370         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
1371         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
1372         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1373         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
1374         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
1375         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
1376         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
1377         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
1378         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
1379         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
1380         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
1381         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
1382         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
1383         * sysdeps/sparc/tls.h: New file.
1384         * sysdeps/sparc/tcb-offsets.sym: New file.
1385         * sysdeps/sparc/Makefile: New file.
1386         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
1387         * init.c [__sparc__] (__NR_set_tid_address): Define.
1388
1389 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
1390
1391         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
1392         _IO_release_lock): Define.
1393
1394 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
1395
1396         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
1397         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
1398
1399 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
1400
1401         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
1402         (__pthread_cleanup_class): Add missing return types of member
1403         functions.
1404
1405 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
1406
1407         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1408         (lll_mutex_unlock_force): Add memory barrier between store and futex
1409         syscall.
1410
1411 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
1412
1413         * tst-cancel4.c (do_test): Also unlink tempfname and remove
1414         tempmsg in first loop.
1415
1416 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
1417
1418         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1419         _POSIX_THREAD_PRIORITY_SCHEDULING.
1420         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1421
1422 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
1423
1424         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
1425         (__rtld_lock_default_lock_recursive,
1426         __rtld_lock_default_unlock_recursive): Define.
1427         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
1428         __rtld_lock_unlock_recursive): Define using
1429         GL(_dl_rtld_*lock_recursive).
1430         * init.c (__pthread_initialize_minimal_internal): Initialize
1431         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
1432         Lock GL(_dl_load_lock) the same number of times as
1433         GL(_dl_load_lock) using non-mt implementation was nested.
1434
1435         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
1436         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
1437
1438 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
1439
1440         * tst-cancel17.c (do_test): Make len2 maximum of page size and
1441         PIPE_BUF.
1442
1443 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
1444
1445         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
1446
1447 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
1448
1449         * sysdeps/pthread/createthread.c (do_clone): Move error handling
1450         to first syscall error check.  Move syscall error check for tkill
1451         into __ASSUME_CLONE_STOPPED #ifdef.
1452
1453 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
1454
1455         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
1456         is not defined, do explicit synchronization.
1457         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
1458         is not defined also unlock pd->lock for non-debugging case in case
1459         it is necessary.
1460         * pthread_create.c (start_thread): Always get and release pd->lock
1461         if __ASSUME_CLONE_STOPPED is not defined.
1462         (start_thread_debug): Removed.  Adjust users.
1463         * allocatestack.c (allocate_stack): Always initialize lock if
1464         __ASSUME_CLONE_STOPPED is not defined.
1465         * Makefile (tests): Add tst-sched1.
1466         * tst-sched1.c: New file.
1467
1468         * sysdeps/pthread/createthread.c (do_clone): Only use
1469         sched_setschduler and pass correct parameters.
1470
1471 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
1472
1473         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
1474         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
1475         PTHREAD_STACK_MIN in comments.
1476
1477 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
1478
1479         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1480         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
1481         argument.
1482         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
1483         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
1484         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
1485         (__pthread_cleanup_upto): Fix prototype.
1486         (_longjmp_unwind): Adjust caller.
1487         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
1488         Change second argument to const struct pointer.
1489         * tst-sem8.c (main): Remove unused s2 and s3 variables.
1490         * tst-sem9.c (main): Likewise.
1491         * unwind.c: Include string.h for strlen prototype.
1492
1493 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
1494
1495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1496         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
1497         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
1498         Define HAVE_CMOV.
1499         Patch by Nicholas Miell <nmiell@attbi.com>.
1500
1501 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
1502
1503         * init.c (__pthread_initialize_minimal_internal): Initialize
1504         GL(dl_init_static_tls).
1505         * pthreadP.h (__pthread_init_static_tls): New prototype.
1506         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
1507         New functions.
1508         * Makefile (tests): Add tst-tls4.
1509         (modules-names): Add tst-tls4moda and tst-tls4modb.
1510         ($(objpfx)tst-tls4): Link against libdl and libpthread.
1511         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
1512         tst-tls4modb.so.
1513         * tst-tls4.c: New file.
1514         * tst-tls4moda.c: New file.
1515         * tst-tls4modb.c: New file.
1516
1517 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
1518
1519         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
1520         before __timer_dealloc.
1521         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
1522         Don't call list_unlink.
1523
1524 2003-07-29  Roland McGrath  <roland@redhat.com>
1525
1526         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
1527
1528 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
1529
1530         * tst-cancel17.c (do_test): Check if aio_cancel failed.
1531         Don't reuse struct aiocb A if it failed.
1532         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
1533         not just one byte, as that does not block.
1534
1535 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
1536
1537         * sysdeps/pthread/unwind-resume.c: New file.
1538         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
1539         unwind-resume in csu subdir.
1540         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
1541         exceptions.
1542         (librt-sysdep_routines, librt-shared-only-routines): Add
1543         rt-unwind-resume.
1544         * sysdeps/pthread/rt-unwind-resume.c: New file.
1545         * unwind-forcedunwind.c: New file.
1546         * Makefile (libpthread-routines): Add unwind-forcedunwind.
1547         (libpthread-shared-only-routines): Likewise.
1548         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
1549         * pthreadP.h (pthread_cancel_init): New prototype.
1550         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
1551
1552         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
1553         attr argument const struct pthread_attr *.
1554
1555         * res.c (__res_state): Return __resp.
1556         * descr.h: Include resolv.h.
1557         (struct pthread): Add res field.
1558         * pthread_create.c: Include resolv.h.
1559         (start_thread): Initialize __resp.
1560         * Makefile (tests): Add tst-_res1.
1561         (module-names): Add tst-_res1mod1, tst-_res1mod2.
1562         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1563         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1564         libpthread.
1565         * tst-_res1.c: New file.
1566         * tst-_res1mod1.c: New file.
1567         * tst-_res1mod2.c: New file.
1568
1569 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
1570
1571         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
1572
1573         * Makefile: Define various *-no-z-defs variables for test DSOs
1574         which has undefined symbols.
1575
1576 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
1577
1578         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1579         Retry if the stwcx fails to store once_control.
1580
1581 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
1582
1583         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
1584         pthread_attr_setaffinity.
1585         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
1586         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
1587         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
1588         * pthread_attr_destroy.c: Free cpuset element if allocated.
1589         * pthread_create.c: Pass iattr as additional parameter to
1590         create_thread.
1591         * sysdeps/pthread/createthread.c: If attribute is provided and
1592         a new thread is created with affinity set or scheduling parameters,
1593         start thread with CLONE_STOPPED.
1594         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
1595         pthread_attr_setaffinity.
1596         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1597         cpuset element.
1598
1599 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
1600
1601         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
1602
1603 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
1604
1605         * sysdeps/pthread/configure.in: Require CFI directives also for
1606         ppc and s390.
1607
1608 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
1609
1610         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1611         Add cfi directives.
1612
1613 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1614
1615         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
1616         CLEANUP_JMP_BUF.
1617         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
1618         registers as variables.  Call __pthread_mutex_unlock_usercnt.
1619         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1620         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
1621         not self pointer in __writer.  Compare with TID to determine
1622         deadlocks.
1623         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1624         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1625         Likewise.
1626         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1627         Likewise.
1628         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
1629         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1630         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
1631         macros also when compiling librt.
1632
1633 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
1634
1635         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
1636         -fasynchronous-unwind-tables.
1637         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1638         (PSEUDO): Add cfi directives.
1639         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
1640         Likewise.
1641         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1642         Likewise.
1643
1644 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
1645
1646         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
1647         __pthread_unregister_cancel): Add prototypes and hidden_proto.
1648         * unwind.c (__pthread_unwind_next): Add hidden_def.
1649         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
1650         Likewise.
1651         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1652         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1653         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1654         Likewise.
1655         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1656         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1657         Likewise.
1658         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
1659         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
1660         __pthread_unregister_cancel and __pthread_unwind_next.
1661
1662 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1663
1664         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1665         different symbol for the cancellation syscall wrapper and
1666         non-cancellation syscall wrapper.
1667         (PSEUDO_END): Define.
1668
1669 2003-07-05  Richard Henderson  <rth@redhat.com>
1670
1671         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1672         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
1673         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1674         return actual return value from the syscall, not 0.
1675
1676 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
1677
1678         * descr.h (struct pthread): Add pid field.
1679         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
1680         (__reclaim_stacks): Likewise.
1681         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
1682         also check for PID of the signal source.
1683         (__pthread_initialize_minimal_internal): Also initialize pid field
1684         of initial thread's descriptor.
1685         * pthread_cancel.c: Use tgkill instead of tkill if possible.
1686         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1687         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
1688         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1689         * sysdeps/unix/sysv/linux/raise.c: Likewise.
1690
1691 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
1692
1693         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
1694         Fix use of parameter.
1695         (__libc_cleanup_pop): Likewise.
1696
1697 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
1698
1699         * init.c (sigcancel_handler): Change parameters to match handler
1700         for SA_SIGACTION.  Check signal number and code to recognize
1701         invalid invocations.
1702
1703 2003-07-03  Roland McGrath  <roland@redhat.com>
1704
1705         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
1706         Apply sizeof (struct pthread) bias to r13 value.
1707
1708 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
1709
1710         * sysdeps/pthread/configure.in: Require CFI directives.
1711
1712         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
1713         definition.
1714         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
1715         libpthread compilation.
1716         * unwind.c (__pthread_unwind): Add hidden_def.
1717         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
1718
1719 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
1720
1721         * libc-cancellation.c (__libc_cleanup_routine): Define.
1722         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
1723         (__pthread_cleanup_pop): Define.
1724
1725 2003-07-01  Richard Henderson  <rth@redhat.com>
1726
1727         * sysdeps/alpha/elf/pt-initfini.c: New file.
1728         * sysdeps/alpha/pthread_spin_lock.S: New file.
1729         * sysdeps/alpha/pthread_spin_trylock.S: New file.
1730         * sysdeps/alpha/pthreaddef.h: New file.
1731         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
1732         * sysdeps/alpha/tls.h: New file.
1733         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1734         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
1735         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
1736         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
1737         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
1738         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
1739         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
1740         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
1741         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
1742         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1743
1744 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
1745
1746         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
1747         cleanup support and unwind info.
1748
1749 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
1750
1751         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1752         Use correct cleanup handler registration.  Add unwind info.
1753         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
1754         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
1755         * tst-once3.c: Add cleanup handler and check it is called.
1756         * tst-once4.c: Likewise.
1757         * tst-oncex3.c: New file.
1758         * tst-oncex4.c: New file.
1759         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
1760
1761 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
1762
1763         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
1764
1765 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
1766
1767         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
1768         (tf_msgsnd): Likewise.
1769
1770         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
1771         premature returns a bit more.
1772
1773 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
1774
1775         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
1776         definition to the front.
1777
1778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
1779         the cleanup functions to make the names unique.  Fix dwarf opcode
1780         un unwind table.
1781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
1782         functions to make the names unique.  Fix CFA offset for two blocks.
1783
1784 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
1785
1786         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
1787         missing closing braces.
1788         Patch by Christophe Saout <christophe@saout.de>.
1789
1790 2003-06-24  Roland McGrath  <roland@redhat.com>
1791
1792         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
1793
1794 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
1795
1796         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
1797         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
1798
1799         * pthreadP.h: Declare __find_thread_by_id.
1800         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
1801         * pthread_clock_gettime.c: Allow using other thread's clock.
1802         * pthread_clock_settime.c: Likewise.
1803         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1804         * Makefile: Add rules to build and run tst-clock2.
1805         * tst-clock2.c: New file.
1806
1807 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
1808
1809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
1810         to use exception-based cleanup handler.
1811         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1812
1813         * tst-cond8.c (ch): Announce that we are done.
1814
1815         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
1816
1817         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
1818         Also test aio_suspend with timeout value.
1819
1820 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
1821
1822         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
1823         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
1824         attribute_hidden.
1825
1826         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
1827         (__pthread_mutex_lock_internal): Likewise.
1828         (__pthread_mutex_unlock_internal): Likewise.
1829         (__pthread_mutex_unlock_usercnt): Declare.
1830         * pthread_mutex_destroy.c: Always fail if used in any way.
1831         * pthread_mutex_init.c: Update comment.
1832         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
1833         * pthread_mutex_timedlock.c: Adjust __nusers.
1834         * pthread_mutex_trylock.c: Adjust __nusers.
1835         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
1836         and public interfaces are wrapper with pass additional parameter.
1837         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
1838         parameter zero.
1839         * tst-mutex8.c: New file.
1840         * Makefile (tests): Add tst-mutex8.
1841         * sysdeps/pthread/pthread_cond_timedwait.c: Call
1842         __pthread_mutex_unlock_usercnt.
1843         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1845         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1848         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
1849         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1850         Add __nusers.
1851         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1852         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1853         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1854         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1855         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1856
1857         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
1858         * pthread_mutex_timedlock.c: Likewise.
1859         * pthread_mutex_trylock.c: Adjust __nusers.
1860         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
1861         * tst-mutex9.c: New file.
1862         * Makefile (tests): Add tst-mutex9.
1863         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
1864         * sysdeps/ia64/tls.h: Likewise.
1865         * sysdeps/powerpc/tls.h: Likewise.
1866         * sysdeps/s390/tls.h: Likewise.
1867         * sysdeps/sh/tls.h: Likewise.
1868         * sysdeps/x86_64/tls.h: Likewise.
1869         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1870         Change type of __owner.
1871         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1872         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1873         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1874         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1875         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1876
1877 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
1878
1879         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
1880         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
1881
1882         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
1883         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
1884         instead of nr to lll_futex_wake.  Only set errno and return -1
1885         if err < 0.
1886
1887         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
1888         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1889         return actual return value from the syscall, not 0.
1890
1891 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
1892
1893         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
1894         find a random value.
1895         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
1896         errno==EIDRM.
1897
1898         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
1899         compat_timer_settime.
1900         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
1901         compat_timer_gettime.
1902         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
1903         compat_timer_getoverrun.
1904         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
1905         compat_timer_delete.
1906
1907         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
1908         error-checking mutex detect busy mutexes.
1909
1910 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
1911
1912         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
1913         Add ax to clobber list.
1914         (lll_mutex_cond_lock): Likewise.
1915         (lll_mutex_unlock): Likewise.
1916         (lll_lock): Likewise.
1917         (lll_unlock): Likewise.
1918
1919         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
1920         * tst-cancel18.c: New file.
1921         * tst-cancelx18.c: New file.
1922
1923         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
1924         and tcdrain.
1925
1926         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
1927         * tst-cancel17.c: New file.
1928         * tst-cancelx17.c: New file.
1929
1930         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1931         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1932         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1933
1934         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
1935
1936 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
1937
1938         * sysdeps/pthread/createthread.c (create_thread): Set
1939         header.multiple_threads unconditionally.
1940         * allocatestack.c (allocate_stack): Likewise.
1941         * descr.h (struct pthread): Add header.multiple_threads
1942         unconditionally.
1943         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
1944         Define for librt.  #error if neither libpthread, libc nor librt.
1945         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
1946         Likewise.
1947         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
1948         CDISABLE): Likewise.
1949         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
1950         CDISABLE): Likewise.
1951         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
1952         CDISABLE): Likewise.
1953         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
1954         CDISABLE): Likewise.  Access header.multiple_threads outside of
1955         libc and libpthread.
1956         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
1957         Likewise.
1958         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1959         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
1960
1961 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
1962
1963         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
1964         Also test early cancellation before the thread reaches the cancellation
1965         point.
1966
1967         * Makefile: Compile forward.c with exceptions.
1968
1969         * sysdeps/unix/sysv/linux/sleep.c: New file.
1970
1971 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
1972
1973         * Makefile: Add CFLAGS definition to compile function wrappers
1974         duplicated from libc with exceptions.
1975         * tst-cancel4.c: Also check cancellation handlers.
1976
1977         * Makefile: Add rules to build and run tst-cancel16 and
1978         tst-cancelx16.  Add missing CFLAGS definitions.
1979         * tst-cancel16.c: New file.
1980         * tst-cancelx16.c: New file.
1981
1982 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
1983
1984         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1985         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
1986         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1987         (DL_SYSINFO_IMPLEMENTATION): Likewise.
1988
1989         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
1990         (LIBC_CANCEL_RESET): Likewise.
1991         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
1992         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
1993         librt-cancellation.
1994         (CFLAGS-libcrt-cancellation.c): Define.
1995         * sysdeps/pthread/librt-cancellation.c: New file.
1996         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
1997         macros also when compiling librt.
1998         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1999         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2000         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2001         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2002         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2003         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2004         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2005
2006         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2007         compat_timer_create.
2008
2009 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
2010
2011         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2012
2013         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2014         __register_atfork.
2015         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2016         Add libc_hidden_def.
2017
2018 2003-06-13  Roland McGrath  <roland@redhat.com>
2019
2020         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2021         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2022
2023 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
2024
2025         * allocatestack.c (queue_stack): Always inline.
2026         * ptreadhP.h (__do_cancel): Likewise.
2027
2028 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
2029
2030         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2031         a typo.
2032
2033 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
2034
2035         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2036         (__pthread_cond_signal): Remove incorrect second addition for
2037         cond_lock!=0.
2038
2039 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
2040
2041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2042         (__pthread_cond_signal): Use correct futex pointer in
2043         __lll_mutex_lock_wait call.
2044
2045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2046         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2047
2048 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
2049
2050         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2051         cancelable.
2052         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2053         Likewise.
2054
2055         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2056         hand-written CFI generation code.  Since ENTRY/END also initiated
2057         CFI frames this caused two CFI sets to be generated.
2058
2059 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
2060
2061         * cleanup_routine.c: New file.
2062         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2063         * sysdeps/pthread/pthread.h: Add support for fully exception-based
2064         cleanup handling.
2065         * Makefile (libpthread-routines): Add cleanup_routine.
2066         Add more CFLAGS variables to compile with exceptions.  Add comments
2067         why which file needs unwind tables.
2068         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2069         tests.
2070         * tst-cancelx1.c: New file.
2071         * tst-cancelx2.c: New file.
2072         * tst-cancelx3.c: New file.
2073         * tst-cancelx4.c: New file.
2074         * tst-cancelx5.c: New file.
2075         * tst-cancelx6.c: New file.
2076         * tst-cancelx7.c: New file.
2077         * tst-cancelx8.c: New file.
2078         * tst-cancelx9.c: New file.
2079         * tst-cancelx10.c: New file.
2080         * tst-cancelx11.c: New file.
2081         * tst-cancelx12.c: New file.
2082         * tst-cancelx13.c: New file.
2083         * tst-cancelx14.c: New file.
2084         * tst-cancelx15.c: New file.
2085         * tst-cleanupx0.c: New file.
2086         * tst-cleanupx0.expect: New file.
2087         * tst-cleanupx1.c: New file.
2088         * tst-cleanupx2.c: New file.
2089         * tst-cleanupx3.c: New file.
2090
2091         * tst-cleanup0.c: Make standard compliant.
2092         * tst-cleanup1.c: Likewise.
2093
2094         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2095         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2096         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2097         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2098         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2099         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2100         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2101         CLEANUP_JMP_BUF.
2102         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2103         * tst-cancel12.c: New file.
2104         * tst-cancel13.c: New file.
2105         * tst-cancel14.c: New file.
2106         * tst-cancel15.c: New file.
2107         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2108         and tst-cancel15.
2109
2110         * tst-cancel1.c: Add some comments.
2111
2112         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2113         timeout correctly.
2114
2115 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
2116
2117         * Makefile (CFLAGS-pthread_cancel.c): Define.
2118
2119 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
2120
2121         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2122         Change type of __writer element to int.
2123         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2124         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2125         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2126         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2127         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2128         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2129         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2130         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2131         Compare with TID to determine deadlocks.
2132         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2133         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2134         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2135         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2136         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2137         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2138         Likewise.
2139         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2140         Likewise.
2141         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2143         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2144         Likewise.
2145         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2146         Likewise.
2147         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2148         * Makefile (tests): Add tst-rwlock12.
2149         * tst-rwlock12.c: New file.
2150
2151 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
2152
2153         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
2154         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
2155         Remove bogus hidden_proto.
2156         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2157         Likewise.
2158         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
2159         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
2160         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
2161         ___lll_mutex_timedlock): Likewise.
2162
2163 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
2164
2165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2166         (__pthread_cond_signal): Add some code to eventually handle
2167         cond_lock!=0.
2168
2169 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
2170
2171         * Makefile (tests): Add tst-exec4.
2172         (tst-exec4-ARGS): Define.
2173         * tst-exec4.c: New file.
2174
2175 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
2176
2177         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2178         Also fail if tv_nsec < 0.
2179         (__lll_timedwait_tid): Likewise.
2180         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2181         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2182         Likewise.
2183         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2184         Likewise.
2185         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2186         Likewise.
2187         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2188         Likewise.
2189         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2190         Likewise.
2191         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2192         Likewise.
2193
2194         * Makefile (tests): Add tst-sem8 and tst-sem9.
2195         * tst-sem8.c: New file.
2196         * tst-sem9.c: New file.
2197         * sem_open.c: Fix creation of in_use record if the file exists but
2198         no internal record.
2199
2200         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2201         definitions.
2202
2203         * sysdeps/pthread/timer_create.c (timer_create): In case
2204         evp==NULL, assign timer ID to sival_ptr.
2205
2206         * descr.h (struct pthread_unwind_buf): Change type of prev element to
2207         struct pthread_unwind_buf *.
2208         (struct pthread): Likewise for cleanup_jmp_buf element.
2209
2210         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2211         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2212         * unwind.c (__pthread_unwind_next): Likewise.
2213
2214 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
2215
2216         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2217         (lll_futex_timed_wait): Use int for futex value parameter.
2218         (lll_futex_wake): Likewise.
2219         (lll_futex_requeue): Likewise.
2220
2221         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2222         Replace one memory operation with one register operation.
2223
2224         * tst-join4.c (do_test): Fix error message.
2225
2226         * tst-rwlock6.c (do_test): Use correct format specifier.
2227
2228         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2229         (__lll_mutex_lock_wait): Replace one memory operation with one
2230         register operation.
2231         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2232         (__lll_mutex_lock_wait): Likewise.
2233
2234         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2235         (__lll_mutex_cond_lock): Add one to value parameter of
2236         __lll_lock_wait to reflect reality in the futex syscall.
2237         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2238         (lll_mutex_cond_lock): Likewise.
2239
2240 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
2241
2242         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2243         New function.
2244         (lll_mutex_cond_lock): Define.
2245
2246 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
2247
2248         * Makefile (tests): Add tst-signal6.
2249         * tst-signal6.c: New file.
2250
2251         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2252         (__lll_mutex_unlock_force): New function
2253         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2254
2255         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2256         (__lll_mutex_unlock_force): New function.
2257         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2258
2259         * tst-rwlock7.c (do_test): Use correct format specifier.
2260
2261         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2262         Find break parameter in correct asm argument.
2263
2264 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
2265
2266         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2267         Remove out4.
2268         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2269         error occured.
2270         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2271         Add __mutex.
2272         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2273         lll_futex_requeue, lll_mutex_unlock_force): Define.
2274
2275 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
2276
2277         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2278         (pthread_cond_t): Add __mutex.
2279         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
2280         lll_futex_requeue, lll_mutex_unlock_force): Define.
2281
2282 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2283
2284         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
2285         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2286         Add __mutex field.
2287         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
2288         Define.
2289         (lll_futex_wait, lll_futex_wake): Define.
2290         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
2291         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
2292         FUTEX_REQUEUE instead of FUTEX_WAIT.
2293         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2294         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
2295         mutex which was used in condvar structure.  Call
2296         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
2297         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2298
2299         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
2300         include tcb-offsets.h.  Read wakeup value in locked region.
2301         Use the value of gbr register as THREAD_ID.
2302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2305
2306         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
2307         macros.
2308
2309 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
2310
2311         * sysdeps/pthread/pthread_cond_broadcast.c
2312         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
2313
2314 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
2315
2316         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
2317         typo in register name.
2318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
2319         correctly.  Actually use requeue.  Little optimization.
2320         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
2321         mutex address early.  Handle cancellation state as 32-bit value.
2322         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2323         Remove unnecessary label.
2324
2325 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
2326
2327         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
2328         instead of FUTEX_WAIT.
2329         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
2330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2333         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2334         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
2335         used in condvar structure.  Call __pthread_mutex_cond_lock instead
2336         of __pthread_mutex_lock_internal.
2337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2338         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2339         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2340         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
2341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2343         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
2344         Add pthread_mutex_cond_lock.
2345         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
2346         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
2347         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
2348         lll_mutex_cond_lock.
2349         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2350         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2351         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2352         Add __mutex field.
2353         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2354         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2355
2356         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
2357         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2358
2359         * pthreadP.h: Declare __pthread_mutex_cond_lock.
2360         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
2361         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
2362         macro don't define aliases.
2363
2364         * cancellation.c: Remove __pthread_enable_asynccancel_2.
2365         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
2366         * sysdeps/pthread/pthread_cond_timedwait.c: Use
2367         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
2368         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2369         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2370         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2373
2374 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
2375
2376         * sem_open.c: Fix one endless loop.  Implement correct semantics
2377         wrt opening the same semaphore more then once.
2378         * sem_close.c: Adjust for sem_open change.
2379         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
2380         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
2381         * Makefile (tests): Add tst-sem7.
2382         * tst-sem7.c: New file.
2383
2384 2003-05-16  Roland McGrath  <roland@redhat.com>
2385
2386         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
2387         uninitialized variable braino.
2388
2389 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
2390
2391         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
2392         test for syscall availability.
2393
2394         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
2395         __no_posix_timers to -1 if the syscalls don't exist.
2396
2397         * pthread_join.c (pthread_join): Set tid field of the joined
2398         thread to -1.  This isn't necessary but helps to recognize some
2399         error conditions with almost no cost.
2400
2401         * allocatestack.c (FREE_P): Also negative values indicate an
2402         unused stack.
2403
2404         * unwind.c: Include <unistd.h>.
2405
2406 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
2407
2408         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
2409
2410 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
2411
2412         * Makefile (crti-objs, crtn-objs): New variables.
2413         (omit-deps, extra-objs): Add crtn.
2414         ($(objpfx)libpthread.so): Depend on both crti and crtn
2415         and links to them in multidir.
2416         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
2417
2418 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
2419
2420         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2421         (lll_mutex_unlock): Use atomic_exchange_rel.
2422
2423 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
2424
2425         * cond-perf.c (cons): Add missing locking around setting of alldone.
2426
2427 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
2428
2429         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
2430         related macros.
2431         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2432
2433 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
2434
2435         * tst-sem6.c: New file.
2436         * Makefile (tests): Add tst-sem6.
2437
2438         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
2439         Use atomic_exchange_rel instead of atomic_exchange.
2440         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
2441         Likewise.
2442
2443         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
2444         code for lll_futex_wait and lll_futex_wake in static apps.  Use
2445         vsyscall is possible.
2446
2447         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
2448         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
2449         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
2450         pthread_setaffinity_np.
2451         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
2452         and pthread_setaffinity_np.
2453         * Makefile (libpthread-routines): Add pthread_getaffinity and
2454         pthread_setaffinity.
2455
2456         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
2457         use it in case mmap to allocate the stack fails.
2458         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
2459         ARCH_MAP_FLAGS here.
2460         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
2461         ARCH_RETRY_MMAP.
2462
2463 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
2464
2465         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
2466         handler implementation.  It is now lockless in fork().
2467         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2468         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2469         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
2470         declare the __fork_*_lists.
2471         (struct fork_handler): Include pointers to all three functions.
2472         Add next, refcntr and need_signal elements.
2473         (__fork_handlers): New declaration.
2474         (__register_atfork_malloc): Remove declaration.
2475         (HAVE_register_atfork_malloc): Remove definition.
2476         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
2477         __pthread_child_handler variable.
2478         (__libc_pthread_init): Use __register_atfork instead of explicitly
2479         adding to the list.
2480         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
2481         and lll_futex_wake.
2482         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2483
2484         * unwind.c (unwind_cleanup): Print error message and then abort.  This
2485         function must never be reached.
2486
2487         * cond-perf.c: New file.
2488
2489 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
2490
2491         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
2492
2493 2003-05-04  Roland McGrath  <roland@redhat.com>
2494
2495         * Makefile ($(objpfx)../libc.so): New target.
2496
2497 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
2498
2499         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2500         (pthread_condattr_t): Size is only an int, don't use long for
2501         alignment.
2502         (pthread_mutexattr_t): Likewise.
2503         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2504         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2505         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2506
2507 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
2508
2509         * sysdeps/i386/tls.h: Define THREAD_ID.
2510         * sysdeps/ia64/tls.h: Likewise.
2511         * sysdeps/powerpc/tls.h: Likewise.
2512         * sysdeps/s390/tls.h: Likewise.
2513         * sysdeps/sh/tls.h: Likewise.
2514         * sysdeps/x86_64/tls.h: Likewise.
2515         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
2516         record ownership.
2517         * pthread_mutex_timedlock.c: Likewise.
2518         * pthread_mutex_trylock.c: Likewise.
2519         * pthread_mutex_unlock.c: Likewise.
2520         * pthread_rwlock_trywrlock.c: Likewise.
2521         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
2522         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2523         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2524         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2525
2526         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
2527         flag.
2528
2529 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
2530
2531         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2532         (__SIZEOF_PTHREAD_COND_T): Define to 48.
2533         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
2534         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2535         Make __align long long instead of long.
2536         (pthread_rwlock_t): Formatting.
2537         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2538         (pthread_rwlock_t): Formatting.
2539         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2540         (pthread_cond_t): Make __align long long instead of long.
2541         (pthread_rwlock_t): Move __flags field to the same position as in
2542         linuxthreads.
2543
2544 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
2545
2546         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
2547         * tst-rwlock7.c (do_test): Likewise.
2548
2549 2003-04-26  Roland McGrath  <roland@redhat.com>
2550
2551         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
2552
2553 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
2554
2555         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
2556         sizeof (struct pthread).
2557         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
2558         1 struct pthread.
2559         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
2560         to 0.
2561         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
2562         struct pthread.
2563         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
2564         to 32-bit bytes.
2565         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
2566         tcbp.
2567         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
2568         unneccessarily.
2569         (NO_TLS_OFFSET): Define.
2570         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
2571         add TLS_TCB_SIZE unnecessarily.
2572
2573 2003-04-22  Roland McGrath  <roland@redhat.com>
2574
2575         * Makeconfig (shared-thread-library): Reverse link order to work
2576         around linker bug.
2577
2578 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
2579
2580         * semaphore.h: Fix typo in comment.
2581
2582 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
2583
2584         * sysdeps/pthread/sigfillset.c: New file.
2585
2586         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
2587         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
2588         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
2589         * sysdeps/pthread/sigaction.c: Likewise.
2590         * sysdeps/pthread/sigprocmask.c: New file.
2591         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
2592         __SIGRTMIN+1.
2593         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2594         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
2595         in this case.
2596
2597 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
2598
2599         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2600         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
2601
2602         * sysdeps/unix/sysv/linux/unregister-atfork.c
2603         (__unregister_atfork): Don't free memory not allocated dynamically.
2604
2605         * semaphore.h: Remove __THROW marker from cancellation points.
2606         * nptl/sysdeps/pthread/pthread.h: Likewise.
2607
2608 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
2609
2610         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
2611         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
2612         __THROW.
2613
2614 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
2615
2616         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
2617
2618 2003-04-15  Roland McGrath  <roland@redhat.com>
2619
2620         * forward.c (__pthread_unwind): Tweak to avoid warning.
2621
2622 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
2623
2624         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
2625
2626 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
2627
2628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
2629         overflow CFA advance instructions.
2630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2631
2632 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
2633
2634         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
2635         * sysdeps/i386/pthread_spin_lock.c: Likewise.
2636         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
2637         defined.
2638
2639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
2640         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
2641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
2642         DW_CFA_advance_loc for .Laddl-.Lsubl.
2643
2644 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
2645
2646         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
2647         position-independent unwind data for static libraries.
2648         Add missing unwind info.  Add comments.
2649
2650         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
2651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2654
2655 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
2656
2657         * Makefile: Make sure all cancellation points are compiled with
2658         exception and asynchronous unwind tables.
2659
2660         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
2661         which mishandles loading of global object addresses in PIC.
2662         (THREAD_SETMEM_NC): Likewise.
2663
2664 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
2665
2666         * pthread.h: Define new data structure for cleanup buffer.  Declare
2667         new cleanup handler interfaces.
2668         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
2669         (struct pthread): Add cleanup_jmp_buf pointer.  Define
2670         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
2671         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
2672         it.  Declare old cleanup handler installation functions.
2673         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
2674         handling.
2675         * cleanup_defer.c: Likewise.
2676         * cleanup_compat.c: New file.  Old cleanup code.
2677         * cleanup_def_compat.c: New file.  Old cleanup code.
2678         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
2679         if own thread descriptor.
2680         * unwind.c: New file.
2681         * forward.c: Add __pthread_unwind.
2682         * init.c (pthread_functions): Add __pthread_unwind.
2683         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
2684         Add ptr___pthread_unwind.
2685         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
2686         and unwind function.
2687         * Makefile (libpthread-routines): Add cleanup_compat,
2688         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
2689         table generation if necessary.
2690         * version.c: Record whether unwind support is compiled in.
2691         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
2692         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
2693         handler interfaces.
2694         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
2695         complication to generate unwind information for syscall wrappers.
2696         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2697         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2698         __cleanup_fct_attribute.
2699
2700         * Makefile: Add rules to build and run tst-cleanup0.
2701         * tst-cleanup0.c: New file.
2702         * tst-cleanup0.expect: New file.
2703
2704         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
2705         caller.  Optimize to avoid often unecessary local variable.
2706
2707 2003-04-11  Roland McGrath  <roland@redhat.com>
2708
2709         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
2710         sets variable `multidir'; include that.
2711         (generated): Add it.
2712         ($(objpfx)$(multidir)/crti.o): New target.
2713         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
2714
2715 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
2716
2717         * tst-attr2.c (do_test): Add cast to avoid warning.
2718         * tst-mutex4.c (do_test): Likewise.
2719
2720 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
2721
2722         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
2723         in child.
2724
2725 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
2726
2727         * Makefile (tests): Add tst-detach1.
2728         * tst-detach1.c: New file.
2729
2730 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
2731
2732         * sysdeps/pthread/pthread.h: Remove duplicate
2733         pthread_cleanup_{push,pop} definitions.
2734
2735         * tst-barrier2.c: Eliminate warnings.
2736         * tst-cancel4.c: Likewise.
2737         * tst-cond4.c: Likewise.
2738         * tst-cond6.c: Likewise.
2739         * tst-detach1.c: Likewise.
2740         * tst-rwlock4.c: Likewise.
2741         * tst-rwlock6.c: Likewise.
2742         * tst-rwlock7.c: Likewise.
2743         * tst-sem3.c: Likewise.
2744         * tst-spin2.c: Likewise.
2745         * tst-umask1.c: Likewise.
2746
2747 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
2748
2749         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
2750
2751 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
2752
2753         * descr.h (struct pthread): Move cancelhandling member to the front.
2754
2755 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
2756
2757         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
2758         malloc_parent, and malloc_child statically.
2759         (__register_atfork_malloc): New function.
2760         (free_mem): Don't free any of the malloc_* variables on the list.
2761         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
2762         Define HAVE_register_atfork_malloc.
2763
2764 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
2765
2766         * sysdeps/pthread/createthread.c (create_thread): Add some more
2767         comments explaining when to set multiple_threads and when not.
2768
2769         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2770         THREAD_ATOMIC_BIT_SET if not already defined.
2771         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2772         THREAD_ATOMIC_BIT_SET:
2773         * sysdeps/x86_64/tls.h: Likewise.
2774         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
2775         THREAD_ATOMIC_CMPXCHG_VAL.
2776         (_pthread_cleanup_pop_restore): Likewise.
2777         * cancellation.c (__pthread_enable_asynccancel): Likewise.
2778         (__pthread_enable_asynccancel_2): Likewise.
2779         (__pthread_disable_asynccancel): Likewise.
2780         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2781         (__libc_disable_asynccancel): Likewise.
2782         * init.c (sigcancel_handler): Likewise.
2783         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
2784         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
2785
2786 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
2787
2788         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
2789         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2790         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
2791         * Makefile (tests): Add tst-cancel11.
2792         * tst-cancel11.c: New file.
2793
2794 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
2795
2796         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
2797         round, not the first.  Use specific_used flag instead of local
2798         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
2799         (__free_tcb): Don't call deallocate_tsd here.
2800         (start_thread): Call deallocate_tsd here.
2801         * pthread_setspecific.c: Set specific_used flag really only when
2802         needed.
2803         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
2804         * tst-tsd3.c: New file.
2805         * tst-tsd4.c: New file.
2806
2807 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
2808
2809         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
2810         Use atomic_exchange_and_add instead of __lll_add.
2811         (__lll_mutex_timedlock): Likewise.
2812         Patch by Ian Wienand.
2813
2814 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
2815
2816         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2817         (SINGLE_THREAD_P): Fix typo.
2818         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
2819
2820 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
2821
2822         * Makefile (tests): Add tst-align.
2823         * tst-align.c: New file.
2824         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
2825
2826         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
2827         function correctly.
2828
2829         * tst-tsd2.c: Add casts to avoid warnings.
2830
2831 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
2832
2833         * descr.h (struct pthread): Move most often used elements to the front.
2834
2835 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
2836
2837         * Makefile (libpthread-routines): Add pthread_atfork.
2838         (libpthread-static-only-routines): Add pthread_atfork.
2839
2840 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2841
2842         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
2843         of TLS_DTV_AT_TP.
2844         (INSTALL_DTV): Add parens.
2845         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2846         Use passed descr instead of THREAD_SELF.
2847         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
2848         (__lll_mutex_timedlock_wait): Correct expected value after
2849         spurious wakeup.
2850         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
2851         Release lock before waking up the waiters.
2852         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
2853         criteria.  Reorderstruct passed to cleanup handler.  Fix
2854         handling of cancellation and failung pthread_mutex_unlock call.
2855         Use __pthread_enable_asynccancel_2 instead of
2856         __pthread_enable_asynccancel.
2857         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2858         Return result of lock re-get if it fails.
2859         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
2860         for __pthread_cleanup_push.
2861         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
2862         completely broken rwlock implementation.
2863         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2864         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2865         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2866         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2867         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2868         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
2869         versioned_symbol macro.
2870         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
2871         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2872
2873 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
2874
2875         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
2876         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
2877         and __helper_tid.
2878         (struct timer): Remove th and bar field.
2879         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
2880         debugging code.  Create only one helper thread.
2881         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
2882         helper thread.
2883         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2884         Renamed.  Define statically.  Use thread info from siginfo.
2885         (__helper_once): New variable.
2886         (__helper_tid): New variable.
2887         (__reset_helper_control): New function.
2888         (__start_helper_thread): New function.
2889
2890         * pthread_create.c (start_thread): Don't use setjmp inside
2891         __builtin_expect to work around gcc bug.
2892
2893         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
2894         timer_delete syscall fails, but not with ENOSYS, set
2895         __no_posix_timers.
2896
2897         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
2898         (timer_settime): Fix typo.
2899         * sysdeps/unix/sysv/linux/timer_getoverr.c
2900         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
2901
2902 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
2903
2904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
2905         offset of cleanupbuf.__prev.
2906
2907 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
2908
2909         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
2910         of included file.
2911
2912 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
2913
2914         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
2915         NULL provide default definition to syscall.
2916
2917 2003-03-25  Roland McGrath  <roland@redhat.com>
2918
2919         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
2920         (timer_id2ptr): Fix typo.
2921
2922 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
2923
2924         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
2925         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
2926         * sysdeps/ia64/pthreaddef.h: Likewise.
2927         * sysdeps/powerpc/pthreaddef.h: Likewise.
2928         * sysdeps/s390/pthreaddef.h: Likewise.
2929         * sysdeps/sh/pthreaddef.h: Likewise.
2930         * sysdeps/x86_64/pthreaddef.h: Likewise.
2931         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
2932         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
2933         being changed.
2934         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
2935         SIGTIMER is not unblocked.
2936         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
2937         RT signal taken.
2938         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
2939         be send.
2940         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
2941         pass pointer through as ID.
2942         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
2943         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
2944         * sysdeps/unix/sysv/linux/timer_create.c: New file.
2945         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
2946         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
2947         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
2948         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
2949         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
2950         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
2951         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
2952         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
2953         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
2954         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
2955         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
2956         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
2957         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
2958         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
2959         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
2960         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
2961         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
2962         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
2963         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
2964         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
2965         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
2966         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
2967         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
2968         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
2969         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
2970         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
2971         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
2972         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
2973         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
2974         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
2975
2976         * pthreadP.h: Remove FRAME_LEFT definition.
2977         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
2978         already left frame.  Programs which have this problem are not POSIX
2979         compliant.
2980         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
2981
2982 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
2983
2984         * sysdeps/pthread/tst-timer.c: Check return values of the
2985         functions we test.
2986
2987 2003-03-23  Roland McGrath  <roland@redhat.com>
2988
2989         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
2990         * tst-tls3mod.c: Likewise.
2991         * tst-tls1.c: Likewise.
2992         * tst-tls2.c: Likewise.
2993
2994         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
2995         undefined behavior.
2996
2997         * tst-join5.c (tf1, tf2): Add a cast.
2998
2999         * Makeconfig (includes): Append -I$(..)nptl to this variable.
3000
3001         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3002         Don't test anything.
3003         * tst-cond4.c: Likewise.
3004         * tst-cond6.c: Likewise.
3005         * tst-flock2.c: Likewise.
3006         * tst-mutex4.c: Likewise.
3007         * tst-rwlock4.c: Likewise.
3008         * tst-signal1.c: Likewise.
3009         * tst-spin2.c: Likewise.
3010         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3011
3012         * tst-mutex4.c: Use test-skeleton.c.
3013         * tst-spin2.c: Likewise.
3014         * tst-sysconf.c: Likewise.
3015         * tst-barrier2.c: Likewise.
3016         * tst-cond4.c: Likewise.
3017         * tst-cond6.c: Likewise.
3018         * tst-rwlock4.c: Likewise.
3019         * tst-unload.c: Likewise.
3020         * tst-flock2.c (do_test): Use return instead of exit.
3021
3022 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
3023
3024         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3025
3026 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
3027
3028         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3029         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3030         instead of __lll_compare_and_swap.
3031         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3032         Likewise.
3033         Removed definition if __lll_compare_and_swap.
3034
3035         * cancellation.c: Adjust for new form of compare&exchange macros.
3036         * cleanup_defer.c: Likewise.
3037         * init.c: Likewise.
3038         * libc-cancellation.c: Likewise.
3039         * old_pthread_cond_broadcast.c: Likewise.
3040         * old_pthread_cond_signal.c: Likewise.
3041         * old_pthread_cond_timedwait.c: Likewise.
3042         * old_pthread_cond_wait.c: Likewise.
3043         * pthread_cancel.c: Likewise.
3044         * pthread_create.c: Likewise.
3045         * pthread_detach.c: Likewise.
3046         * pthread_join.c: Likewise.
3047         * pthread_key_delete.c: Likewise.
3048         * pthread_setcancelstate.c: Likewise.
3049         * pthread_setcanceltype.c: Likewise.
3050         * pthread_timedjoin.c: Likewise.
3051         * pthread_tryjoin.c: Likewise.
3052         * sysdeps/pthread/createthread.c: Likewise.
3053
3054 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
3055
3056         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
3057         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
3058         definitions.  Replace uses with calls to atomic_* functions.
3059         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3060         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3061         __lll_test_and_set calls with atomic_exchange_and_add and
3062         atomic_exchange calls respectively.
3063         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3064         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3065         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3066         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3067         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3068         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3069         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3070
3071         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3072         returns the old value.
3073
3074 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
3075
3076         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3077         int for variable OLDVAL and correct inline assembler contraint.
3078         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3079         type int for variable OLD.
3080
3081         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3082         only for s390-32.
3083         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3084         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3085         instead of multiple_threads field in the TCB.
3086
3087 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
3088
3089         * sysdeps/i386/i686/bits/atomic.h: Removed.
3090         * sysdeps/i386/i586/bits/atomic.h: Removed.
3091         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
3092         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
3093         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
3094         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
3095         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
3096         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
3097         * atomic.h: Removed.  Moved to glibc.
3098
3099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3100         support for clock selection.
3101
3102         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3103         signalling waiters.
3104
3105 2003-03-18  Roland McGrath  <roland@redhat.com>
3106
3107         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3108         Add __lll_rel_instr first.  Add memory clobber.
3109         (lll_mutex_unlock): Use __lll_test_and_set.
3110         From Paul Mackerras <paulus@samba.org>.
3111
3112         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3113         unconditionally.
3114         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3115         (SINGLE_THREAD_P):  Add `header.' prefix.
3116         From Paul Mackerras <paulus@samba.org>.
3117
3118         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3119         pthread_timedjoin_np to ...
3120         (libpthread: GLIBC_2.3.3): ... here.
3121         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3122
3123         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3124         Avoid shadowing VAL variable.
3125
3126         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3127         New macro.
3128
3129 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
3130
3131         * Makefile (tests): Add tst-cond11.
3132         * tst-cond11.c: New file.
3133
3134         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3135         struct passed to cleanup handler to eliminate one more
3136         instruction.
3137         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3138
3139         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3140         (pthrad_cond_t): Replace __unused field with __clock.
3141
3142         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
3143         waken all waiters in cleanup handler.
3144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3146
3147         * pthread_condattr_getclock.c: New file.
3148         * pthread_condattr_setclock.c: New file.
3149         * sysdeps/pthread/pthread.h: Declare these new functions.
3150         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
3151         * Makefile (libpthread-routines): Add the new functions.
3152         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
3153         Renamed field to value.  Document use of the bits.
3154         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
3155         change.
3156         * pthread_condattr_setpshared.c: Likewise.
3157         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
3158         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
3159         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3160         Add __clock field.
3161         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3162         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3163         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3164         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3166         Implement clock selection.
3167         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3168         * pthread-errnos.sym: Add ENOSYS.
3169         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3170         _POSIX_CLOCK_SELECTION.
3171         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3172
3173         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
3174         invalid .size directive.
3175
3176 2003-03-17  Roland McGrath  <roland@redhat.com>
3177
3178         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3179         Formatting tweaks.
3180
3181 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
3182
3183         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3184         Use __lll_add instead of spelling it out.  Use protected symbol names.
3185         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3186         Use __lll_add.
3187         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3188         Renamed from lll_compare_and_swap.  Use new name where necessary.
3189         (__lll_add): Defined.
3190         (__lll_dec_if_positive): Defined.
3191         (__lll_test_and_set): Defined.
3192         * sysdeps/ia64/pthread_spin_init.c: Removed.
3193         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3194         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3195         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3196         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3197         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3198         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3199         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
3200         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3201         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3202         __sync_lock_release_si.
3203         Patch by Jakub Jelinek.
3204
3205         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3206         Fix timeout handling.
3207         (__lll_timedwait_tid): Likewise.
3208         (lll_unlock_wake_cb): Wake up other waiters if necessary.
3209         Patch by Jakub Jelinek.
3210
3211         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3212
3213 2003-03-17  Roland McGrath  <roland@redhat.com>
3214
3215         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3216         * sysdeps/pthread/pthread_spin_init.c: New file.
3217         * sysdeps/pthread/pthread_spin_unlock.c: New file.
3218         * sysdeps/powerpc/Makefile: New file.
3219         * sysdeps/powerpc/pthread_spin_lock.c: New file.
3220         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3221         * sysdeps/powerpc/pthreaddef.h: New file.
3222         * sysdeps/powerpc/tcb-offsets.sym: New file.
3223         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3224         * sysdeps/powerpc/tls.h: New file.
3225         * sysdeps/powerpc/bits/atomic.h: New file.
3226         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3227         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3228         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
3229
3230         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3231         * sysdeps/unix/sysv/linux/sem_post.c: New file.
3232         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3233         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3234         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3235         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3236         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3237         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3238         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3239         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3240         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3241         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3242         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3243         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3244         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3245
3246         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3247         not gettimeofday.
3248         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3249         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3250         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3251         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3252         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3253
3254 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
3255
3256         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3257         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3259         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3260         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3261
3262 2003-03-16  Roland McGrath  <roland@redhat.com>
3263
3264         * tst-fork4.c: Include <string.h>.
3265         * tst-signal2.c: Likewise.
3266         * tst-mutex5.c (do_test): exit -> return.
3267         * tst-mutex2.c: Include <stdlib.h>.
3268
3269 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
3270
3271         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3272         (__lll_mutex_timedlock_wait): Correct expected value after
3273         spurious wakeup.  Otherwise we would never wait again.
3274
3275         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3276         zone versus inline asm stupidity.  Use correct instructions.
3277
3278         * tst-rwlock6.c: Add some more status output.
3279
3280 2003-03-15  Roland McGrath  <roland@redhat.com>
3281
3282         * sysdeps/pthread/configure.in: New file.
3283         * sysdeps/pthread/configure: New file (generated).
3284
3285 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
3286
3287         * allocatestack.c (allocate_stack): Store the exact stack size of
3288         user allocated stacks.
3289
3290 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
3291
3292         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3293         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
3294         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3295         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
3296         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3297         Use `header.' prefix.
3298         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3299
3300 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
3301
3302         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
3303         __builtin_frame_address, use stack pointer.
3304
3305         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
3306         instead of __builtin_frame_pointer.
3307
3308 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
3309
3310         * tst-basic1.c (do_test): Add cast to avoid warning.
3311         * tst-basic2.c (do_test): Likewise.
3312
3313         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
3314         amount of stack correction.
3315
3316         * tst-fork4.c: Use test-skeleton.c.
3317
3318 2003-03-14  Roland McGrath  <roland@redhat.com>
3319
3320         * init.c: Fix typo "#eli" for "#else".
3321
3322 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
3323
3324         * allocatestack.c (__stack_user): Use hidden_data_def.
3325         * pthread_create.c (__pthread_keys): Likewise.
3326
3327         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
3328
3329 2003-03-14  Roland McGrath  <roland@redhat.com>
3330
3331         * tst-fork4.c: New file.
3332         * Makefile (tests): Add it.
3333
3334         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
3335         we always define the padding space.
3336         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
3337         stopped supporting its own extensions fully.
3338         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
3339         struct also called `header', so `header.multiple_threads' is the field
3340         name to use on all machines.
3341         * allocatestack.c (allocate_stack): Use `header.' prefix.
3342         * sysdeps/pthread/createthread.c (create_thread): Likewise.
3343         * pthread_create.c (__pthread_create_2_1): Likewise.
3344         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
3345         (THREAD_SELF): Likewise.
3346         * sysdeps/x86_64/tls.h: Likewise.
3347         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3348         (SINGLE_THREAD_P): Likewise.
3349         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3350         (SINGLE_THREAD_P): Likewise.
3351         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3352         (SINGLE_THREAD_P): Likewise.
3353
3354         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
3355         value directly.
3356
3357 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
3358
3359         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
3360         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
3361
3362         * pthread_create.c (start_thread): setjmp is expected to return 0.
3363
3364         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
3365         (THREAD_GETMEM_NC): Likewise.
3366
3367 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
3368
3369         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
3370         and the size of the stack which must be allocated is a multiple,
3371         allocate one more page.
3372         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
3373         MULTI_PAGE_ALIASING.
3374
3375 2003-03-13  Roland McGrath  <roland@redhat.com>
3376
3377         * pthread_create.c (start_thread): Set EXITING_BIT after the
3378         event-reporting (and destructors), not before.
3379
3380 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
3381
3382         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
3383         lll_futex_wake): Declare register variables as long int instead of
3384         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
3385         Make syscall arguments clobbered by the syscall.
3386         (lll_futex_wait): Define using lll_futex_timed_wait.
3387
3388         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
3389         to void *.
3390
3391         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
3392         PPID if [! NDEBUG].
3393
3394         * allocatestack.c (nptl_ncreated): Only declare if
3395         COLORING_INCREMENT != 0.
3396
3397         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
3398         (__libc_enable_asynccancel_2): Remove prototype.
3399
3400         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
3401         ctid to match kernel.
3402
3403 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
3404
3405         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
3406         libc_multiple_threads.
3407         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
3408         __libc_multiple_threads to...
3409         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
3410
3411         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
3412         versioning.
3413         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3414         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3415
3416         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
3417         (__pthread_once_internal): Define.
3418
3419         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
3420         macros instead of .symver directly.
3421         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3422         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3423
3424         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
3425         * sysdeps/x86_64/tcb-offsets.sym: New file.
3426         * sysdeps/x86_64/Makefile: New file.
3427
3428         * sysdeps/i386/tcb-offsets.sym: Add SELF.
3429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
3430         to access own pthread_t in TCB.
3431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3432         Likewise.
3433         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3434         Likewise.
3435         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3436
3437 2003-03-12  Roland McGrath  <roland@redhat.com>
3438
3439         * pthread-errnos.sym: New file.
3440         * Makefile (gen-as-const-headers): New variable, list that file.
3441         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
3442         header <pthread-errnos.h> instead of defining errno values here.
3443         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3444         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3445         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3448         Likewise.
3449         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3450         Likewise.
3451         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3453         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3454         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3455         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3456         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3457         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3458         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3460         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
3461         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3462         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
3463         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3464         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
3465         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.