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