* locale/programs/ld-monetary.c (monetary_finish): Avoid range check
[glibc.git] / nptl / ChangeLog
blob9b5a1baa6835cf7b314abe3cc9b4852cf6cc61f7
1 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3         * tst-locale2.c (useless): Add return statement.
5 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
7         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
8         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
9         * pthread_create.c (start_thread): Likewise.
10         * init.c (sighandler_setxid): Likewise.
11         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
12         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
13         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
14         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
15         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
16         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
17         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
18         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
19         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
20         Likewise.
21         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
22         Likewise.
23         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
24         Likewise.
25         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
26         __rtld_notify): Likewise.
27         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
28         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
29         __pthread_once): Likewise.
30         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
31         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
32         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
33         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
34         (lll_futex_wait): Add private argument, define as wrapper around
35         lll_futex_timed_wait.
36         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
37         use __lll_private_flag macro.
38         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
39         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
40         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
41         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
42         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
43         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
44         (lll_futex_wait): Add private argument, define as wrapper around
45         lll_futex_timed_wait.
46         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
47         use __lll_private_flag macro.
48         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
49         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
50         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
51         Define.
52         (lll_futex_timed_wait, lll_futex_wake): Use it.
53         (lll_private_futex_wait, lll_private_futex_timed_wait,
54         lll_private_futex_wake): Removed.
55         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
56         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
57         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
58         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
59         (lll_futex_wait): Add private argument, define as wrapper around
60         lll_futex_timed_wait.
61         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
62         use __lll_private_flag macro.
63         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
64         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
65         to lll_futex_*.
66         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
67         (lll_private_futex_wait, lll_private_futex_timed_wait,
68         lll_private_futex_wake): Removed.
69         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
70         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
71         (lll_private_futex_wait, lll_private_futex_timed_wait,
72         lll_private_futex_wake): Removed.
73         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
74         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
75         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
76         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
77         (lll_futex_wait): Add private argument, define as wrapper around
78         lll_futex_timed_wait.
79         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
80         use __lll_private_flag macro.
81         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
82         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
83         to lll_futex_*.
84         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
85         Define.
86         (lll_futex_timed_wait, lll_futex_wake): Use it.
87         (lll_private_futex_wait, lll_private_futex_timed_wait,
88         lll_private_futex_wake): Removed.
90 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
92         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
93         of the structure for sparc32.
95 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
97         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
99 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
101         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
102         code used when private futexes are assumed.
103         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
104         Likewise.
106 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
108         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
109         (__lll_private_flag): Define.
110         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
111         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
112         __lll_private_flag.
113         (lll_private_futex_wait, lll_private_futex_timedwait,
114         lll_private_futex_wake): Define as wrapper around non-_private
115         macros.
116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
117         (__lll_private_flag): Define.
118         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
119         (lll_private_futex_wait, lll_private_futex_timedwait,
120         lll_private_futex_wake): Define as wrapper around non-_private
121         macros.
123 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
125         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
126         parameter to lll_futex_wait call.
127         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
129         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
130         Replace lll_futex_wait with lll_private_futex_wait.
131         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
132         Add LLL_SHARED parameter to lll_futex_wake().
134         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
135         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
136         lll_private_futex_wake.
137         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
138         bit from private parm before syscall.
139         (lll_futex_timed_wait): Likewise.
140         (lll_futex_wake): Likewise.
141         (lll_futex_wake_unlock): Likewise.
142         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
143         (lll_robust_mutex_unlock): Likewise.
144         (lll_mutex_unlock_force): Likewise.
145         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
147 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
149         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
150         compilation when unconditionally using private futexes.
151         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
152         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
153         Likewise.
154         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
155         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
157 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
159         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
160         Define.
162 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
164         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
165         kernel-features.h.
167 2007-05-16  Roland McGrath  <roland@redhat.com>
169         * init.c (__nptl_initial_report_events): New variable.
170         (__pthread_initialize_minimal_internal): Initialize pd->report_events
171         to that.
173 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
175         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
176         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
178 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
180         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
181         implementation.
183 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
185         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
186         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
187         * pthread_mutex_timedlock.c: Likewise.
188         * pthread_mutex_trylock.c: Likewise.
189         * pthread_mutex_unlock.c: Likewise.
191 2007-06-17  Andreas Schwab  <schwab@suse.de>
193         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
194         sections.
196 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
198         * allocatestack.c (allocate_stack): Make code compile if
199         __ASSUME_PRIVATE_FUTEX is set.
201 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
203         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
204         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
205         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
206         (__pthread_rwlock_wrlock): Likewise.
207         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
208         (pthread_rwlock_timedrdlock): Likewise.
209         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
210         (pthread_rwlock_timedwrlock): Likewise.
211         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
212         (__pthread_rwlock_unlock): Likewise.
214 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
216         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
217         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
218         Split __flags into __flags, __shared, __pad1 and __pad2.
219         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
220         futexes if they are available.
221         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
222         in libc-lowlevellock.S allow using private futexes.
223         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
224         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
225         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
226         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
227         lll_private_futex_timed_wait and lll_private_futex_wake.
228         (lll_robust_mutex_unlock): Fix typo.
229         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
230         field in futex command setup.
231         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
232         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
233         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
234         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
235         if they are available.  Remove clear_once_control.
236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
237         futexes if they are available.
238         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
240         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
242         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
243         Wake only when there are waiters.
244         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
245         support.  Indicate that there are waiters.  Remove unnecessary
246         extra cancellation test.
247         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
248         left-over duplication of __sem_wait_cleanup.
250 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
253         parameter to lll_futex_wait, lll_futex_timed_wait, and
254         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
255         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
256         lll_private_futex_wake.
257         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
258         * allocatestack.c: Adjust use of lll_futex_* macros.
259         * init.c: Likewise.
260         * lowlevellock.h: Likewise.
261         * pthread_barrier_wait.c: Likewise.
262         * pthread_cond_broadcast.c: Likewise.
263         * pthread_cond_destroy.c: Likewise.
264         * pthread_cond_signal.c: Likewise.
265         * pthread_cond_timedwait.c: Likewise.
266         * pthread_cond_wait.c: Likewise.
267         * pthread_create.c: Likewise.
268         * pthread_mutex_lock.c: Likewise.
269         * pthread_mutex_setprioceiling.c: Likewise.
270         * pthread_mutex_timedlock.c: Likewise.
271         * pthread_mutex_unlock.c: Likewise.
272         * pthread_rwlock_timedrdlock.c: Likewise.
273         * pthread_rwlock_timedwrlock.c: Likewise.
274         * pthread_rwlock_unlock.c: Likewise.
275         * sysdeps/alpha/tls.h: Likewise.
276         * sysdeps/i386/tls.h: Likewise.
277         * sysdeps/ia64/tls.h: Likewise.
278         * sysdeps/powerpc/tls.h: Likewise.
279         * sysdeps/pthread/aio_misc.h: Likewise.
280         * sysdeps/pthread/gai_misc.h: Likewise.
281         * sysdeps/s390/tls.h: Likewise.
282         * sysdeps/sh/tls.h: Likewise.
283         * sysdeps/sparc/tls.h: Likewise.
284         * sysdeps/unix/sysv/linux/fork.c: Likewise.
285         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
286         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
287         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
288         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
289         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
290         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
291         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
292         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
293         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
294         Likewise.
295         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
296         * sysdeps/x86_64/tls.h: Likewise.
298 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
300         * pthread_getattr_np.c: No need to install a cancellation handler,
301         this is no cancellation point.
302         * pthread_getschedparam.c: Likewise.
303         * pthread_setschedparam.c: Likewise.
304         * pthread_setschedprio.c: Likewise.
305         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
306         lll_unlock_wake_cb.
307         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
308         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
309         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
310         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
311         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
312         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
313         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
314         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
315         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
316         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
317         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
318         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
320         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
321         whether there are more than one thread makes no sense here since
322         we only call the slow path if the locks are taken.
323         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
325         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
326         COND_NWAITERS_SHIFT.
327         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
328         COND_CLOCK_BITS.
329         * pthread_cond_init.c: Likewise.
330         * pthread_cond_timedwait.c: Likewise.
331         * pthread_cond_wait.c: Likewise.
332         * pthread_condattr_getclock.c: Likewise.
333         * pthread_condattr_setclock.c: Likewise.
334         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
335         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
336         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
337         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
338         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
340 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
342         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
343         unistd.h.
345         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
346         insn suffix.
347         (THREAD_GSCOPE_GET_FLAG): Remove.
348         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
349         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
350         changes.
351         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
352         (THREAD_GSCOPE_GET_FLAG): Remove.
353         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
354         instead of THREAD_GSCOPE_GET_FLAG.
355         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
356         it.
357         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
358         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
359         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
360         THREAD_GSCOPE_WAIT): Define.
361         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
362         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
363         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
364         THREAD_GSCOPE_WAIT): Define.
365         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
366         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
367         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
368         THREAD_GSCOPE_WAIT): Define.
369         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
370         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
371         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
372         THREAD_GSCOPE_WAIT): Define.
374 2007-05-24  Richard Henderson  <rth@redhat.com>
376         * descr.h (struct pthread): Add header.gscope_flag.
377         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
378         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
379         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
380         THREAD_GSCOPE_WAIT): Define.
382 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
384         * init.c: Make it compile with older kernel headers.
386         * tst-initializers1.c: Show through exit code which test failed.
388         * pthread_rwlock_init.c: Also initialize __shared field.
389         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
390         element in rwlock structure into four byte elements.  One of them is
391         the new __shared element.
392         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
393         Likewise.
394         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
395         __shared, adjust names of other padding elements.
396         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
397         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
398         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
399         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
400         FUTEX_PRIVATE_FLAG.
401         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
402         futex to use private operations if possible.
403         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
404         Likewise.
405         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
406         Likewise.
407         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
408         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
409         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
410         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
411         Likewise.
412         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
413         Likewise.
414         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
415         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
417 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
419         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
420         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
421         * pthread_rwlock_timedrdlock.c: Likewise.
422         * pthread_rwlock_tryrdlock.c: Likewise.
424         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
425         optimization.
427         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
428         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
429         duplication of __sem_wait_cleanup.
431         * allocatestack.c: Revert last change.
432         * init.c: Likewise.
433         * sysdeps/i386/tls.h: Likewise.
434         * sysdeps/x86_64/tls.h: Likewise.
435         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
436         header structure.
437         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
439         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
440         Add private field.
441         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
442         * pthread_barrier_init.c: Set private flag if pshared and private
443         futexes are supported.
444         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
445         private field in futex command setup.
446         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
448 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
450         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
451         support.
452         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
453         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
454         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
455         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
456         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
458         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
459         * sem_init.c (__new_sem_init): Rewrite to initialize all three
460         fields in the structure.
461         (__old_sem_init): New function.
462         * sem_open.c: Initialize all fields of the structure.
463         * sem_getvalue.c: Adjust for renamed element.
464         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
465         (gen-as-const-headers): Add structsem.sym.
466         * sysdeps/unix/sysv/linux/structsem.sym: New file.
467         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
468         struct new_sem.  Add struct old_sem.
469         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
470         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
471         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
472         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
473         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
474         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
475         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
476         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
477         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
478         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
479         * tst-sem10.c: New file.
480         * tst-sem11.c: New file.
481         * tst-sem12.c: New file.
482         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
483         of struct sem.
485 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
486             Jakub Jelinek  <jakub@redhat.com>
488         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
489         Move __pthread_enable_asynccancel right before futex syscall.
490         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
491         Likewise.
493 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
495         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
496         THREAD_COPY_PRIVATE_FUTEX): Define.
497         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
498         THREAD_COPY_PRIVATE_FUTEX): Define.
499         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
500         * init.c (__pthread_initialize_minimal_internal): Use
501         THREAD_SET_PRIVATE_FUTEX.
503         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
504         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
505         THREAD_GSCOPE_FLAG_WAIT): Define.
506         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
507         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
508         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
509         PTR_DEMANGLE.
510         (THREAD_GSCOPE_GET_FLAG): Define.
511         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
512         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
513         instead of ->header.gscope_flag directly.
515 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
517         * init.c (__pthread_initialize_minimal_internal): Check whether
518         private futexes are available.
519         * allocatestack.c (allocate_stack): Copy private_futex field from
520         current thread into the new stack.
521         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
522         futexes if they are available.
523         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
525         in libc-lowlevellock.S allow using private futexes.
526         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
527         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
528         FUTEX_PRIVATE_FLAG.
529         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
530         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
531         if they are available.
532         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
533         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
534         * sysdeps/i386/tcb-offsets.sym: Likewise.
535         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
536         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
538 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
540         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
541         Remove ptr_wait_lookup_done again.
542         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
543         (__pthread_initialize_minimal_internal): Initialize
544         _dl_wait_lookup_done pointer in _rtld_global directly.
545         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
546         Remove code to code _dl_wait_lookup_done.
547         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
548         encrypted for now.
550 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
552         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
553         pthread_mutex_init failed with ENOTSUP.
555 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
557         * allocatestack.c (__wait_lookup_done): New function.
558         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
559         Add ptr_wait_lookup_done.
560         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
561         * pthreadP.h: Declare __wait_lookup_done.
562         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
563         Define macros to implement reference handling of global scope.
564         * sysdeps/x86_64/tls.h: Likewise.
565         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
566         Initialize GL(dl_wait_lookup_done).
568 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
570         [BZ #4512]
571         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
572         is detected.
573         * pthread_mutex_timedlock.c: Likewise.
574         * pthread_mutex_trylock.c: Likewise.
575         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
577         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
578         * tst-robust9.c: New file.
579         * tst-robustpi9.c: New file.
581         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
582         unnecessary extra cancellation test.
584 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
586         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
587         extra cancellation test.
588         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
590 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
592         * descr.h (struct pthread): Rearrange members to fill hole in
593         64-bit layout.
595         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
596         (__pthread_setaffinity_new): If syscall was successful and
597         RESET_VGETCPU_CACHE is defined, use it before returning.
598         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
600 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
602         [BZ #4455]
603         * tst-align2.c: Include stackinfo.h.
604         * tst-getpid1.c: Likewise.
606 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
608         [BZ #4455]
609         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
610         * tst-getpid1.c (do_test): Likewise.
612         [BZ #4456]
613         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
614         (allocate_stack): Likewise.
616 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
618         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
619         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
620         (__lll_robust_timedlock_wait): Likewise.
621         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
623 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
625         [BZ #4465]
626         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
627         * tst-cancel4.c (tf_fdatasync): New test.
629 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
631         [BZ #4392]
632         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
633         check mutexes like normal mutexes.
635         [BZ #4306]
636         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
637         Initialize the whole sigevent structure to appease valgrind.
639 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
641         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
642         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
644 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
646         * tst-locale1.c: Avoid warnings.
647         * tst-locale2.c: Likewise.
649 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
651         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
652         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
654 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
656         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
657         __extern_always_inline where appropriate.
658         * sysdeps/pthread/pthread.h: Likewise.
660 2007-03-13  Richard Henderson  <rth@redhat.com>
662         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
663         separate cfi regions for the two subsections.
665 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
667         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
668         new thread, don't just decrement it.
669         Patch by Suzuki K P <suzuki@in.ibm.com>.
671 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
673         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
674         PTHFCT_CALL definition.
676 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
678         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
679         available, don't use it.
681 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
683         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
684         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
685         call into the kernel to delay.
687 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
689         * tst-initializers1.c: We want to test the initializers as seen
690         outside of libc, so undefined _LIBC.
692         * pthread_join.c (cleanup): Avoid warning.
694 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
697         (__lll_timedwait_tid): Add unwind info.
699         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
700         function table, mangle the pointers.
701         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
702         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
703         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
704         demangle pointers before use.
705         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
706         demangle pointer.
707         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
708         * sysdeps/pthread/setxid.h: Likewise.
710 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
712         * tst-rwlock7.c: Show some more information in case of correct
713         behavior.
715 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
717         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
718         (lll_futex_timed_wait): Undo part of last change, don't negate
719         return value.
721 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
724         FUTEX_CMP_REQUEUE and lll_futex_requeue.
726 2006-12-28  David S. Miller  <davem@davemloft.net>
728         * shlib-versions: Fix sparc64 linux target specification.
730 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
732         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
733         Adjust include path for pthread_barrier_wait.c move.
735 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
737         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
738         tid isn't reread from pd->tid in between ESRCH test and the syscall.
740 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
742         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
743         6 argument cancellable syscalls.
744         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
745         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
746         6 argument cancellable syscalls.
747         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
749 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
751         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
752         (__rtld_mrlock_initialize): Add missing closing parenthesis.
754 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
756         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
757         __sync_lock_release instead of __sync_lock_release_si.
759 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
761         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
762         Define.
763         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
764         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
765         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
766         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
767         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
768         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
769         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
770         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
771         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
772         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
773         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
775 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
777         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
778         * pthread_barrier_wait.c: ...here.
779         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
780         * pthread_cond_broadcast.c: ...here.
781         * sysdeps/pthread/pthread_cond_signal.c: Move to...
782         * pthread_cond_signal.c: ...here.
783         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
784         * pthread_cond_timedwait.c: ...here.
785         * sysdeps/pthread/pthread_cond_wait.c: Move to...
786         * pthread_cond_wait.c: ...here.
787         * sysdeps/pthread/pthread_once.c: Move to...
788         * pthread_once.c: ...here.
789         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
790         * pthread_rwlock_rdlock.c: ...here.
791         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
792         * pthread_rwlock_timedrdlock.c: ...here.
793         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
794         * pthread_rwlock_timedwrlock.c: ...here.
795         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
796         * pthread_rwlock_unlock.c: ...here.
797         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
798         * pthread_rwlock_wrlock.c: ...here.
799         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
800         * pthread_spin_destroy.c: ...here.
801         * sysdeps/pthread/pthread_spin_init.c: Move to...
802         * pthread_spin_init.c: ...here.
803         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
804         * pthread_spin_unlock.c: ...here.
805         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
806         * pthread_getcpuclockid.c: ...here.
808         * init.c: USE_TLS support is now always enabled.
809         * tst-tls5.h: Likewise.
810         * sysdeps/alpha/tls.h: Likewise.
811         * sysdeps/i386/tls.h: Likewise.
812         * sysdeps/ia64/tls.h: Likewise.
813         * sysdeps/powerpc/tls.h: Likewise.
814         * sysdeps/s390/tls.h: Likewise.
815         * sysdeps/sh/tls.h: Likewise.
816         * sysdeps/sparc/tls.h: Likewise.
817         * sysdeps/x86_64/tls.h: Likewise.
819 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
821         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
822         __rtld_mrlock_change): Update oldval if atomic compare and exchange
823         failed.
825         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
826         Define to THREAD_SELF->header.multiple_threads.
827         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
828         Likewise.
829         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
830         Likewise.
831         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
832         (SINGLE_THREAD_P): Likewise.
833         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
834         (SINGLE_THREAD_P): Likewise.
835         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
836         (SINGLE_THREAD_P): Likewise.
837         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
838         (SINGLE_THREAD_P): Likewise.
839         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
840         Likewise.
841         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
842         (SINGLE_THREAD_P): Likewise.
843         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
844         (SINGLE_THREAD_P): Likewise.
845         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
846         Likewise.
848 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
850         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
851         by default rather than 2_3_3.
853 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
855         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
856         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
857         atomic_* instead of catomic_* macros.
859 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
861         [BZ #3285]
862         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
863         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
864         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
865         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
866         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
867         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
868         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
869         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
870         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
871         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
872         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
873         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
874         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
876 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
878         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
879         cancelable syscalls with six parameters.
881         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
882         operations instead of atomic_*.
884 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
886         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
888 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
890         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
891         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
892         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
893         New file.
894         * pthread_attr_setstack.c: Allow overwriting the version number of the
895         new symbol.
896         * pthread_attr_setstacksize.c: Likewise.
897         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
898         it.
899         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
900         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
902 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
904         [BZ #3251]
905         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
906         Patch by Petr Baudis.
908 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
910         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
912         * tst-cancel2.c (tf): Loop as long as something was written.
914 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
916         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
917         mutexes wake all mutexes.
918         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
919         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
920         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
922 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
924         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
925         to guarantee the thread is always canceled.
927 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
929         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
930         Include stdlib.h.
931         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
932         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
933         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
934         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
935         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
937 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
939         [BZ #3123]
940         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
941         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
942         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
945         * Makefile (tests): Add tst-cond22.
946         * tst-cond22.c: New file.
948 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
950         [BZ #3124]
951         * descr.h (struct pthread): Add parent_cancelhandling.
952         * sysdeps/pthread/createthread.c (create_thread): Pass parent
953         cancelhandling value to child.
954         * pthread_create.c (start_thread): If parent thread was canceled
955         reset the SIGCANCEL mask.
956         * Makefile (tests): Add tst-cancel25.
957         * tst-cancel25.c: New file.
959 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
960             Ulrich Drepper  <drepper@redhat.com>
962         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
963         counterp if it is already zero.
964         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
966 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
967             Roland McGrath  <roland@redhat.com>
969         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
970         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
971         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
972         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
973         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
974         lll_robust_mutex_timedlock, lll_mutex_unlock,
975         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
976         Add _L_*_ symbols around the subsection.
977         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
978         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
980 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
981             Roland McGrath  <roland@redhat.com>
983         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
984         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
985         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
986         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
987         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
988         lll_robust_mutex_timedlock, lll_mutex_unlock,
989         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
990         Add _L_*_ symbols around the subsection.
991         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
992         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
994 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
996         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
997         change because it can disturb too much existing code.  If real hard
998         reader preference is needed we'll introduce another type.
999         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1000         (pthread_rwlock_timedwrlock): Likewise.
1001         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1002         Likewise.
1004 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1006         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1007         reader preference.
1008         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1009         (pthread_rwlock_timedwrlock): Likewise.
1010         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1011         Likewise.
1013 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1015         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1016         Only define ifdef SHARED.
1018 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1020         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1021         (free_stacks): ...here.
1022         (__free_stack_cache): New function.
1023         * pthreadP.h: Declare __free_stack_cache.
1024         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1025         ptr_freeres.
1026         * init.c (pthread_functions): Initialize ptr_freeres.
1027         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1028         New freeres function.
1030 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
1032         [BZ #3018]
1033         * Makefile (extra-objs): Add modules to extra-test-objs instead.
1035 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
1037         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1038         _XOPEN_REALTIME_THREADS.
1040 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
1042         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1043         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1044         HAVE_CLOCK_GETTIME_VSYSCALL.
1045         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1047 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
1049         * sysdeps/unix/sysv/linux/bits/posix_opt.h
1050         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1051         * descr.h (struct priority_protection_data): New type.
1052         (struct pthread): Add tpp field.
1053         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1054         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1055         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1056         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1057         TPP mutexes.
1058         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1059         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1060         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1061         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1062         * tpp.c: New file.
1063         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1064         boosted by TPP.
1065         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1066         * pthread_mutexattr_getprioceiling.c
1067         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1068         in the SCHED_FIFO priority range.
1069         * pthread_mutexattr_setprioceiling.c
1070         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1071         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1072         if mutex is not TPP.  Ceiling is now in __data.__lock.
1073         * pthread_mutex_setprioceiling.c: Include stdbool.h.
1074         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
1075         is now in __data.__lock.  Add locking.
1076         * pthread_create.c (__free_tcb): Free pd->tpp structure.
1077         * Makefile (libpthread-routines): Add tpp.
1078         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1079         * tst-tpp.h: New file.
1080         * tst-mutexpp1.c: New file.
1081         * tst-mutexpp6.c: New file.
1082         * tst-mutexpp10.c: New file.
1083         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1084         * tst-mutex6.c (TEST_FUNCTION): Likewise.
1086 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
1088         [BZ #2843]
1089         * pthread_join.c (pthread_join): Account for self being canceled
1090         when checking for deadlocks.
1091         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
1092         (tf1): Don't print anything after pthread_join returns, this would be
1093         another cancellation point.
1094         (tf2): Likewise.
1095         * tst-join6.c: New file.
1096         * Makefile (tests): Add tst-join6.
1098 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
1100         [BZ #2892]
1101         * pthread_setspecific.c (__pthread_setspecific): Check
1102         out-of-range index before checking for unused key.
1104         * sysdeps/pthread/gai_misc.h: New file.
1106 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
1108         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
1109         file.  Don't use sysctl.
1110         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
1111         overwrite the file if this is likely not true.
1113 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
1115         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1116         * Makefile (tests): Add tst-getpid3.
1117         * tst-getpid3.c: New file.
1119 2006-07-30  Roland McGrath  <roland@redhat.com>
1121         * Makefile (libpthread-routines): Add ptw-sigsuspend.
1123         * sysdeps/unix/sysv/linux/i386/not-cancel.h
1124         (pause_not_cancel): New macro.
1125         (nanosleep_not_cancel): New macro.
1126         (sigsuspend_not_cancel): New macro.
1127         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1128         nanosleep_not_cancel macro from <not-cancel.h>.
1129         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1130         macro from <not-cancel.h>.
1132 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
1133             Jakub Jelinek  <jakub@redhat.com>
1135         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1136         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
1137         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1138         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1139         * pthread_mutex_init.c: Add support for priority inheritance mutex.
1140         * pthread_mutex_lock.c: Likewise.
1141         * pthread_mutex_timedlock.c: Likewise.
1142         * pthread_mutex_trylock.c: Likewise.
1143         * pthread_mutex_unlock.c: Likewise.
1144         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1145         all mutexes.
1146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1147         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1148         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1149         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1150         pthread-pi-defines.sym.
1151         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1152         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1153         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1154         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1155         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1156         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1157         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1158         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1159         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1160         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1161         _POSIX_THREAD_PRIO_INHERIT to 200112L.
1162         * tst-mutex1.c: Adjust to allow use in PI mutex test.
1163         * tst-mutex2.c: Likewise.
1164         * tst-mutex3.c: Likewise.
1165         * tst-mutex4.c: Likewise.
1166         * tst-mutex5.c: Likewise.
1167         * tst-mutex6.c: Likewise.
1168         * tst-mutex7.c: Likewise.
1169         * tst-mutex7a.c: Likewise.
1170         * tst-mutex8.c: Likewise.
1171         * tst-mutex9.c: Likewise.
1172         * tst-robust1.c: Likewise.
1173         * tst-robust7.c: Likewise.
1174         * tst-robust8.c: Likewise.
1175         * tst-mutexpi1.c: New file.
1176         * tst-mutexpi2.c: New file.
1177         * tst-mutexpi3.c: New file.
1178         * tst-mutexpi4.c: New file.
1179         * tst-mutexpi5.c: New file.
1180         * tst-mutexpi6.c: New file.
1181         * tst-mutexpi7.c: New file.
1182         * tst-mutexpi7a.c: New file.
1183         * tst-mutexpi8.c: New file.
1184         * tst-mutexpi9.c: New file.
1185         * tst-robust1.c: New file.
1186         * tst-robust2.c: New file.
1187         * tst-robust3.c: New file.
1188         * tst-robust4.c: New file.
1189         * tst-robust5.c: New file.
1190         * tst-robust6.c: New file.
1191         * tst-robust7.c: New file.
1192         * tst-robust8.c: New file.
1193         * Makefile (tests): Add the new tests.
1195         * pthread_create.c (start_thread): Add some casts to avoid warnings.
1196         * pthread_mutex_destroy.c: Remove unneeded label.
1198 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
1200         * pthread_mutex_init.c (__pthread_mutex_init): Move some
1201         computations to compile time.
1203 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
1205         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1207 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
1209         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
1211 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
1213         * pthread_key_create.c (__pthread_key_create): Do away with
1214         __pthread_keys_lock.
1216         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1217         (__kernel_cpumask_size): Mark as hidden.
1218         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1220         * sem_open.c (__sem_mappings_lock): Mark as hidden.
1221         * semaphoreP.h (__sem_mappings_lock): Likewise.
1223 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
1225         * pthread_atfork.c: Mark __dso_handle as hidden.
1227 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
1229         [BZ #2644]
1230         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
1231         the reload problem.  Change the one path in pthread_cancel_init
1232         which causes the problem.  Force gcc to reload.  Simplify callers.
1233         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
1234         (_Unwind_GetBSP): Undo last patch.
1236 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
1238         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
1239         function pointer is reloaded after pthread_cancel_init calls.
1241         [BZ #2644]
1242         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
1243         pointers are reloaded after pthread_cancel_init calls.
1245 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
1247         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
1248         __always_inline.
1250 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
1252         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1253         Allocate new object which is passed to timer_sigev_thread so that
1254         the timer can be deleted before the new thread is scheduled.
1256 2006-04-26  Roland McGrath  <roland@redhat.com>
1258         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
1260 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
1262         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
1263         suffix for conditional jumps.
1264         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1265         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1266         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1267         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1268         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1269         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1271         * init.c (sigcancel_handler): Compare with correct PID even if the
1272         thread is in the middle of a fork call.
1273         (sighandler_setxid): Likewise.
1274         Reported by Suzuki K P <suzuki@in.ibm.com> .
1276 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
1278         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
1280 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
1282         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
1283         fails [Coverity CID 105].
1285 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
1287         * sysdeps/pthread/pthread.h: Add nonnull attributes.
1289 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
1291         [BZ #2505]
1292         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
1293         Define __lll_rel_instr using lwsync.
1295 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
1297         * allocatestack.c (allocate_stack): Always initialize robust_head.
1298         * descr.h: Define struct robust_list_head.
1299         (struct pthread): Use robust_list_head in robust mutex list definition.
1300         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
1301         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
1302         (__pthread_initialize_minimal_internal): Register robust_list with
1303         the kernel.
1304         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
1305         Declare __set_robust_list_avail.
1306         * pthread_create.c (start_thread): Register robust_list of new thread.
1307         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
1308         waiters.
1309         * pthread_mutex_destroy.c: For robust mutexes don't look at the
1310         number of users, it's unreliable.
1311         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
1312         set_robust_list syscall is available.
1313         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
1314         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
1315         Set robust_head.list_op_pending before trying to lock a robust mutex.
1316         * pthread_mutex_timedlock.c: Likewise.
1317         * pthread_mutex_trylock.c: Likewise.
1318         * pthread_mutex_unlock.c: Likewise for unlocking.
1319         * Makefile (tests): Add tst-robust8.
1320         * tst-robust8.c: New file.
1322 2006-03-08  Andreas Schwab  <schwab@suse.de>
1324         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
1325         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
1327 2006-03-05  Roland McGrath  <roland@redhat.com>
1329         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
1330         and $config_os doesn't match *linux*.
1332 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
1334         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
1335         Use __syscall_error.
1336         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1337         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1338         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
1339         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1340         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1341         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
1343 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
1345         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
1347 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
1349         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1350         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
1351         mutex.
1352         (__lll_robust_timedlock_wait): Likewise.
1353         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
1354         (__lll_robust_lock_wait): Likewise.
1355         (__lll_robust_timedlock_wait): Likewise.
1356         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1357         (__lll_robust_lock_wait): Likewise.
1358         (__lll_robust_timedlock_wait): Likewise.
1360 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
1362         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
1363         lll_robust_mutex_trylock, lll_robust_mutex_lock,
1364         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
1365         lll_robust_mutex_unlock): Define.
1366         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
1368 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
1370         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
1371         instead of <clone.S>.
1373 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
1375         * Makefile (libpthread-routines): Add
1376         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
1377         and pthread_mutex_[sg]etprioceiling.
1378         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
1379         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
1380         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
1381         pthread_mutex_setprioceiling.
1382         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
1383         PTHREAD_PRIO_PROTECT): New enum values.
1384         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
1385         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
1386         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
1387         prototypes.
1388         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
1389         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
1390         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
1391         Define.
1392         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
1393         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
1394         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
1395         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
1396         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
1397         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
1398         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
1399         protocol mutexes.
1400         * pthread_mutex_getprioceiling.c: New file.
1401         * pthread_mutex_setprioceiling.c: New file.
1402         * pthread_mutexattr_getprioceiling.c: New file.
1403         * pthread_mutexattr_setprioceiling.c: New file.
1404         * pthread_mutexattr_getprotocol.c: New file.
1405         * pthread_mutexattr_setprotocol.c: New file.
1407 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
1409         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
1411 2006-02-27  Roland McGrath  <roland@redhat.com>
1413         * sysdeps/pthread/Subdirs: List nptl here too.
1414         * configure (libc_add_on_canonical): New variable.
1416         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
1418         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
1419         self to get main source tree's file.
1420         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
1421         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
1422         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
1423         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
1424         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
1425         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
1426         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
1427         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
1428         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
1429         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
1430         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
1431         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
1432         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
1434         * Makefile: Use $(sysdirs) in vpath directive.
1436         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
1437         (CPPFLAGS-timer_routines.c): Likewise.
1439         * Makeconfig (includes): Variable removed.
1441 2006-02-26  Roland McGrath  <roland@redhat.com>
1443         * sysdeps/generic/pt-raise.c: Moved to ...
1444         * pt-raise.c: ... here.
1445         * sysdeps/generic/lowlevellock.h: Moved to ...
1446         * lowlevellock.h: ... here.
1448 2006-02-23  Roland McGrath  <roland@redhat.com>
1450         * descr.h (struct pthread): Add final member `end_padding'.
1451         (PTHREAD_STRUCT_END_PADDING): Use it.
1453 2006-02-20  Roland McGrath  <roland@redhat.com>
1455         * sysdeps/mips: Directory removed, saved in ports repository.
1456         * sysdeps/unix/sysv/linux/mips: Likewise.
1458 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
1460         * tst-robust1.c: Add second mutex to check that the mutex list is
1461         handled correctly.
1463 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
1465         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
1466         lll_robust_mutex_trylock, lll_robust_mutex_lock,
1467         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
1468         lll_robust_mutex_unlock): New macros.
1469         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
1470         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1471         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1472         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1473         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
1475 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1477         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
1478         definitions.
1479         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
1481 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
1483         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1484         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
1485         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1486         (lll_robust_mutex_unlock): Likewise.
1488 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
1490         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
1491         Set robust_list.__next rather than robust_list.
1492         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1493         (__pthread_list_t): New typedef.
1494         (pthread_mutex_t): Replace __next and __prev fields with __list.
1495         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1496         (__pthread_list_t): New typedef.
1497         (pthread_mutex_t): Replace __next and __prev fields with __list.
1498         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1499         (__pthread_list_t, __pthread_slist_t): New typedefs.
1500         (pthread_mutex_t): Replace __next and __prev fields with __list.
1501         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1502         (__pthread_list_t, __pthread_slist_t): New typedefs.
1503         (pthread_mutex_t): Replace __next and __prev fields with __list.
1504         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1505         (__pthread_list_t, __pthread_slist_t): New typedefs.
1506         (pthread_mutex_t): Replace __next and __prev fields with __list.
1507         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
1508         (__pthread_slist_t): New typedef.
1509         (pthread_mutex_t): Replace __next field with __list.
1511 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
1513         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
1514         PTHREAD_MUTEX_OWNERDEAD.
1515         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
1516         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
1517         * Makefile (libpthread-routines): Add lowlevelrobustlock.
1518         * pthread_create.c (start_thread): Very much simplify robust_list loop.
1519         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
1520         to PTHREAD_MUTEX_INCONSISTENT.
1521         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
1522         * pthread_mutex_lock.c: Reimplement robust mutex handling.
1523         * pthread_mutex_trylock.c: Likewise.
1524         * pthread_mutex_timedlock.c: Likewise.
1525         * pthread_mutex_unlock.c: Likewise.
1526         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1527         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1528         lowlevelrobustlock.sym.
1529         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
1530         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
1531         definitions.
1532         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1533         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
1534         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
1535         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
1536         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
1538 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
1540         * allocatestack.c (allocate_stack): Initialize robust_list.
1541         * init.c (__pthread_initialize_minimal_internal): Likewise.
1542         * descr.h (struct xid_command): Pretty printing.
1543         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
1544         robust_list.  Adjust macros.
1545         * pthread_create.c (start_thread): Adjust robust_list handling.
1546         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
1547         but the owner for all robust mutex types.
1548         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1549         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
1550         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1551         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
1553         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
1554         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
1556 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
1558         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
1559         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
1561 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1563         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
1564         Return status.
1565         (lll_futex_timed_wait): Define.
1567 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
1569         * tst-cancel4.c: Test ppoll.
1571 2006-01-18  Andreas Jaeger  <aj@suse.de>
1573         [BZ #2167]
1574         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
1575         (pthread_mutex_t): Follow changes for other archs.  Based on patch
1576         by Jim Gifford <patches@jg555.com>.
1578 2006-01-13  Richard Henderson  <rth@redhat.com>
1580         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
1582 2006-01-10  Roland McGrath  <roland@redhat.com>
1584         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
1585         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1586         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1587         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1588         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1589         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1590         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1591         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1592         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1593         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1595 2006-01-09  Roland McGrath  <roland@redhat.com>
1597         * tst-initializers1-c89.c: New file.
1598         * tst-initializers1-c99.c: New file.
1599         * tst-initializers1-gnu89.c: New file.
1600         * tst-initializers1-gnu99.c: New file.
1601         * Makefile (tests): Add them.
1602         (CFLAGS-tst-initializers1-c89.c): New variable.
1603         (CFLAGS-tst-initializers1-c99.c): New variable.
1604         (CFLAGS-tst-initializers1-gnu89.c): New variable.
1605         (CFLAGS-tst-initializers1-gnu99.c): New variable.
1607         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1608         Use __extension__ on anonymous union definition.
1609         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1610         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1611         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1612         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1613         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1615 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
1617         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1618         Don't give the union a name because it changes the mangled name.
1619         Instead name the struct for __data.
1620         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
1621         Likewise.
1622         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
1623         Likewise.
1625 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
1627         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
1628         stack bias to mc_ftp field.
1630 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
1632         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
1633         being too clever and reloading the futex value where it shouldn't.
1635 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
1637         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
1638         correct type.
1640 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
1642         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1643         Add cfi directives.
1645 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
1647         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
1648         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
1649         rename in tcbhead_t.
1651         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1652         Don't give the union a name because it changes the mangled name.
1653         Instead name the struct for __data.
1654         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1655         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1656         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1657         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1658         * pthread_create.c (start_thread): Adjust robust mutex free loop.
1659         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
1661 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
1663         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1664         Return status.
1665         (lll_futex_timed_wait): Define.
1666         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1667         * sysdeps/pthread/aio_misc.h: New file.
1669 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
1671         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
1673 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
1675         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1676         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
1677         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1679 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
1681         * tst-cancel24.cc: Use C headers instead of C++ headers.
1683 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
1685         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
1686         sparc-linux configured glibc.
1687         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
1688         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
1689         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
1690         atomic_compare_and_exchange_val_24_acq instead of
1691         atomic_compare_and_exchange_val_acq.
1692         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
1693         instead of atomic_exchange_rel.
1694         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
1695         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
1696         file.
1697         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
1698         file.
1699         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
1700         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
1701         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
1702         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
1703         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
1704         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1705         New file.
1706         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1707         New file.
1708         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
1709         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
1710         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
1711         file.
1712         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
1713         file.
1714         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
1716 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
1718         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
1719         mutex initializers.
1721 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
1723         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
1724         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1725         THREAD_COPY_POINTER_GUARD): Define.
1726         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
1727         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
1729 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
1731         * version.c: Update copyright year.
1733 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1735         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
1736         .eh_frame section, use cfi_* directives.
1737         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
1739 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
1741         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
1742         now.
1744 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
1746         * sysdeps/pthread/sigaction.c: Removed.
1747         * sigaction.c: New file.
1748         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1750 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
1752         * Makefile (tests): Add tst-signal7.
1753         * tst-signal7.c: New file.
1755 2005-12-27  Roland McGrath  <roland@redhat.com>
1757         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1758         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1759         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1760         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1761         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1762         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1763         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1764         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1765         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1766         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1767         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1769 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
1771         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1772         and __prev field to pthread_mutex_t.
1773         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1774         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1775         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1776         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1777         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1778         to pthread_mutex_t.
1780 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
1782         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1783         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1784         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1785         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1786         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1787         and PTHREAD_MUTEXATTR_FLAG_BITS.
1788         * descr.h (struct pthread): Add robust_list field and define
1789         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1790         * pthread_mutexattr_getrobust.c: New file.
1791         * pthread_mutexattr_setrobust.c: New file.
1792         * pthread_mutex_consistent.c: New file.
1793         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1794         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1795         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1796         Adjust pthread_mutex_t initializers.
1797         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1798         field to pthread_mutex_t.
1799         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1800         and __prev field to pthread_mutex_t.
1801         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1802         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1803         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1804         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1805         * pthread_mutexattr_gettype.c: Likewise.
1806         * pthread_mutexattr_setpshared.c: Likewise.
1807         * pthread_mutexattr_settype.c: Likewise.
1808         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1809         Initialize mutex kind according to robust flag.
1810         * pthread_mutex_lock.c: Implement local robust mutex.
1811         * pthread_mutex_timedlock.c: Likewise.
1812         * pthread_mutex_trylock.c: Likewise.
1813         * pthread_mutex_unlock.c: Likewise.
1814         * pthread_create.c (start_thread): Mark robust mutexes which remained
1815         locked as dead.
1816         * tst-robust1.c: New file.
1817         * tst-robust2.c: New file.
1818         * tst-robust3.c: New file.
1819         * tst-robust4.c: New file.
1820         * tst-robust5.c: New file.
1821         * tst-robust6.c: New file.
1822         * tst-robust7.c: New file.
1823         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1824         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1825         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1826         tst-robust5, tst-robust6, and tst-robust7.
1828         * tst-typesizes.c: New file.
1829         * Makefile (tests): Add tst-typesizes.
1831         * tst-once3.c: More debug output.
1833 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
1835         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1836         missing after last change.
1838         * version.c: Update copyright year.
1840 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
1842         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1843         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1844         * pthread_mutex_trylock.c: Likewise.
1845         * pthread_mutex_timedlock.c: Likewise.
1846         * pthread_mutex_unlock.c: Likewise.
1848 2005-12-22  Roland McGrath  <roland@redhat.com>
1850         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1851         so that #include_next's search location is not reset to the -I..
1852         directory where <nptl/...> can be found.
1854 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
1856         [BZ #1913]
1857         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1858         Fix unwind info.  Remove useless branch prediction prefix.
1859         * tst-cancel24.cc: New file.
1860         * Makefile: Add rules to build and run tst-cancel24.
1862 2005-12-21  Roland McGrath  <roland@redhat.com>
1864         * libc-cancellation.c: Use <> rather than "" #includes.
1865         * pt-cleanup.c: Likewise.
1866         * pthread_create.c: Likewise.
1867         * pthread_join.c: Likewise.
1868         * pthread_timedjoin.c: Likewise.
1869         * pthread_tryjoin.c: Likewise.
1870         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1871         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1872         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1873         * unwind.c: Likewise.
1875 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1877         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1878         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1879         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1880         THREAD_COPY_POINTER_GUARD): Define.
1882 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
1884         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1885         rather than one.
1886         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1887         THREAD_COPY_POINTER_GUARD): Define.
1888         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1889         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1890         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1891         THREAD_COPY_POINTER_GUARD): Define.
1892         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1893         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1894         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1895         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1896         Use PTR_DEMANGLE for B0 if defined.
1898 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
1900         * pthread_create.c (__pthread_create_2_1): Use
1901         THREAD_COPY_POINTER_GUARD if available.
1902         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1903         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1904         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1905         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1906         * sysdeps/x86_64/tls.h: Likewise.
1908 2005-12-15  Roland McGrath  <roland@redhat.com>
1910         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1912 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1914         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1915         sysdeps/generic.
1916         * errno-loc.c: New file.
1918 2005-12-12  Roland McGrath  <roland@redhat.com>
1920         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1921         adjustments before choosing stack size.  Update minimum stack size
1922         calculation to match allocate_stack change.
1924 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1926         * allocatestack.c (allocate_stack): Don't demand that there is an
1927         additional full page available on the stack beside guard, TLS, the
1928         minimum stack.
1930 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1932         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1933         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1935         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1936         compiling 32-bit code we must define __cleanup_fct_attribute.
1938 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1940         [BZ #1920]
1941         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1942         __attribute__ instead of __attribute.
1943         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1944         (__cleanup_fct_attribute): Likewise.
1946 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1948         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1949         a write barrier before writing libgcc_s_getcfa.
1951 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1953         * sysdeps/unix/sysv/linux/configure: Removed.
1955 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1957         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1958         optional init_array/fini_array support.
1960 2005-10-24  Roland McGrath  <roland@redhat.com>
1962         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1963         versioned_symbol use.
1965 2005-10-16  Roland McGrath  <roland@redhat.com>
1967         * init.c (__pthread_initialize_minimal_internal): Even when using a
1968         compile-time default stack size, apply the minimum that allocate_stack
1969         will require, and round up to page size.
1971 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1973         * Makefile ($(test-modules)): Remove static pattern rule.
1975 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1976             Ulrich Drepper  <drepper@redhat.com>
1978         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1979         alignment in callback function.
1980         * Makefile: Add rules to build and run tst-align3.
1981         * tst-align3.c: New file.
1983 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1985         * allocatestack.c (setxid_signal_thread): Add
1986         INTERNAL_SYSCALL_DECL (err).
1988 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1990         * allocatestack.c (setxid_signal_thread): Need to use
1991         atomic_compare_and_exchange_bool_acq.
1993 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1994             Jakub Jelinek  <jakub@redhat.com>
1996         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1997         CANCEL_RESTMASK.
1998         (struct pthread): Move specific_used field to avoid padding.
1999         Add setxid_futex field.
2000         * init.c (sighandler_setxid): Reset setxid flag and release the
2001         setxid futex.
2002         * allocatestack.c (setxid_signal_thread): New function.  Broken
2003         out of the bodies of the two loops in __nptl_setxid.  For undetached
2004         threads check whether they are exiting and if yes, don't send a signal.
2005         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2006         * pthread_create.c (start_thread): For undetached threads, check
2007         whether setxid bit is set.  If yes, wait until signal has been
2008         processed.
2010         * allocatestack.c (STACK_VARIABLES): Initialize them.
2011         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2013 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2015         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2016         waiters, awake all waiters on the associated mutex.
2018 2005-09-22  Roland McGrath  <roland@redhat.com>
2020         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2021         ../sysdeps/x86_64/hp-timing.h).
2023 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2025         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2026         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2027         (lll_futex_wake_unlock): Define.
2028         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2029         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2030         (lll_futex_wake_unlock): Define.
2031         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2032         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2033         (lll_futex_wake_unlock): Define.
2034         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2035         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2036         (lll_futex_wake_unlock): Define.
2037         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2038         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2039         (lll_futex_wake_unlock): Define.
2040         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2041         lll_futex_wake_unlock.
2042         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2043         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2044         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2045         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2046         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2047         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2049 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2051         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2052         Fix typo in register name.
2054 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
2056         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2057         Use __sigfillset.  Document that sigfillset does the right thing wrt
2058         to SIGSETXID.
2060 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2062         [BZ #1102]
2063         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2064         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2065         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2066         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2067         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2068         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2069         in the structure.
2070         * Makefile (tests): Add tst-initializers1.
2071         (CFLAGS-tst-initializers1.c): Set.
2072         * tst-initializers1.c: New test.
2074 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2076         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2077         Make sure __flags are located at offset 48 from the start of the
2078         structure.
2080 2005-07-02  Roland McGrath  <roland@redhat.com>
2082         * Makeconfig: Comment fix.
2084 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
2086         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2087         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2088         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2089         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2090         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2091         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2092         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2093         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2094         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2095         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2097 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
2099         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2100         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2101         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2102         fields.
2103         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2104         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2105         field.  Put in sysinfo field unconditionally.
2106         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2107         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2108         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2109         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2110         fields.
2111         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2112         * pthread_create.c (__pthread_create_2_1): Use
2113         THREAD_COPY_STACK_GUARD macro.
2114         * Makefile: Add rules to build and run tst-stackguard1{,-static}
2115         tests.
2116         * tst-stackguard1.c: New file.
2117         * tst-stackguard1-static.c: New file.
2119 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
2121         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2122         Invoke CGOTSETUP and CGOTRESTORE.
2123         (CGOTSETUP, CGOTRESTORE): Define.
2125 2005-05-29  Richard Henderson  <rth@redhat.com>
2127         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2128         (tf_write, tf_writev): Use it.
2129         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
2130         the system minimum.
2132 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
2134         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2135         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2136         __librt_*_asynccancel@local.
2138 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
2140         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2141         all occurrences of JUMPTARGET.  Instead append @local to labels.
2143 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
2145         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2146         size/alignment of struct pthread rather than tcbhead_t.
2147         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2148         Likewise.
2149         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2150         Likewise.
2151         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2152         Likewise.
2154 2005-05-19  Richard Henderson  <rth@redhat.com>
2156         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2157         __sync_val_compare_and_swap, not explicit _si variant.
2158         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2160 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
2162         [BZ #915]
2163         * sysdeps/pthread/pthread.h: Avoid empty initializers.
2165 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
2167         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2168         .eh_frame section, use cfi_* directives.
2170 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
2172         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2173         of "" includes.
2175 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
2177         [BZ #1075]
2178         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2179         aio_write blocks.
2181 2005-04-27  Roland McGrath  <roland@redhat.com>
2183         * Makefile (tests): Remove tst-clock2.
2185         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2186         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2187         translating to the kernel clockid_t for our own process/thread clock.
2189         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2191 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
2193         * old_pthread_cond_init.c: Include <errno.h>.
2194         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2195         process shared or uses clock other than CLOCK_REALTIME.
2196         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2198 2005-04-13  David S. Miller  <davem@davemloft.net>
2200         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2201         * sysdeps/sparc/sparc64/clone.S: New file.
2203 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2205         [BZ #1102]
2206         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2207         __inline instead of inline.
2208         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2210 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
2212         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2213         functionally equivalent, but shorter instructions.
2214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2215         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2216         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2217         Likewise.
2218         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2219         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2220         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2221         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2222         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2223         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2224         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2225         Likewise.
2226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2227         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2229         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2230         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2232 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
2234         * sysdeps/mips/Makefile: New file.
2235         * sysdeps/mips/nptl-sysdep.S: New file.
2236         * sysdeps/mips/tcb-offsets.sym: New file.
2237         * sysdeps/mips/pthread_spin_lock.S: New file.
2238         * sysdeps/mips/pthread_spin_trylock.S: New file.
2239         * sysdeps/mips/pthreaddef.h: New file.
2240         * sysdeps/mips/tls.h: New file.
2241         * sysdeps/mips/jmpbuf-unwind.h: New file.
2242         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
2243         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
2244         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
2245         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
2246         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
2247         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
2248         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
2249         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
2250         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
2251         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
2253 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
2255         [BZ #1112]
2256         * pthread_create.c (__pthread_create_2_1): Rename syscall error
2257         variable to scerr.
2259 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
2261         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
2263 2005-02-25  Roland McGrath  <roland@redhat.com>
2265         * alloca_cutoff.c: Correct license text.
2266         * tst-unload.c: Likewise.
2267         * sysdeps/pthread/allocalim.h: Likewise.
2268         * sysdeps/pthread/pt-initfini.c: Likewise.
2269         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2270         * sysdeps/pthread/bits/sigthread.h: Likewise.
2271         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2272         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2274 2005-02-16  Roland McGrath  <roland@redhat.com>
2276         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2277         Use unsigned int * for ptr_nthreads.
2279 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
2281         [BZ #721]
2282         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
2283         gcc4.
2285 2005-02-07  Richard Henderson  <rth@redhat.com>
2287         [BZ #787]
2288         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
2289         argument.
2291 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
2293         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
2294         order of arguments in invocation of atomic_add_zero.
2296 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
2298         [BZ #737]
2299         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
2300         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
2301         at least gotntpoff relocation and addition.
2302         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2303         Likewise.
2304         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2305         Likewise.
2306         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2307         Likewise.
2309 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
2311         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
2312         entry for static tls deallocation fix.
2313         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
2314         also contains information whether the memory pointed to is static
2315         TLS or not.
2316         * sysdeps/i386/tls.h: Likewise.
2317         * sysdeps/ia64/tls.h: Likewise.
2318         * sysdeps/powerpc/tls.h: Likewise.
2319         * sysdeps/s390/tls.h: Likewise.
2320         * sysdeps/sh/tls.h: Likewise.
2321         * sysdeps/sparc/tls.h: Likewise.
2322         * sysdeps/x86_64/tls.h: Likewise.
2324 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
2326         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
2328 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
2330         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
2331         %esp.
2332         * Makefile (tests): Add tst-align2.
2333         * tst-align2.c: New test.
2334         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
2335         -mpreferred-stack-boundary=4.
2337 2004-12-18  Roland McGrath  <roland@redhat.com>
2339         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
2340         New file removed withdrawn for the moment.
2342 2004-12-17  Richard Henderson  <rth@redhat.com>
2344         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
2345         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
2347 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
2349         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
2350         Increased PTHREAD_STACK_MIN.
2352         * tst-context1.c (stacks): Use bigger stack size.
2354 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
2356         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
2357         * sysdeps/sparc/tcb-offsets.sym: Add TID.
2359 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
2361         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
2362         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
2363         * sysdeps/s390/tcb-offsets.sym (TID): Add.
2365 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
2367         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
2369 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
2371         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
2372         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
2374         * tst-getpid1.c: If child crashes, report this first.  Print which
2375         signal.
2377 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
2379         * init.c (__pthread_initialize_minimal_internal): Also unblock
2380         SIGSETXID.
2382 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2384         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
2385         _POSIX_THREAD_CPUTIME): Define to 0.
2386         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
2387         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
2388         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
2389         __timer_signal_thread_tclk): Remove.
2390         (init_module): Remove their initialization.
2391         (thread_cleanup): Remove their cleanup assertions.
2392         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
2393         __timer_signal_thread_tclk): Remove.
2394         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
2395         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
2396         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
2398 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
2400         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
2401         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
2403         * Makefile (tests): Add tst-getpid2.
2404         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
2405         (do_test): Use it.  Use __clone2 instead of clone on ia64.
2406         * tst-getpid2.c: New test.
2408 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2410         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
2412 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
2414         * Makefile (tests): Add tst-getpid1.
2415         * tst-getpid1.c: New file.
2416         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
2417         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
2419 2004-12-02  Roland McGrath  <roland@redhat.com>
2421         * Makefile (libpthread-nonshared): Variable removed.
2422         ($(objpfx)libpthread_nonshared.a): Target removed.
2423         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
2424         These are now handled by generic magic from
2425         libpthread-static-only-routines being set.
2427 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
2429         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
2430         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
2431         _POSIX_THREAD_PRIO_PROTECT): Define.
2432         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2433         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2434         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2436 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
2438         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
2439         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
2440         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
2441         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
2442         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2443         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2444         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2446 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
2448         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
2450         * Makefile (libpthread-routines): Add pthread_setschedprio.
2451         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
2452         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
2453         * pthread_setschedprio.c: New file.
2455 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
2457         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
2458         * pthread_cancel.c (pthread_create): Likewise.
2460         * Makefile (libpthread-routines): Add vars.
2461         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
2462         * init.c (__default_stacksize, __is_smp): Remove.
2463         * vars.c: New file.
2464         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
2465         and define a wrapper macro.
2466         (PTHREAD_STATIC_FN_REQUIRE): Define.
2467         * allocatestack.c (__find_thread_by_id): Undefine.
2468         * pthread_create (__pthread_keys): Remove.
2469         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
2470         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
2471         PTHREAD_STATIC_FN_REQUIRE.
2473 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2475         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
2476         parameter to REGISTER macro.
2478 2004-11-17  Roland McGrath  <roland@redhat.com>
2480         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
2481         Make sure SIGCANCEL is blocked as well.
2483 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
2485         * sysdeps/pthread/setxid.h: New file.
2486         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
2487         (struct xid_command): Add forward decl.
2488         (struct pthread_functions): Change return type of __nptl_setxid hook
2489         to int.
2490         * pthreadP.h (__nptl_setxid): Change return type to int.
2491         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
2492         calling thread, return its return value and set errno on failure.
2493         * descr.h (struct xid_command): Change id type to long array.
2495         * Makefile: Add rules to build and test tst-setuid1 and
2496         tst-setuid1-static.
2497         * tst-setuid1.c: New test.
2498         * tst-setuid1-static.c: New test.
2500 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
2502         * Makefile (tests): Add tst-exit3.
2503         * tst-exit3.c: New test.
2505 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
2507         * Makefile (tests): Add tst-exit2.
2508         * tst-exit2.c: New file.
2510 2004-11-09  Roland McGrath  <roland@redhat.com>
2512         [BZ #530]
2513         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
2514         here, before calling clone.
2515         * pthread_create.c (start_thread): Don't do it here.
2517 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
2519         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
2521 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
2523         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2524         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
2525         assembler warning.
2527 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
2529         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
2530         if sched_priority is not between minprio and maxprio.
2532 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2534         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2535         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
2537         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2538         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
2540 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
2542         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
2543         not-cancelable I/O functions.
2545 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2547         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2548         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
2549         make sure 2 is stored in the futex and we looked at the old value.
2550         Fix a few other problems to return the correct value.
2552 2004-10-14  Richard Henderson  <rth@redhat.com>
2554         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
2555         make gcc4 happy.
2557 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
2559         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
2560         of pthread-functions.h and pthreaddef.h.
2561         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
2563         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2564         Change __data.__nwaiters from int to unsigned int.
2566         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
2567         sysconf (_SC_THREAD_CPUTIME) returns negative value.
2569         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
2570         before return type.
2572         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
2573         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
2575 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
2577         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
2578         test fails, remove message queue.
2579         (tf_msgsnd): Likewise.
2581 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
2583         * tst-clock1.c: Change #ifdef to #if defined.
2584         * tst-clock2.c: Likewise.
2585         * tst-cond11.c: Likewise.
2587         * sysdeps/pthread/timer_create.c (timer_create): Use
2588         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
2589         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
2590         THREAD_CPUTIME.
2592 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
2594         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
2595         _POSIX_THREAD_CPUTIME): Define to 0.
2597 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
2599         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
2600         and _POSIX_THREAD_CPUTIME to zero.
2601         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2602         * tst-barrier2.c: Fix testing for POSIX feature.
2603         * tst-clock1.c: Likewise.
2604         * tst-clock2.c: Likewise.
2605         * tst-cond11.c: Likewise.
2606         * tst-cond4.c: Likewise.
2607         * tst-cond6.c: Likewise.
2608         * tst-flock2.c: Likewise.
2609         * tst-mutex4.c: Likewise.
2610         * tst-mutex9.c: Likewise.
2611         * tst-rwlock12.c: Likewise.
2612         * tst-rwlock4.c: Likewise.
2613         * tst-signal1.c: Likewise.
2614         * tst-spin2.c: Likewise.
2615         * sysdeps/pthread/posix-timer.h: Likewise.
2616         * sysdeps/pthread/timer_create.c: Likewise.
2617         * sysdeps/pthread/timer_routines.c: Likewise.
2619 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
2621         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2622         (__lll_mutex_timedlock_wait): Address futex correctly.
2624         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2625         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
2626         make sure 2 is stored in the futex and we looked at the old value.
2627         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2628         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
2629         which might very well made the code not working at all before.
2630         [BZ #417]
2632 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
2634         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2635         allow SIGSETXID to be sent.
2636         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
2637         for SIGSETXID to be defined.
2638         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
2639         SIGSETXID cannot be blocked.
2641         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2642         Add __extension__ to long long types.
2643         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2644         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2645         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2646         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2647         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2648         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2649         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2651 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
2653         * descr.h (struct pthread): Add stopped_start field.
2654         * sysdeps/pthread/createthread.c (create_thread): Set
2655         start_stopped flag in descriptor for new thread appropriately.
2656         * pthread_create.c (start_thread): Only take lock to be stopped on
2657         startup if stopped_start flag says so.
2659 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
2661         * pthread_create.c (__pthread_create_2_1): Remember whether thread
2662         is created detached and if yes, do not try to free the stack in case
2663         the thread creation failed.
2664         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
2665         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
2666         case there has been no error.  [BZ #405]
2668         * pthread_create.c (start_thread): Don't wait for scheduler data
2669         etc to be set at the beginning of the function.  The cancellation
2670         infrastructure must have been set up.  And enable async
2671         cancellation before potentially going to sleep.  [BZ #401]
2673 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
2675         * Versions: Remove exports for pthread_set*id_np functions.
2676         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
2677         for now.
2678         * Makefile: Don't build pthread_set*id code for now.
2680 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
2682         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
2683         internal use.
2684         * allocatestack.c (__nptl_setxid): New function.
2685         * descr.h (struct xid_command): Define type.
2686         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
2687         (sighandler_setxid): New function.
2688         (__pthread_initialize_minimal): Register sighandler_setxid for
2689         SIGCANCEL.
2690         * pt-allocrtsig.c: Update comment.
2691         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
2692         Declare __nptl_setxid.
2693         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
2694         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
2695         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2696         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2697         and pthread_setresuid_np.
2698         * pthread_setgid_np.c: New file.
2699         * pthread_setuid_np.c: New file.
2700         * pthread_setegid_np.c: New file.
2701         * pthread_seteuid_np.c: New file.
2702         * pthread_setregid_np.c: New file.
2703         * pthread_setreuid_np.c: New file.
2704         * pthread_setresgid_np.c: New file.
2705         * pthread_setresuid_np.c: New file.
2706         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
2707         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2708         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2709         and pthread_setresuid_np.
2710         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
2711         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
2712         pthread_setregid, and pthread_setresgid.
2714 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
2716         * allocatestack.c (allocate_stack): Return EAGAIN instead of
2717         ENOMEM when out of memory.
2719 2004-09-10  Roland McGrath  <roland@redhat.com>
2721         [BZ #379]
2722         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
2723         code, since we don't try to use the broken CLONE_STOPPED any more.
2724         * pthread_create.c (start_thread): Likewise.
2726 2004-09-15  Richard Henderson  <rth@redhat.com>
2728         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
2730 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
2732         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
2733         (__libc_unwind_longjmp): Delete macro and declare as function.
2734         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
2735         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
2736         nptl directory.
2737         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
2738         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
2739         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
2741 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
2743         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
2744         for __USE_XOPEN2K.
2745         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
2746         types also for __USE_XOPEN2K.
2747         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2748         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2749         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2750         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2751         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2752         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2753         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2754         [BZ #320]
2756 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
2758         * sysdeps/pthread/pthread.h
2759         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2760         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2761         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2762         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2763         [BZ #375]
2765 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
2767         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2768         PSEUDO to be used with . prefix.
2770         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2771         Use atomic_increment instead of atomic_exchange_and_add.
2772         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2773         Likewise.
2774         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2775         Likewise.
2776         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2777         Likewise.
2779         * allocatestack.c (allocate_stack): Use atomic_increment_val
2780         instead of atomic_exchange_and_add.
2781         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2782         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2783         Likewise.
2784         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2785         Likewise.
2787         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2788         the initialization function might throw.
2790 2005-09-05  Richard Henderson  <rth@redhat.com>
2792         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2793         Move definition inside libpthread, libc, librt check.  Provide
2794         definition for rtld.
2796 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
2798         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2799         * sysdeps/i386/jmpbuf-unwind.h: Likewise
2800         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2801         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2802         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2803         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2804         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2805         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2806         * unwind.c: Use it.
2808         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2809         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2810         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2811         Likewise.
2812         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2813         Decrement __nwaiters.  If pthread_cond_destroy has been called and
2814         this is the last waiter, signal pthread_cond_destroy caller and
2815         avoid using the pthread_cond_t structure after unlock.
2816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2818         Read clock type from the least significant bits of __nwaiters instead
2819         of __clock.
2820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2821         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2823 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
2825         [BZ #342]
2826         * Makefile (tests): Add tst-cond20 and tst-cond21.
2827         * tst-cond20.c: New test.
2828         * tst-cond21.c: New test.
2829         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2830         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2831         it unsigned int.
2832         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2833         Likewise.
2834         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2835         (pthread_cond_t): Likewise.
2836         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2837         Likewise.
2838         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2839         Likewise.
2840         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2841         Likewise.
2842         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2843         (cond_nwaiters): New.
2844         (clock_bits): New.
2845         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2846         if there are waiters not signalled yet.
2847         Wait until all already signalled waiters wake up.
2848         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2849         __nwaiters.  If pthread_cond_destroy has been called and this is the
2850         last waiter, signal pthread_cond_destroy caller and avoid using
2851         the pthread_cond_t structure after unlock.
2852         (__pthread_cond_wait): Increment __nwaiters in the beginning,
2853         decrement it when leaving.  If pthread_cond_destroy has been called
2854         and this is the last waiter, signal pthread_cond_destroy caller.
2855         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2856         Likewise.  Read clock type from the least significant bits of
2857         __nwaiters instead of __clock.
2858         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2859         whether clock ID can be encoded in COND_CLOCK_BITS bits.
2860         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2861         clock type just from the last COND_CLOCK_BITS bits of value.
2862         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2863         instead of __clock, just from second bit of condattr's value.
2865 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
2867         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2868         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
2869         != 64.
2870         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2872 2004-08-15  Roland McGrath  <roland@frob.com>
2874         * pthread_atfork.c: Update copyright terms including special exception
2875         for these trivial files, which are statically linked into executables
2876         that use dynamic linking for the significant library code.
2878 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
2880         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2881         pthread_rwlock_rdlock.
2882         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2883         Decrease __nr_readers_queued after reacquiring lock.
2884         * sysdeps/pthread/pthread_rwlock_timedrdlock
2885         (pthread_rwlock_timedrdlock): Likewise.
2886         Reported by Bob Cook <bobcook47@hotmail.com>.
2888 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
2890         * tst-rwlock14.c (tf): Read main thread handle from *ARG
2891         before pthread_barrier_wait.
2893 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
2895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2896         Remove unnecessary exception handling data.
2898 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
2900         [BZ #284]
2901         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2902         instead of clockid_t.
2904 2004-07-21  Roland McGrath  <roland@redhat.com>
2906         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2908 2004-07-19  Roland McGrath  <roland@redhat.com>
2910         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2912 2004-07-02  Roland McGrath  <roland@redhat.com>
2914         * configure: Don't exit.
2916 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2918         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2919         (__pthread_cond_timedwait): Check for invalid nanosecond in
2920         timeout value.
2922 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2924         * Makefile: Add rules to build and run tst-fini1.
2925         * tst-fini1.c: New file.
2926         * tst-fini1mod.c: New file.
2928 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2930         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2931         if no cancellation support is needed.
2932         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2933         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2934         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2935         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2936         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2937         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2938         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2939         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2940         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2942         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2943         only if not already defined.
2945 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2947         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2948         constraint "m" instead of "0" for futex.
2950         * shlib-versions: Add powerpc64-.*-linux.*.
2952 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2954         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2955         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2956         for valid tv_nsec.
2957         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2958         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2959         bits.
2961 2004-06-29  Roland McGrath  <roland@redhat.com>
2963         * Banner: NPTL no longer has its own version number.
2964         * Makefile (nptl-version): Variable removed.
2965         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2966         using $(version), the glibc version number.
2968 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2970         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2971         Fix branch offset for a PLT entry.
2972         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2973         Likewise.
2974         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2975         Likewise.
2976         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2977         Likewise.
2978         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2979         Likewise.
2981 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2983         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2984         unconditionally.
2986 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2988         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2989         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2990         instead of tv_sec.
2991         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2992         (pthread_rwlock_timedrdlock): Likewise.
2994 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2996         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2997         Set __r7 to val, not mutex.
2999 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3001         * Makefile: Add rules to build tst-rwlock14.
3002         * tst-rwlock14.c: New file.
3004 2004-06-24  Boris Hu  <boris.hu@intel.com>
3006         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3007         check.
3008         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3010 2004-06-19  Andreas Jaeger  <aj@suse.de>
3012         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3013         assembler in last patch.
3015 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3017         * sysdeps/pthread/pthread_cond_timedwait.c
3018         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3020         (__pthread_cond_timedwait): Check for invalid nanosecond in
3021         timeout value.
3022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3023         * tst-cond19.c: New file.
3024         * Makefile: Add rules to build and run tst-cond19.
3026 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3028         * tst-context1.c (GUARD_PATTERN): Defined.
3029         (tst_context_t): Define struct containing ucontext_t & guard words.
3030         (ctx): Declare as an array of tst_context_t.
3031         (fct): Verify uc_link & guard words are still valid.
3032         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
3034 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3036         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3037         Add __data.__futex field, reshuffle __data.__clock.
3038         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3039         (__pthread_cond_signal): Increment __futex at the same time as
3040         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3041         address of low 32-bits of __wakeup_seq to futex syscall.
3042         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3043         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3044         releasing internal lock to FUTEX_WAIT.
3045         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3046         (__pthread_cond_timedwait): Likewise.
3047         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3048         (FUTEX_CMP_REQUEUE): Define.
3049         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3050         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3051         Pass __futex value from before the unlock and __futex address instead
3052         of address of low 32-bits of __wakeup_seq to futex syscall.
3053         Fallback to FUTEX_WAKE all on any errors.
3055 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
3057         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3058         comment typo.
3059         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3060         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3061         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3062         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3063         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
3065 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3067         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3068         Add memory clobber to inline assembly.
3069         (__lll_mutex_trylock): Likewise.
3070         (__lll_mutex_cond_trylock): Likewise.
3072 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3074         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3075         Pass val argument as 6th system call argument in %r7.
3077 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3079         * Makefile (tests): Add tst-cond16.
3080         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3081         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3082         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3083         Add __data.__futex field, reshuffle __data.__clock.
3084         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3085         (__pthread_cond_signal): Increment __futex at the same time as
3086         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3087         address of low 32-bits of __wakeup_seq to futex syscall.
3088         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3089         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3090         releasing internal lock to FUTEX_WAIT.
3091         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3092         (__pthread_cond_timedwait): Likewise.
3093         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3094         (FUTEX_CMP_REQUEUE): Define.
3095         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3096         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3097         Pass __futex value from before the unlock and __futex address instead
3098         of address of low 32-bits of __wakeup_seq to futex syscall.
3099         Fallback to FUTEX_WAKE all on any errors.
3100         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3101         Define.
3102         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3103         internally.  Return non-zero if error, zero if success.
3104         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3105         Add __data.__futex field, reshuffle __data.__clock.
3106         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3107         Define.
3108         (lll_futex_requeue): Add val argument, return 1 unconditionally
3109         for the time being.
3110         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3111         Add __data.__futex field, reshuffle __data.__clock.
3112         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3113         Define.
3114         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3115         internally.  Return non-zero if error, zero if success.
3116         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3117         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3118         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3119         Define.
3120         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3121         internally.  Return non-zero if error, zero if success.
3122         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3123         Add __data.__futex field, reshuffle __data.__clock.
3124         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3125         Define.
3126         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3127         internally.  Return non-zero if error, zero if success.
3128         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3129         Add __data.__futex field, reshuffle __data.__clock.
3130         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3131         Add __data.__futex field, reshuffle __data.__clock.
3132         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3133         Increment __futex at the same time as __wakeup_seq or __total_seq.
3134         Pass address of __futex instead of address of low 32-bits of
3135         __wakeup_seq to futex syscall.
3136         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3137         Pass __futex value from before releasing internal lock
3138         to FUTEX_WAIT.
3139         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3140         Likewise.  Avoid unnecessary shadowing of variables.
3141         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3142         Set __futex to 2 * __total_seq.  Pass __futex value from before the
3143         unlock and __futex address instead of address of low 32-bits of
3144         __wakeup_seq to futex_requeue macro, adjust for new return value
3145         meaning.
3146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3147         (__pthread_cond_signal): Increment __futex at the same time as
3148         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3149         address of low 32-bits of __wakeup_seq to futex syscall.
3150         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3151         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3152         releasing internal lock to FUTEX_WAIT.
3153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3154         (__pthread_cond_timedwait): Likewise.
3155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3156         (FUTEX_CMP_REQUEUE): Define.
3157         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3158         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3159         Pass __futex value from before the unlock and __futex address instead
3160         of address of low 32-bits of __wakeup_seq to futex syscall.
3161         Fallback to FUTEX_WAKE all on any errors.
3163 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3165         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3166         Add nop to align the end of critical section.
3167         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3169 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3171         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3172         Add __broadcast_seq field.
3173         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3174         all waiters as woken with woken_seq and bump broadcast counter.
3175         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3176         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
3177         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3178         Comment typo fixes.  Avoid returning -ETIMEDOUT.
3180 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
3182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3183         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3184         Reported by Kaz Kojima.
3186 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
3188         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3190 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3192         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3193         __broadcast_seq with bc_seq after acquiring internal lock instead of
3194         before it.
3196 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
3198         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3199         compilation.
3200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3201         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3202         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3203         (pthread_cond_t): Add __data.__broadcast_seq field.
3204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3205         (FRAME_SIZE): Define.
3206         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
3207         Comment typo fixes.
3208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3209         Define.
3210         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
3211         typo fixes.
3212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3213         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
3214         fixes.
3216 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
3218         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
3219         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3220         Add __broadcast_seq field.
3221         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3222         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3223         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3224         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3225         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
3227         all waiters as woken with woken_seq and bump broadcast counter.
3228         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
3229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
3230         __broadcast_seq field.
3231         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3232         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3233         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3234         * pthread_cond_init.c: Initialize __broadcast_seq field.
3235         * Makefile (tests): Add tst-cond17 and tst-cond18.
3236         Add .NOTPARALLEL goal.
3237         * tst-cond16.c: New file.  From Jakub.
3238         * tst-cond17.c: New file.  From Jakub.
3239         * tst-cond18.c: New file.  From Jakub.
3241 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
3243         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
3244         unwind info.
3246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3247         Parametrize frame size.  Correct some unwind info.
3248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3250 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3252         * tst-stack3.c: Note testing functionality beyond POSIX.
3254 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3256         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
3257         Change conditional from ifdef to if.
3259 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
3261         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
3262         SYSDEP_CANCEL_ERROR): Define.
3263         (PSEUDO): Use it.
3265 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
3267         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
3269 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
3271         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
3273 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3275         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
3276         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3277         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
3278         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3280 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
3282         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
3283         thread has all signals blocked.
3285 2004-04-18  Andreas Jaeger  <aj@suse.de>
3287         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
3288         (SEM_VALUE_MAX): Add missing brace.
3290 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
3292         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
3293         in rt subdir.
3294         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
3295         * sysdeps/pthread/tst-mqueue8x.c: New test.
3296         * tst-cancel4.c: Update comment about message queues.
3298         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
3299         return it_value { 0, 0 }.
3300         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
3301         like SIGEV_SIGNAL.
3302         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
3303         assertion for SIGEV_NONE.
3304         (thread_attr_compare): Compare all attributes, not just a partial
3305         subset.
3307 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
3309         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
3311 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
3313         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
3314         Just use a plain number.
3315         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
3316         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3317         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3318         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3319         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3320         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3321         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3323 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3325         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
3326         frame info.
3327         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3329 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
3331         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
3332         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
3333         of calling sigwaitinfo.
3335 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
3337         * allocatestack.c (allocate_stack): Set reported_guardsize
3338         unconditionally.
3339         * pthread_getattr_np.c (pthread_getattr_np): Use
3340         reported_guardsize instead of guardsize.
3341         * descr.h (struct pthread): Add reported_guardsize field.
3343 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
3345         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
3347 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
3349         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
3351 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
3353         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
3354         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
3355         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
3356         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
3357         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3358         Define.
3359         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
3360         (_POSIX_MESSAGE_PASSING): Define.
3361         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
3362         (_POSIX_MESSAGE_PASSING): Define.
3363         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
3364         (_POSIX_MESSAGE_PASSING): Define.
3366 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
3368         * tst-context1.c (fct): Check whether correct stack is used.
3370 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
3372         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
3373         matching constraints for asm mem parameters.
3375         * tst-clock2.c (tf): Don't define unless needed.
3377 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
3379         * Makefile (link-libc-static): Use $(static-gnulib) instead of
3380         $(gnulib).
3382 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
3384         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
3385         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
3386         * pthreadP.h: Declare __nptl_deallocate_tsd.
3387         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
3388         Adjust caller.
3390         * Makefile (tests): Add tst-tsd5.
3391         * tst-tsd5.c: New file.
3393 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
3395         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3396         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
3397         is SHLIB_COMPAT check.
3398         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3399         (__pthread_attr_getaffinity_old): Likewise.
3400         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3401         (__pthread_getaffinity_old): Likewise.
3402         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3403         (__pthread_setaffinity_old): Likewise.
3405 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
3407         * allocatestack.c (_make_stacks_executable): Call
3408         _dl_make_stack_executable first.
3410 2004-03-24  Roland McGrath  <roland@redhat.com>
3412         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
3413         constraint instead of "0".
3415 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
3417         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3418         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
3420         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
3421         code to avoid warning.
3423 2004-03-24  Andreas Jaeger  <aj@suse.de>
3425         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3426         (__pthread_attr_setaffinity_old): Remove const.
3428 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
3430         * sysdeps/unix/sysv/linux/smp.h: New file.
3431         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
3432         * init.c: Define __is_smp.
3433         (__pthread_initialize_minimal_internal): Call is_smp_system to
3434         initialize __is_smp.
3435         * pthreadP.h: Declare __is_smp.
3436         Define MAX_ADAPTIVE_COUNT is necessary.
3437         * pthread_mutex_init.c: Add comment regarding __spins field.
3438         * pthread_mutex_lock.c: Implement adaptive mutex type.
3439         * pthread_mutex_timedlock.c: Likewise.
3440         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3441         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3442         Add __spins field.
3443         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3444         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3445         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3446         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3447         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3448         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3449         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3450         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
3451         lll_mutex_cond_trylock.
3452         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3453         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3454         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3455         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3456         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3457         Define BUSY_WAIT_NOP.
3458         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3459         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3461         * tst-mutex5.c: Add support for testing adaptive mutexes.
3462         * tst-mutex7.c: Likewise.
3463         * tst-mutex5a.c: New file.
3464         * tst-mutex7a.c: New file.
3465         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
3467         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3468         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
3469         vgettimeofday call might destroy the content.
3471         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
3472         @pause in the loop.
3474         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
3475         No need to restrict type of ret.  Make it int.  Add comment.
3477         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
3478         Remove unnecessary setne instruction.
3480 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
3482         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3483         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
3484         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
3485         If realloc fails, break out of the loop.
3487 2004-03-20  Andreas Jaeger  <aj@suse.de>
3489         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3490         (__pthread_setaffinity_old): Fix interface.
3491         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3492         (__pthread_getaffinity_old): Likewise.
3494         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3495         (__pthread_setaffinity_new): Remove duplicate declaration.
3497 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3499         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
3500         the return value to a safe register.
3501         (CDISABLE): Set the function argument correctly.
3503 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3505         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
3506         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3507         Rewrite so that only one locked memory operation per round is needed.
3508         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
3509         (pthread_barrier_wait): After wakeup, release lock only when the
3510         last thread stopped using the barrier object.
3511         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3512         (__pthread_cond_wait): Don't store mutex address if the current
3513         value is ~0l.  Add correct cleanup support and unwind info.
3514         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3515         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3516         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
3517         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
3518         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3519         Add correct cleanup support and unwind info.
3520         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
3521         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
3522         information for syscall wrappers.
3524 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
3526         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3527         cpusetsize field, remove next.
3528         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
3529         parameter for size of the CPU set.
3530         (pthread_setaffinity_np): Likewise.
3531         (pthread_attr_getaffinity_np): Likewise.
3532         (pthread_attr_setaffinity_np): Likewise.
3533         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
3534         interface change, keep compatibility code.
3535         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3536         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
3537         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
3538         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
3539         __pthread_getaffinity_np.
3540         * Versions: Add version for changed interfaces.
3541         * tst-attr3.c: Adjust test for interface change.
3542         * pthread_getattr_np.c: Query the kernel about the affinity mask with
3543         increasing buffer sizes.
3544         * pthread_attr_destroy.c: Remove unused list handling.
3545         * pthread_attr_init.c: Likewise.
3547 2004-03-17  Roland McGrath  <roland@redhat.com>
3549         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
3550         first argument to clock_getres so we ever enable kernel timers.
3552 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
3554         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
3556 2004-03-12  Richard Henderson  <rth@redhat.com>
3558         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
3559         oldvalue from CENABLE to CDISABLE.
3561 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
3563         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
3564         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3565         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3566         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3568 2004-03-11  Richard Henderson  <rth@redhat.com>
3570         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
3571         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
3572         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
3574 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
3576         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
3577         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
3578         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
3580 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
3582         * forward.c (__pthread_cond_broadcast_2_0,
3583         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
3584         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
3585         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
3587 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3589         * sysdeps/sh/tcb-offsets.sym: Add PID.
3590         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
3591         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
3593 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
3595         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
3596         include <sysdep-cancel.h>, vfork is no cancellation point.
3597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
3598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
3599         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
3601 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
3603         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
3604         libc_hidden_def.
3605         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
3606         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
3607         Likewise.
3608         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
3609         Likewise.
3610         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
3611         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
3612         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
3613         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
3614         of DO_CALL_VIA_BREAK.  Work around a gas problem.
3616         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
3617         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
3618         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
3619         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
3620         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
3621         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
3623         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
3624         a local register for saving old PID.  Negate PID in parent upon exit.
3626         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
3627         tcb-offsets.h.
3628         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
3629         before syscall, set to the old value in the parent afterwards.
3630         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
3631         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
3632         tcb-offsets.h.
3633         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
3634         before syscall, set to the old value in the parent afterwards.
3635         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
3636         * sysdeps/s390/tcb-offsets.sym: Add PID.
3638         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
3639         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
3640         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
3641         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
3642         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
3643         * sysdeps/sparc/tcb-offsets.sym: Add PID.
3645 2004-03-10  Andreas Schwab  <schwab@suse.de>
3647         * sysdeps/ia64/tcb-offsets.sym: Add PID.
3648         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
3649         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
3651 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
3653         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
3654         * tst-cancel21.c (do_one_test): Likewise.
3655         Reported by Gordon Jin <gordon.jin@intel.com>.
3657 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
3659         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
3660         if non-zero and set to INT_MIN if zero.
3661         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
3662         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
3663         (SAVE_PID, RESTORE_PID): Define.
3664         (__vfork): Use it.
3665         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
3666         Use relative path to avoid including NPTL i386/vfork.S.
3667         (SAVE_PID, RESTORE_PID): Define.
3668         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
3669         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
3670         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
3671         tst-vfork2x.
3672         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
3673         * tst-vfork1.c: New test.
3674         * tst-vfork2.c: New test.
3675         * tst-vfork1x.c: New test.
3676         * tst-vfork2x.c: New test.
3678 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
3680         * sysdeps/i386/tcb-offsets.sym: Add PID.
3681         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3682         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
3683         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
3685 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
3687         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
3689 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3691         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3692         _rtld_global_ro.
3694 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
3696         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3697         _rtld_global_ro.
3699         * tst-once4.c: Remove unnecessary macro definition.
3701         * tst-mutex7.c (do_test): Limit thread stack size.
3702         * tst-once2.c (do_test): Likewise.
3703         * tst-tls3.c (do_test): Likewise.
3704         * tst-tls1.c (do_test): Likewise.
3705         * tst-signal3.c (do_test): Likewise.
3706         * tst-kill6.c (do_test): Likewise.
3707         * tst-key4.c (do_test): Likewise.
3708         * tst-join4.c (do_test): Likewise.
3709         * tst-fork1.c (do_test): Likewise.
3710         * tst-context1.c (do_test): Likewise.
3711         * tst-cond2.c (do_test): Likewise.
3712         * tst-cond10.c (do_test): Likewise.
3713         * tst-clock2.c (do_test): Likewise.
3714         * tst-cancel10.c (do_test): Likewise.
3715         * tst-basic2.c (do_test): Likewise.
3716         * tst-barrier4.c (do_test): Likewise.
3718 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
3720         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
3722 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
3724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3725         (__pthread_cond_timedwait): Optimize wakeup test.
3726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3727         (__pthread_cond_wait): Likewise.
3728         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3729         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3730         Likewise.
3732 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
3734         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3735         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
3736         the atomic instruction needed.
3737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3738         (__lll_mutex_lock_wait): Likewise.
3740 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
3742         * Makefile (tests): Add tst-cond14 and tst-cond15.
3743         * tst-cond14.c: New file.
3744         * tst-cond15.c: New file.
3746 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
3748         * sysdeps/pthread/createthread.c (create_thread): Remove use of
3749         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
3750         needs to be implemented differently to be useful.
3752 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
3754         * pthread_attr_setschedparam.c: Don't test priority against limits
3755         here.  Set ATTR_FLAG_SCHED_SET flag.
3756         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3757         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3758         from parent thread to child.  If attribute is used and scheduling
3759         parameters are not inherited, copy parameters from attribute or
3760         compute them.  Check priority value.
3761         * pthread_getschedparam.c: If the parameters aren't known yet get
3762         them from the kernel.
3763         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3764         ATTR_FLAG_POLICY_SET flag for thread.
3765         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3766         and ATTR_FLAG_POLICY_SET.
3768         * sysdeps/pthread/createthread.c: Use tgkill if possible.
3770         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3771         fail if stack address hasn't been set.  Just return 0.
3773 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
3775         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
3776         libpthread for the files in this list.
3777         (CFLAGS-tst-unload): Removed.
3778         * tst-unload.c (do_test): Don't use complete path for
3779         LIBPHREAD_SO.
3781         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3782         tst-_res1mod2.
3784 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
3786         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3787         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3788         operation per round is needed.
3789         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3790         (__lll_mutex_lock_wait): Likewise.
3792 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
3794         * tst-cancel9.c (cleanup): Don't print to stderr.
3796 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3798         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3800 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
3802         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3803         (__syscall_error_handler2): Call CDISABLE.
3804         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3805         (__syscall_error_handler2): Call CDISABLE.
3807         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3808         Release lock before the loop, don't reacquire it.
3810         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3812 2004-02-19  Andreas Schwab  <schwab@suse.de>
3814         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3815         Fix last change.
3817 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
3819         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3820         (pthread_barrier_wait): After wakeup, release lock only when the
3821         last thread stopped using the barrier object.
3822         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3823         (pthread_barrier_wait): Likewise.
3824         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3825         Likewise.
3826         * Makefile (tests): Add tst-barrier4.
3827         * tst-barrier4.c: New file.
3829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3830         (__pthread_cond_timedwait): Perform timeout test while holding
3831         internal lock to prevent wakeup race.
3832         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3833         * sysdeps/pthread/pthread_cond_timedwait.c
3834         (__pthread_cond_timedwait): Likewise.
3835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3836         (__pthread_cond_timedwait): Likewise.
3838 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
3840         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3841         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3842         * Makefile (tests): Add tst-rwlock13.
3843         * tst-rwlock13.c: New test.
3845 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
3847         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3848         (__condvar_tw_cleanup): Little optimization.
3849         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3851 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
3853         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3854         libpthread as "lib" parameter to SHLIB_COMPAT.
3855         (__novmx_siglongjmp): Fix typo in function name.
3856         (__novmx_longjmp): Fix typo in function name.
3858 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3860         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3861         __builtin_expect.
3863         * sysdeps/generic/pt-longjmp.c: Moved to...
3864         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
3866 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
3868         * Makefile (libpthread-routines): Add pt-cleanup.
3869         * pt-longjmp.c: Removed.
3870         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3871         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3872         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3873         Version longjmp, siglongjmp for GLIBC_2.3.4.
3874         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3876 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3878         * sysdeps/pthread/pthread_cond_timedwait.c
3879         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
3880         Reuse code.  Add __builtin_expects.
3882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3883         (__pthread_cond_timedwait): Get internal lock in case timeout has
3884         passed before the futex syscall.
3885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3887 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
3889         * allocatestack.c: Pretty printing.
3891         * sysdeps/pthread/createthread.c (create_thread): Don't add
3892         CLONE_DETACHED bit if it is not necessary.
3894 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
3896         * pthread_getattr_np.c: Include ldsodefs.h.
3898 2004-01-16  Richard Henderson  <rth@redhat.com>
3900         * allocatestack.c: Don't declare __libc_stack_end.
3901         * init.c (__pthread_initialize_minimal_internal): Likewise.
3902         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3904 2004-01-15  Richard Henderson  <rth@redhat.com>
3906         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3907         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3908         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3909         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3910         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3911         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3912         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3913         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3915 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3917         * init.c (pthread_functions): Make array const.
3919 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3921         * allocatestack.c (__make_stacks_executable): Change interface.
3922         Check parameters.  Pass parameter on to libc counterpart.
3923         * pthreadP.h: Change declaration.
3925 2004-01-13  Richard Henderson  <rth@redhat.com>
3927         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3928         prototype form.
3929         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3930         Likewise.
3932         * sysdeps/alpha/Makefile: New file.
3933         * sysdeps/alpha/tcb-offsets.sym: New file.
3934         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3935         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3937         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3938         on powerpc version.
3940 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3942         * Makefile (tests): Add tst-backtrace1.
3943         * tst-backtrace1.c: New test.
3945 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3947         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3948         register as second parameter to the REGISTER macro.
3949         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3950         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3951         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3952         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3953         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3954         of thread register as second parameter to REGISTER macro in 64 case.
3956 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3958         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3959         (CFLAGS-getpid.o): Defined.
3960         (CFLAGS-getpid.os): Defined.
3962 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3964         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3965         returned for main thread does not overlap with any other VMA.
3966         Patch by Jakub Jelinek.
3968 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3970         * tst-raise1.c: Include stdio.h.
3972 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3974         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3975         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3976         If pid is 0, set it to selftid.
3977         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3978         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3979         != 0, return self->tid without doing a syscall.
3980         * descr.h (struct pthread): Move pid field after tid.
3982         * Makefile (tests): Add tst-raise1.
3983         * tst-raise1.c: New file.
3985 2003-12-23  Roland McGrath  <roland@redhat.com>
3987         * tst-oddstacklimit.c: New file.
3988         * Makefile (tests): Add it.
3989         (tst-oddstacklimit-ENV): New variable.
3991         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3992         value up to page size for __default_stacksize.
3994 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3996         * Makefile (tests): Add tst-eintr5.
3997         * tst-eintr5.c: New file.
3999         * eintr.c (eintr_source): Prevent sending signal to self.
4001         * tst-eintr2.c (tf1): Improve error message.
4003 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4005         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4006         * sysdeps/unix/sysv/linux/getpid.c: New file.
4007         * pthread_cancel.c: Add comment explaining use of PID field.
4008         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4009         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4010         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4011         temporarily to signal the field must not be relied on and updated
4012         by getpid().
4013         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4014         temporarily negative.
4015         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4017 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4019         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4020         (eintr_source): If ARG != NULL, use pthread_kill.
4021         * tst-eintr1.c: Adjust for this change.
4022         * tst-eintr2.c: Likewise.
4023         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4024         * tst-eintr3.c: New file.
4025         * tst-eintr4.c: New file.
4027 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4029         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4030         if CANCELSTATE_BITMASK is set.
4031         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4032         Likewise.
4034         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4035         (tests-reverse): Add tst-cancel23.
4036         * tst-cancel22.c: New test.
4037         * tst-cancel23.c: New test.
4039 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
4041         * tst-eintr1.c: Better error messages.
4043         * Makefile (tests): Add tst-eintr2.
4044         * tst-eintr2.c: New file.
4046 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
4048         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4049         (CFLAGS-tst-cancelx21.c): Set.
4050         * tst-cancel21.c: New test.
4051         * tst-cancelx21.c: New test.
4053         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
4054         comparison operand.
4055         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4056         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
4057         * pt-longjmp.c: Include jmpbuf-unwind.h.
4058         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4059         _JMPBUF_UNWINDS.  Adjust compared pointers.
4060         * init.c (__pthread_initialize_minimal_internal): Initialize
4061         pd->stackblock_size.
4062         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4063         * sysdeps/alpha/jmpbuf-unwind.h: New file.
4064         * sysdeps/i386/jmpbuf-unwind.h: New file.
4065         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4066         * sysdeps/s390/jmpbuf-unwind.h: New file.
4067         * sysdeps/sh/jmpbuf-unwind.h: New file.
4068         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4069         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4070         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4071         (_JMPBUF_CFA_UNWINDS): Remove.
4072         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4074 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
4076         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4077         (CFLAGS-tst-cancelx20.c): Set.
4078         * tst-cancel20.c: New test.
4079         * tst-cancelx20.c: New test.
4081 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
4083         * init.c (__pthread_initialize_minimal_internal): Don't treat
4084         architectures with separate register stack special here when
4085         computing default stack size.
4087 2003-12-17  Roland McGrath  <roland@redhat.com>
4089         * Makefile (tst-cancelx7-ARGS): New variable.
4090         Reportd by Greg Schafer <gschafer@zip.com.au>.
4092 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
4094         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
4095         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4096         (tst-stack3-ENV): Set.
4097         ($(objpfx)tst-stack3-mem): New.
4098         * tst-stack3.c: New test.
4100 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
4102         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4103         Add unwind directives.  Drop unused .regstk directive.
4104         (_fini_EPILOG_BEGINS): Add unwind directives.
4106 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
4108         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4109         Assume parameter is a pointer.
4110         (lll_futex_wake): Likewise.
4111         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4112         Likewise.
4113         (lll_futex_wake): Likewise.
4114         Reported by Boris Hu.
4115         * sysdeps/unix/sysv/linux/unregister-atfork.c
4116         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4118         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4120 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
4122         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4123         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4124         __rtld_lock_initialize for ld.so lock.
4125         Patch in part by Adam Li <adam.li@intel.com>.
4127 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
4129         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4130         in $(gnulib).  Also, remove stale comment.
4132 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
4134         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4135         advantage of new syscall stub and optimize accordingly.
4137         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4138         from SYS_futex, to match expectations of
4139         sysdep.h:DO_INLINE_SYSCALL.
4140         (lll_futex_clobbers): Remove.
4141         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4142         (lll_futex_wake): Likewise.
4143         (lll_futex_requeue): Likewise.
4144         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4145         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4146         Jelinek).
4147         (__lll_mutex_lock): Likewise.
4148         (__lll_mutex_cond_lock): Likewise.
4149         (__lll_mutex_timed_lock): Likewise.
4150         (__lll_mutex_unlock): Likewise.
4151         (__lll_mutex_unlock_force): Likewise.
4153         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4154         comes before the include of <sysdep.h>.
4155         (THREAD_SELF_SYSINFO): New macro.
4156         (THREAD_SYSINFO): Likewise.
4157         (INIT_SYSINFO): New macro.
4158         (TLS_INIT_TP): Call INIT_SYSINFO.
4160         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4162         * sysdeps/pthread/createthread.c (create_thread): Use
4163         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4164         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4165         THREAD_SELF_SYSINFO instead of open code.
4166         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4167         (THREAD_SYSINFO): Likewise.
4169         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4171         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4173 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
4175         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4176         instead of .init.  Patch by David Mosberger.
4178 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
4180         * sysdeps/pthread/configure.in: Remove broken declaration in C
4181         cleanup handling check.
4183 2003-11-30  Andreas Jaeger  <aj@suse.de>
4185         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4186         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4187         Likewise.
4189 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
4191         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4192         * pthread_attr_destroy.c: Include shlib-compat.h.
4193         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4194         is set in iattr->flags.
4195         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4197 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
4199         * Makefile (distribute): Add tst-cleanup4aux.c.
4201         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
4202         include.
4204 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
4206         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4207         pthread_cond_signal.
4209         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4210         store mutex address if the current value is ~0l.
4211         * sysdeps/pthread/pthread_cond_timedwait.c
4212         (__pthread_cond_timedwait): Likewise.
4213         * sysdeps/pthread/pthread_cond_broadcast.c
4214         (__pthread_cond_broadcast): Don't use requeue for pshared
4215         condvars.
4217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4218         (__pthread_cond_wait): Don't store mutex address if the current
4219         value is ~0l.
4220         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4221         (__pthread_cond_timedwait): Likewise.
4222         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4223         (__pthread_cond_broadcast): Don't use requeue for pshared
4224         condvars.
4226         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
4227         element with ~0l for pshared condvars, with NULL otherwise.
4229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4230         (__pthread_cond_wait): Don't store mutex address if the current
4231         value is ~0l.
4232         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4233         (__pthread_cond_timedwait): Likewise.
4234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4235         (__pthread_cond_broadcast): Don't use requeue for pshared
4236         condvars.
4238         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
4239         * tst-cond12.c: New file.
4240         * tst-cond13.c: New file.
4242 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
4244         * sysdeps/pthread/configure.in: Make missing forced unwind support
4245         fatal.
4247 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
4249         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
4251 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
4253         * Makefile: Add magic to clean up correctly.
4255 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
4257         * unwind.c (FRAME_LEFT): Define.
4258         (unwind_stop): Handle old style cleanups here.
4259         (__pthread_unwind): Handle old style cleanups only if
4260         !HAVE_FORCED_UNWIND.
4261         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
4262         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
4263         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
4264         ($(objpfx)tst-cleanupx4): Likewise.
4265         * tst-cleanup4.c: New test.
4266         * tst-cleanup4aux.c: New.
4267         * tst-cleanupx4.c: New test.
4269 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
4271         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
4272         lll_mutex_*lock macros to skip atomic operations on some archs.
4274 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
4276         * sysdeps/pthread/tst-timer.c (main): Initialize
4277         sigev2.sigev_value as well.
4279 2003-10-15  Roland McGrath  <roland@redhat.com>
4281         * sysdeps/pthread/configure.in: Barf if visibility attribute support
4282         is missing.
4283         * sysdeps/pthread/configure: Regenerated.
4285 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4287         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
4288         locking macros.  No distinction between normal and mutex locking
4289         anymore.
4290         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
4291         Merge bits from lowlevelmutex.S we still need.
4292         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
4293         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4294         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
4295         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
4296         new mutex implementation.
4297         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
4298         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4299         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4300         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4305         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4306         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
4307         symbol for entry point to avoid cancellation.
4309 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
4311         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
4312         changes.
4313         (SAVE_OLDTYPE_0): Fix a typo.
4315 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
4317         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4318         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
4320 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
4322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
4323         correct offset.
4325 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
4327         * Makefile (tests): Add tst-cancel19.
4328         * tst-cancel19.c: New test.
4330 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
4332         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
4333         restoring of the old cancellation type.
4335 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
4337         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
4339 2003-09-27  Wolfram Gloger  <wg@malloc.de>
4341         * sysdeps/pthread/malloc-machine.h: New file
4343 2003-09-24  Roland McGrath  <roland@redhat.com>
4345         * allocatestack.c (__make_stacks_executable): Don't ignore return
4346         value from _dl_make_stack_executable.
4348 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
4350         * allocatestack.c (__make_stacks_executable): Also change
4351         permission of the currently unused stacks.
4353         * allocatestack.c (change_stack_perm): Split out from
4354         __make_stacks_executable.
4355         (allocate_stack): If the required permission changed between the time
4356         we started preparing the stack and queueing it, change the permission.
4357         (__make_stacks_executable): Call change_stack_perm.
4359         * Makefile: Build tst-execstack-mod locally.
4360         * tst-execstack-mod.c: New file.
4362 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
4364         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
4366 2003-09-23  Roland McGrath  <roland@redhat.com>
4368         * tst-execstack.c: New file.
4369         * Makefile (tests): Add it.
4370         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
4371         (LDFLAGS-tst-execstack): New variable.
4373         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
4374         whether to use PROT_EXEC for stack mmap.
4375         (__make_stacks_executable): New function.
4376         * pthreadP.h: Declare it.
4377         * init.c (__pthread_initialize_minimal_internal): Set
4378         GL(dl_make_stack_executable_hook) to that.
4380 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
4382         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
4383         recommendation from AMD re avoidance of lock prefix.
4385 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
4387         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
4388         lll_futex_timed_wait instead of lll_futex_wait.
4389         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
4390         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
4391         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
4392         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
4393         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
4394         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
4395         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
4396         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
4397         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
4398         Completely revamp the locking macros.  No distinction between
4399         normal and mutex locking anymore.
4400         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4401         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
4402         __lll_lock_timedwait): Fix prototypes.
4403         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
4404         __lll_lock_timedwait): Likewise.
4405         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
4406         macros, add __builtin_expect.
4407         (lll_mutex_timedlock): Likewise.  Fix return value.
4408         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
4409         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
4410         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
4411         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
4412         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
4413         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
4414         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
4415         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
4417 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
4419         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4420         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
4421         operation if possible.
4423         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
4424         like jumping over the lock prefix.
4426 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
4428         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
4429         locking macros.  No distinction between normal and mutex locking
4430         anymore.
4431         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4432         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4433         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4434         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
4435         locking.  Merge bits from lowlevelmutex.S we still need.
4436         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4437         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4438         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
4439         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
4440         * Makefile (routines): Remove libc-lowlevelmutex.
4441         (libpthread-rountines): Remove lowlevelmutex.
4442         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
4443         for new mutex implementation.
4444         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4445         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4448         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4449         Likewise.
4450         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4451         Likewise.
4452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4453         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4454         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
4455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4459         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4460         Likewise.
4461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4462         Likewise.
4463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4464         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4466         Don't use requeue.
4467         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4468         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
4470 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
4472         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
4473         in parameters of asm with output parameters.
4475         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
4476         type of DECR parameter to int.
4477         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
4479 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
4481         * tst-attr3.c (tf, do_test): Print stack start/end/size and
4482         guardsize for each thread.
4484 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
4486         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
4487         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4488         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
4490         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4491         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
4492         NULL.
4493         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
4494         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
4495         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4496         (pthread_getaffinity_np): Add hidden_def.
4498         * Makefile (tests): Add tst-attr3.
4499         * tst-attr3.c: New test.
4501         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
4503 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
4505         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
4506         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
4508 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
4510         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
4511         * tst-align.c: Include tst-stack-align.h.
4512         (tf, do_test): Use TEST_STACK_ALIGN macro.
4514 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
4516         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
4517         variable.
4519 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
4521         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
4522         stack-related values for the initial thread.
4524 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
4526         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
4528 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
4530         * pthread_mutex_lock.c: Minor code rearrangements.
4532 2003-09-05  Roland McGrath  <roland@redhat.com>
4534         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
4535         Instead, include ../nptl_db/db_info.c to do its magic.
4536         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
4537         (__pthread_pthread_key_2ndlevel_size): Likewise.
4538         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
4539         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
4540         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
4541         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
4542         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
4543         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
4544         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
4545         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
4546         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
4547         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
4548         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
4549         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
4550         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
4551         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
4552         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
4553         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
4554         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
4556 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
4558         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
4559         of pthread_t to be compatible with LT.
4560         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4561         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4562         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4563         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4564         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4565         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4566         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4568 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
4570         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
4572 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
4574         * unwind-forcedunwind.c: Move to...
4575         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
4576         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
4577         * sysdeps/pthread/jmpbuf-unwind.h: New file.
4578         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
4579         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
4580         * unwind.c: Include jmpbuf-unwind.h.
4581         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
4583 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
4585         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
4586         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
4587         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
4588         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
4589         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
4590         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
4591         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
4592         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
4593         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
4594         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
4595         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
4596         function.
4597         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
4598         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
4599         * Makefile (tests): Add tst-stack2.
4600         * tst-stack2.c: New test.
4601         * tst-stack1.c: Include limits.h and sys/param.h.
4602         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
4604         * pthread_condattr_setpshared.c: Include errno.h.
4605         (pthread_condattr_setpshared): Return EINVAL if pshared
4606         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
4608         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
4609         defined symbol for entry point to avoid cancellation.
4610         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4611         Likewise.
4612         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4613         Likewise.
4614         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4615         Likewise.
4616         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
4617         Likewise.
4618         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4619         Likewise.
4620         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
4621         __close_nocancel, __read_nocancel, __write_nocancel,
4622         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
4623         libpthread.so or librt.so, define to corresponding function
4624         without _nocancel suffix.
4625         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
4626         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
4627         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
4629         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
4631 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
4633         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
4634         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
4636         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
4637         in subsections has a symbol associated with it.
4639         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
4640         defined symbol for entry point to avoid cancellation.
4641         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
4643 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
4645         * Makefile (tests): Add tst-tls5.
4646         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
4647         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
4648         ($(objpfx)tst-tls5): New.
4649         ($(objpfx)tst-tls6.out): Likewise.
4650         (tests): Depend on $(objpfx)tst-tls6.out.
4651         * tst-tls3.c: Include stdint.h and pthreaddef.h.
4652         (do_test): Check pthread_self () return value alignment.
4653         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
4654         (tf): Check pthread_self () return value alignment.
4655         * tst-tls5.c: New test.
4656         * tst-tls5.h: New.
4657         * tst-tls5mod.c: New.
4658         * tst-tls5moda.c: New.
4659         * tst-tls5modb.c: New.
4660         * tst-tls5modc.c: New.
4661         * tst-tls5modd.c: New.
4662         * tst-tls5mode.c: New.
4663         * tst-tls5modf.c: New.
4664         * tst-tls6.sh: New test.
4666         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
4667         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
4668         * init.c (pthread_functions): Initialize them.
4669         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
4670         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
4671         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
4672         pthread_cond_timedwait@@GLIBC_2.3.2.
4674 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
4676         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
4677         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
4678         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
4679         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
4680         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
4681         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
4683         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
4685         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
4686         _POSIX_THREAD_PRIORITY_SCHEDULING.
4687         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4689 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
4691         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
4692         nested function, use static inline function from libio.h.
4693         Code by Richard Henderson.
4695         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
4696         weak.
4698 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
4700         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
4701         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
4702         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
4703         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
4704         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
4705         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
4706         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
4707         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
4708         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
4709         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
4710         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
4711         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
4712         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
4713         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
4714         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
4715         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
4716         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
4717         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
4718         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
4719         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
4720         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
4721         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
4722         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
4723         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
4724         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
4725         * sysdeps/sparc/tls.h: New file.
4726         * sysdeps/sparc/tcb-offsets.sym: New file.
4727         * sysdeps/sparc/Makefile: New file.
4728         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
4729         * init.c [__sparc__] (__NR_set_tid_address): Define.
4731 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
4733         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
4734         _IO_release_lock): Define.
4736 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
4738         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
4739         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
4741 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
4744         (__pthread_cleanup_class): Add missing return types of member
4745         functions.
4747 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
4749         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4750         (lll_mutex_unlock_force): Add memory barrier between store and futex
4751         syscall.
4753 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
4755         * tst-cancel4.c (do_test): Also unlink tempfname and remove
4756         tempmsg in first loop.
4758 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
4760         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4761         _POSIX_THREAD_PRIORITY_SCHEDULING.
4762         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4764 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4766         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
4767         (__rtld_lock_default_lock_recursive,
4768         __rtld_lock_default_unlock_recursive): Define.
4769         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
4770         __rtld_lock_unlock_recursive): Define using
4771         GL(_dl_rtld_*lock_recursive).
4772         * init.c (__pthread_initialize_minimal_internal): Initialize
4773         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
4774         Lock GL(_dl_load_lock) the same number of times as
4775         GL(_dl_load_lock) using non-mt implementation was nested.
4777         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
4778         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
4780 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
4782         * tst-cancel17.c (do_test): Make len2 maximum of page size and
4783         PIPE_BUF.
4785 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
4787         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
4789 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
4791         * sysdeps/pthread/createthread.c (do_clone): Move error handling
4792         to first syscall error check.  Move syscall error check for tkill
4793         into __ASSUME_CLONE_STOPPED #ifdef.
4795 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
4797         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
4798         is not defined, do explicit synchronization.
4799         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
4800         is not defined also unlock pd->lock for non-debugging case in case
4801         it is necessary.
4802         * pthread_create.c (start_thread): Always get and release pd->lock
4803         if __ASSUME_CLONE_STOPPED is not defined.
4804         (start_thread_debug): Removed.  Adjust users.
4805         * allocatestack.c (allocate_stack): Always initialize lock if
4806         __ASSUME_CLONE_STOPPED is not defined.
4807         * Makefile (tests): Add tst-sched1.
4808         * tst-sched1.c: New file.
4810         * sysdeps/pthread/createthread.c (do_clone): Only use
4811         sched_setschduler and pass correct parameters.
4813 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4815         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
4816         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
4817         PTHREAD_STACK_MIN in comments.
4819 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
4821         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4822         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
4823         argument.
4824         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
4825         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
4826         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
4827         (__pthread_cleanup_upto): Fix prototype.
4828         (_longjmp_unwind): Adjust caller.
4829         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
4830         Change second argument to const struct pointer.
4831         * tst-sem8.c (main): Remove unused s2 and s3 variables.
4832         * tst-sem9.c (main): Likewise.
4833         * unwind.c: Include string.h for strlen prototype.
4835 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
4837         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4838         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
4839         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
4840         Define HAVE_CMOV.
4841         Patch by Nicholas Miell <nmiell@attbi.com>.
4843 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
4845         * init.c (__pthread_initialize_minimal_internal): Initialize
4846         GL(dl_init_static_tls).
4847         * pthreadP.h (__pthread_init_static_tls): New prototype.
4848         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
4849         New functions.
4850         * Makefile (tests): Add tst-tls4.
4851         (modules-names): Add tst-tls4moda and tst-tls4modb.
4852         ($(objpfx)tst-tls4): Link against libdl and libpthread.
4853         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
4854         tst-tls4modb.so.
4855         * tst-tls4.c: New file.
4856         * tst-tls4moda.c: New file.
4857         * tst-tls4modb.c: New file.
4859 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
4861         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
4862         before __timer_dealloc.
4863         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
4864         Don't call list_unlink.
4866 2003-07-29  Roland McGrath  <roland@redhat.com>
4868         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
4870 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
4872         * tst-cancel17.c (do_test): Check if aio_cancel failed.
4873         Don't reuse struct aiocb A if it failed.
4874         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
4875         not just one byte, as that does not block.
4877 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
4879         * sysdeps/pthread/unwind-resume.c: New file.
4880         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
4881         unwind-resume in csu subdir.
4882         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
4883         exceptions.
4884         (librt-sysdep_routines, librt-shared-only-routines): Add
4885         rt-unwind-resume.
4886         * sysdeps/pthread/rt-unwind-resume.c: New file.
4887         * unwind-forcedunwind.c: New file.
4888         * Makefile (libpthread-routines): Add unwind-forcedunwind.
4889         (libpthread-shared-only-routines): Likewise.
4890         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
4891         * pthreadP.h (pthread_cancel_init): New prototype.
4892         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
4894         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
4895         attr argument const struct pthread_attr *.
4897         * res.c (__res_state): Return __resp.
4898         * descr.h: Include resolv.h.
4899         (struct pthread): Add res field.
4900         * pthread_create.c: Include resolv.h.
4901         (start_thread): Initialize __resp.
4902         * Makefile (tests): Add tst-_res1.
4903         (module-names): Add tst-_res1mod1, tst-_res1mod2.
4904         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
4905         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
4906         libpthread.
4907         * tst-_res1.c: New file.
4908         * tst-_res1mod1.c: New file.
4909         * tst-_res1mod2.c: New file.
4911 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
4913         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4915         * Makefile: Define various *-no-z-defs variables for test DSOs
4916         which has undefined symbols.
4918 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
4920         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4921         Retry if the stwcx fails to store once_control.
4923 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
4925         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4926         pthread_attr_setaffinity.
4927         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4928         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4929         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4930         * pthread_attr_destroy.c: Free cpuset element if allocated.
4931         * pthread_create.c: Pass iattr as additional parameter to
4932         create_thread.
4933         * sysdeps/pthread/createthread.c: If attribute is provided and
4934         a new thread is created with affinity set or scheduling parameters,
4935         start thread with CLONE_STOPPED.
4936         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4937         pthread_attr_setaffinity.
4938         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4939         cpuset element.
4941 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
4943         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4945 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
4947         * sysdeps/pthread/configure.in: Require CFI directives also for
4948         ppc and s390.
4950 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
4952         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4953         Add cfi directives.
4955 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4957         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4958         CLEANUP_JMP_BUF.
4959         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4960         registers as variables.  Call __pthread_mutex_unlock_usercnt.
4961         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4962         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4963         not self pointer in __writer.  Compare with TID to determine
4964         deadlocks.
4965         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4966         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4967         Likewise.
4968         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4969         Likewise.
4970         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4971         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4972         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4973         macros also when compiling librt.
4975 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
4977         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4978         -fasynchronous-unwind-tables.
4979         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4980         (PSEUDO): Add cfi directives.
4981         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4982         Likewise.
4983         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4984         Likewise.
4986 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
4988         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4989         __pthread_unregister_cancel): Add prototypes and hidden_proto.
4990         * unwind.c (__pthread_unwind_next): Add hidden_def.
4991         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4992         Likewise.
4993         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4994         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4995         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4996         Likewise.
4997         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4998         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4999         Likewise.
5000         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5001         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5002         __pthread_unregister_cancel and __pthread_unwind_next.
5004 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5006         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5007         different symbol for the cancellation syscall wrapper and
5008         non-cancellation syscall wrapper.
5009         (PSEUDO_END): Define.
5011 2003-07-05  Richard Henderson  <rth@redhat.com>
5013         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5014         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5015         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5016         return actual return value from the syscall, not 0.
5018 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5020         * descr.h (struct pthread): Add pid field.
5021         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5022         (__reclaim_stacks): Likewise.
5023         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5024         also check for PID of the signal source.
5025         (__pthread_initialize_minimal_internal): Also initialize pid field
5026         of initial thread's descriptor.
5027         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5028         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5029         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5030         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5031         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5033 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
5035         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5036         Fix use of parameter.
5037         (__libc_cleanup_pop): Likewise.
5039 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
5041         * init.c (sigcancel_handler): Change parameters to match handler
5042         for SA_SIGACTION.  Check signal number and code to recognize
5043         invalid invocations.
5045 2003-07-03  Roland McGrath  <roland@redhat.com>
5047         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5048         Apply sizeof (struct pthread) bias to r13 value.
5050 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
5052         * sysdeps/pthread/configure.in: Require CFI directives.
5054         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5055         definition.
5056         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5057         libpthread compilation.
5058         * unwind.c (__pthread_unwind): Add hidden_def.
5059         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5061 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5063         * libc-cancellation.c (__libc_cleanup_routine): Define.
5064         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5065         (__pthread_cleanup_pop): Define.
5067 2003-07-01  Richard Henderson  <rth@redhat.com>
5069         * sysdeps/alpha/elf/pt-initfini.c: New file.
5070         * sysdeps/alpha/pthread_spin_lock.S: New file.
5071         * sysdeps/alpha/pthread_spin_trylock.S: New file.
5072         * sysdeps/alpha/pthreaddef.h: New file.
5073         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5074         * sysdeps/alpha/tls.h: New file.
5075         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5076         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5077         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5078         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5079         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5080         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5081         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5082         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5083         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5084         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5086 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5088         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5089         cleanup support and unwind info.
5091 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
5093         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5094         Use correct cleanup handler registration.  Add unwind info.
5095         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5096         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5097         * tst-once3.c: Add cleanup handler and check it is called.
5098         * tst-once4.c: Likewise.
5099         * tst-oncex3.c: New file.
5100         * tst-oncex4.c: New file.
5101         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5103 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
5105         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5107 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
5109         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5110         (tf_msgsnd): Likewise.
5112         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5113         premature returns a bit more.
5115 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
5117         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5118         definition to the front.
5120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5121         the cleanup functions to make the names unique.  Fix dwarf opcode
5122         un unwind table.
5123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5124         functions to make the names unique.  Fix CFA offset for two blocks.
5126 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
5128         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5129         missing closing braces.
5130         Patch by Christophe Saout <christophe@saout.de>.
5132 2003-06-24  Roland McGrath  <roland@redhat.com>
5134         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5136 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
5138         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5139         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5141         * pthreadP.h: Declare __find_thread_by_id.
5142         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5143         * pthread_clock_gettime.c: Allow using other thread's clock.
5144         * pthread_clock_settime.c: Likewise.
5145         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5146         * Makefile: Add rules to build and run tst-clock2.
5147         * tst-clock2.c: New file.
5149 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
5151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5152         to use exception-based cleanup handler.
5153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5155         * tst-cond8.c (ch): Announce that we are done.
5157         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5159         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5160         Also test aio_suspend with timeout value.
5162 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
5164         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5165         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5166         attribute_hidden.
5168         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5169         (__pthread_mutex_lock_internal): Likewise.
5170         (__pthread_mutex_unlock_internal): Likewise.
5171         (__pthread_mutex_unlock_usercnt): Declare.
5172         * pthread_mutex_destroy.c: Always fail if used in any way.
5173         * pthread_mutex_init.c: Update comment.
5174         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5175         * pthread_mutex_timedlock.c: Adjust __nusers.
5176         * pthread_mutex_trylock.c: Adjust __nusers.
5177         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5178         and public interfaces are wrapper with pass additional parameter.
5179         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5180         parameter zero.
5181         * tst-mutex8.c: New file.
5182         * Makefile (tests): Add tst-mutex8.
5183         * sysdeps/pthread/pthread_cond_timedwait.c: Call
5184         __pthread_mutex_unlock_usercnt.
5185         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5187         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5189         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5190         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5191         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5192         Add __nusers.
5193         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5194         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5195         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5196         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5197         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5199         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5200         * pthread_mutex_timedlock.c: Likewise.
5201         * pthread_mutex_trylock.c: Adjust __nusers.
5202         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5203         * tst-mutex9.c: New file.
5204         * Makefile (tests): Add tst-mutex9.
5205         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5206         * sysdeps/ia64/tls.h: Likewise.
5207         * sysdeps/powerpc/tls.h: Likewise.
5208         * sysdeps/s390/tls.h: Likewise.
5209         * sysdeps/sh/tls.h: Likewise.
5210         * sysdeps/x86_64/tls.h: Likewise.
5211         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5212         Change type of __owner.
5213         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5214         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5215         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5216         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5217         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5219 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
5221         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
5222         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
5224         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
5225         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
5226         instead of nr to lll_futex_wake.  Only set errno and return -1
5227         if err < 0.
5229         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
5230         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5231         return actual return value from the syscall, not 0.
5233 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
5235         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
5236         find a random value.
5237         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
5238         errno==EIDRM.
5240         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
5241         compat_timer_settime.
5242         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
5243         compat_timer_gettime.
5244         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
5245         compat_timer_getoverrun.
5246         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
5247         compat_timer_delete.
5249         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
5250         error-checking mutex detect busy mutexes.
5252 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
5254         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
5255         Add ax to clobber list.
5256         (lll_mutex_cond_lock): Likewise.
5257         (lll_mutex_unlock): Likewise.
5258         (lll_lock): Likewise.
5259         (lll_unlock): Likewise.
5261         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
5262         * tst-cancel18.c: New file.
5263         * tst-cancelx18.c: New file.
5265         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
5266         and tcdrain.
5268         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
5269         * tst-cancel17.c: New file.
5270         * tst-cancelx17.c: New file.
5272         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5273         * sysdeps/unix/sysv/linux/sigwait.c: New file.
5274         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5276         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
5278 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
5280         * sysdeps/pthread/createthread.c (create_thread): Set
5281         header.multiple_threads unconditionally.
5282         * allocatestack.c (allocate_stack): Likewise.
5283         * descr.h (struct pthread): Add header.multiple_threads
5284         unconditionally.
5285         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
5286         Define for librt.  #error if neither libpthread, libc nor librt.
5287         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
5288         Likewise.
5289         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
5290         CDISABLE): Likewise.
5291         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
5292         CDISABLE): Likewise.
5293         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
5294         CDISABLE): Likewise.
5295         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
5296         CDISABLE): Likewise.  Access header.multiple_threads outside of
5297         libc and libpthread.
5298         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
5299         Likewise.
5300         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
5301         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
5303 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
5305         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
5306         Also test early cancellation before the thread reaches the cancellation
5307         point.
5309         * Makefile: Compile forward.c with exceptions.
5311         * sysdeps/unix/sysv/linux/sleep.c: New file.
5313 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
5315         * Makefile: Add CFLAGS definition to compile function wrappers
5316         duplicated from libc with exceptions.
5317         * tst-cancel4.c: Also check cancellation handlers.
5319         * Makefile: Add rules to build and run tst-cancel16 and
5320         tst-cancelx16.  Add missing CFLAGS definitions.
5321         * tst-cancel16.c: New file.
5322         * tst-cancelx16.c: New file.
5324 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
5326         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5327         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
5328         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5329         (DL_SYSINFO_IMPLEMENTATION): Likewise.
5331         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
5332         (LIBC_CANCEL_RESET): Likewise.
5333         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
5334         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
5335         librt-cancellation.
5336         (CFLAGS-libcrt-cancellation.c): Define.
5337         * sysdeps/pthread/librt-cancellation.c: New file.
5338         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
5339         macros also when compiling librt.
5340         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5341         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5342         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5343         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5344         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5345         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5346         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5348         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
5349         compat_timer_create.
5351 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
5353         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
5355         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5356         __register_atfork.
5357         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
5358         Add libc_hidden_def.
5360 2003-06-13  Roland McGrath  <roland@redhat.com>
5362         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
5363         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
5365 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
5367         * allocatestack.c (queue_stack): Always inline.
5368         * ptreadhP.h (__do_cancel): Likewise.
5370 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
5372         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
5373         a typo.
5375 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
5377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5378         (__pthread_cond_signal): Remove incorrect second addition for
5379         cond_lock!=0.
5381 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
5383         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5384         (__pthread_cond_signal): Use correct futex pointer in
5385         __lll_mutex_lock_wait call.
5387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5388         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
5390 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
5392         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
5393         cancelable.
5394         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
5395         Likewise.
5397         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
5398         hand-written CFI generation code.  Since ENTRY/END also initiated
5399         CFI frames this caused two CFI sets to be generated.
5401 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
5403         * cleanup_routine.c: New file.
5404         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
5405         * sysdeps/pthread/pthread.h: Add support for fully exception-based
5406         cleanup handling.
5407         * Makefile (libpthread-routines): Add cleanup_routine.
5408         Add more CFLAGS variables to compile with exceptions.  Add comments
5409         why which file needs unwind tables.
5410         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
5411         tests.
5412         * tst-cancelx1.c: New file.
5413         * tst-cancelx2.c: New file.
5414         * tst-cancelx3.c: New file.
5415         * tst-cancelx4.c: New file.
5416         * tst-cancelx5.c: New file.
5417         * tst-cancelx6.c: New file.
5418         * tst-cancelx7.c: New file.
5419         * tst-cancelx8.c: New file.
5420         * tst-cancelx9.c: New file.
5421         * tst-cancelx10.c: New file.
5422         * tst-cancelx11.c: New file.
5423         * tst-cancelx12.c: New file.
5424         * tst-cancelx13.c: New file.
5425         * tst-cancelx14.c: New file.
5426         * tst-cancelx15.c: New file.
5427         * tst-cleanupx0.c: New file.
5428         * tst-cleanupx0.expect: New file.
5429         * tst-cleanupx1.c: New file.
5430         * tst-cleanupx2.c: New file.
5431         * tst-cleanupx3.c: New file.
5433         * tst-cleanup0.c: Make standard compliant.
5434         * tst-cleanup1.c: Likewise.
5436         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
5437         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5438         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5439         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5440         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5441         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5442         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
5443         CLEANUP_JMP_BUF.
5444         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5445         * tst-cancel12.c: New file.
5446         * tst-cancel13.c: New file.
5447         * tst-cancel14.c: New file.
5448         * tst-cancel15.c: New file.
5449         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
5450         and tst-cancel15.
5452         * tst-cancel1.c: Add some comments.
5454         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
5455         timeout correctly.
5457 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
5459         * Makefile (CFLAGS-pthread_cancel.c): Define.
5461 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
5463         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
5464         Change type of __writer element to int.
5465         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5466         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5467         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5468         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5469         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5470         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
5471         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5472         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
5473         Compare with TID to determine deadlocks.
5474         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
5475         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5476         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
5477         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5478         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5479         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5480         Likewise.
5481         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5482         Likewise.
5483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5485         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5486         Likewise.
5487         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5488         Likewise.
5489         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5490         * Makefile (tests): Add tst-rwlock12.
5491         * tst-rwlock12.c: New file.
5493 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
5495         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
5496         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
5497         Remove bogus hidden_proto.
5498         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
5499         Likewise.
5500         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
5501         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
5502         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
5503         ___lll_mutex_timedlock): Likewise.
5505 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
5507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5508         (__pthread_cond_signal): Add some code to eventually handle
5509         cond_lock!=0.
5511 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
5513         * Makefile (tests): Add tst-exec4.
5514         (tst-exec4-ARGS): Define.
5515         * tst-exec4.c: New file.
5517 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
5519         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5520         Also fail if tv_nsec < 0.
5521         (__lll_timedwait_tid): Likewise.
5522         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
5523         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
5524         Likewise.
5525         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
5526         Likewise.
5527         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
5528         Likewise.
5529         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
5530         Likewise.
5531         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
5532         Likewise.
5533         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
5534         Likewise.
5536         * Makefile (tests): Add tst-sem8 and tst-sem9.
5537         * tst-sem8.c: New file.
5538         * tst-sem9.c: New file.
5539         * sem_open.c: Fix creation of in_use record if the file exists but
5540         no internal record.
5542         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
5543         definitions.
5545         * sysdeps/pthread/timer_create.c (timer_create): In case
5546         evp==NULL, assign timer ID to sival_ptr.
5548         * descr.h (struct pthread_unwind_buf): Change type of prev element to
5549         struct pthread_unwind_buf *.
5550         (struct pthread): Likewise for cleanup_jmp_buf element.
5552         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
5553         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
5554         * unwind.c (__pthread_unwind_next): Likewise.
5556 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
5558         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5559         (lll_futex_timed_wait): Use int for futex value parameter.
5560         (lll_futex_wake): Likewise.
5561         (lll_futex_requeue): Likewise.
5563         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5564         Replace one memory operation with one register operation.
5566         * tst-join4.c (do_test): Fix error message.
5568         * tst-rwlock6.c (do_test): Use correct format specifier.
5570         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5571         (__lll_mutex_lock_wait): Replace one memory operation with one
5572         register operation.
5573         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
5574         (__lll_mutex_lock_wait): Likewise.
5576         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5577         (__lll_mutex_cond_lock): Add one to value parameter of
5578         __lll_lock_wait to reflect reality in the futex syscall.
5579         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5580         (lll_mutex_cond_lock): Likewise.
5582 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
5584         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
5585         New function.
5586         (lll_mutex_cond_lock): Define.
5588 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
5590         * Makefile (tests): Add tst-signal6.
5591         * tst-signal6.c: New file.
5593         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
5594         (__lll_mutex_unlock_force): New function
5595         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
5597         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5598         (__lll_mutex_unlock_force): New function.
5599         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
5601         * tst-rwlock7.c (do_test): Use correct format specifier.
5603         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
5604         Find break parameter in correct asm argument.
5606 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
5608         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
5609         Remove out4.
5610         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
5611         error occured.
5612         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5613         Add __mutex.
5614         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
5615         lll_futex_requeue, lll_mutex_unlock_force): Define.
5617 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
5619         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5620         (pthread_cond_t): Add __mutex.
5621         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
5622         lll_futex_requeue, lll_mutex_unlock_force): Define.
5624 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5626         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
5627         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5628         Add __mutex field.
5629         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
5630         Define.
5631         (lll_futex_wait, lll_futex_wake): Define.
5632         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
5633         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
5634         FUTEX_REQUEUE instead of FUTEX_WAIT.
5635         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5636         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
5637         mutex which was used in condvar structure.  Call
5638         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
5639         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5641         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
5642         include tcb-offsets.h.  Read wakeup value in locked region.
5643         Use the value of gbr register as THREAD_ID.
5644         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5645         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5646         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5648         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
5649         macros.
5651 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
5653         * sysdeps/pthread/pthread_cond_broadcast.c
5654         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
5656 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
5658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
5659         typo in register name.
5660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
5661         correctly.  Actually use requeue.  Little optimization.
5662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
5663         mutex address early.  Handle cancellation state as 32-bit value.
5664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5665         Remove unnecessary label.
5667 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
5669         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
5670         instead of FUTEX_WAIT.
5671         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
5672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5676         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
5677         used in condvar structure.  Call __pthread_mutex_cond_lock instead
5678         of __pthread_mutex_lock_internal.
5679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5680         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5681         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5682         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
5683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5685         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
5686         Add pthread_mutex_cond_lock.
5687         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
5688         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
5689         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
5690         lll_mutex_cond_lock.
5691         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5692         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5693         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5694         Add __mutex field.
5695         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5696         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5698         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
5699         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5701         * pthreadP.h: Declare __pthread_mutex_cond_lock.
5702         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
5703         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
5704         macro don't define aliases.
5706         * cancellation.c: Remove __pthread_enable_asynccancel_2.
5707         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
5708         * sysdeps/pthread/pthread_cond_timedwait.c: Use
5709         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
5710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5712         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5713         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5716 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
5718         * sem_open.c: Fix one endless loop.  Implement correct semantics
5719         wrt opening the same semaphore more then once.
5720         * sem_close.c: Adjust for sem_open change.
5721         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
5722         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
5723         * Makefile (tests): Add tst-sem7.
5724         * tst-sem7.c: New file.
5726 2003-05-16  Roland McGrath  <roland@redhat.com>
5728         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
5729         uninitialized variable braino.
5731 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
5733         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
5734         test for syscall availability.
5736         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
5737         __no_posix_timers to -1 if the syscalls don't exist.
5739         * pthread_join.c (pthread_join): Set tid field of the joined
5740         thread to -1.  This isn't necessary but helps to recognize some
5741         error conditions with almost no cost.
5743         * allocatestack.c (FREE_P): Also negative values indicate an
5744         unused stack.
5746         * unwind.c: Include <unistd.h>.
5748 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
5750         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
5752 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
5754         * Makefile (crti-objs, crtn-objs): New variables.
5755         (omit-deps, extra-objs): Add crtn.
5756         ($(objpfx)libpthread.so): Depend on both crti and crtn
5757         and links to them in multidir.
5758         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
5760 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
5762         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5763         (lll_mutex_unlock): Use atomic_exchange_rel.
5765 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
5767         * cond-perf.c (cons): Add missing locking around setting of alldone.
5769 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
5771         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
5772         related macros.
5773         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5775 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
5777         * tst-sem6.c: New file.
5778         * Makefile (tests): Add tst-sem6.
5780         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
5781         Use atomic_exchange_rel instead of atomic_exchange.
5782         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
5783         Likewise.
5785         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
5786         code for lll_futex_wait and lll_futex_wake in static apps.  Use
5787         vsyscall is possible.
5789         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
5790         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
5791         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
5792         pthread_setaffinity_np.
5793         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
5794         and pthread_setaffinity_np.
5795         * Makefile (libpthread-routines): Add pthread_getaffinity and
5796         pthread_setaffinity.
5798         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
5799         use it in case mmap to allocate the stack fails.
5800         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
5801         ARCH_MAP_FLAGS here.
5802         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
5803         ARCH_RETRY_MMAP.
5805 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
5807         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
5808         handler implementation.  It is now lockless in fork().
5809         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5810         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5811         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
5812         declare the __fork_*_lists.
5813         (struct fork_handler): Include pointers to all three functions.
5814         Add next, refcntr and need_signal elements.
5815         (__fork_handlers): New declaration.
5816         (__register_atfork_malloc): Remove declaration.
5817         (HAVE_register_atfork_malloc): Remove definition.
5818         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
5819         __pthread_child_handler variable.
5820         (__libc_pthread_init): Use __register_atfork instead of explicitly
5821         adding to the list.
5822         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
5823         and lll_futex_wake.
5824         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5826         * unwind.c (unwind_cleanup): Print error message and then abort.  This
5827         function must never be reached.
5829         * cond-perf.c: New file.
5831 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
5833         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
5835 2003-05-04  Roland McGrath  <roland@redhat.com>
5837         * Makefile ($(objpfx)../libc.so): New target.
5839 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
5841         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5842         (pthread_condattr_t): Size is only an int, don't use long for
5843         alignment.
5844         (pthread_mutexattr_t): Likewise.
5845         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5846         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5847         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5849 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
5851         * sysdeps/i386/tls.h: Define THREAD_ID.
5852         * sysdeps/ia64/tls.h: Likewise.
5853         * sysdeps/powerpc/tls.h: Likewise.
5854         * sysdeps/s390/tls.h: Likewise.
5855         * sysdeps/sh/tls.h: Likewise.
5856         * sysdeps/x86_64/tls.h: Likewise.
5857         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
5858         record ownership.
5859         * pthread_mutex_timedlock.c: Likewise.
5860         * pthread_mutex_trylock.c: Likewise.
5861         * pthread_mutex_unlock.c: Likewise.
5862         * pthread_rwlock_trywrlock.c: Likewise.
5863         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
5864         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5865         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5866         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5868         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
5869         flag.
5871 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
5873         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5874         (__SIZEOF_PTHREAD_COND_T): Define to 48.
5875         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
5876         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5877         Make __align long long instead of long.
5878         (pthread_rwlock_t): Formatting.
5879         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5880         (pthread_rwlock_t): Formatting.
5881         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5882         (pthread_cond_t): Make __align long long instead of long.
5883         (pthread_rwlock_t): Move __flags field to the same position as in
5884         linuxthreads.
5886 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
5888         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
5889         * tst-rwlock7.c (do_test): Likewise.
5891 2003-04-26  Roland McGrath  <roland@redhat.com>
5893         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
5895 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
5897         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
5898         sizeof (struct pthread).
5899         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
5900         1 struct pthread.
5901         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
5902         to 0.
5903         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
5904         struct pthread.
5905         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
5906         to 32-bit bytes.
5907         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
5908         tcbp.
5909         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
5910         unneccessarily.
5911         (NO_TLS_OFFSET): Define.
5912         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5913         add TLS_TCB_SIZE unnecessarily.
5915 2003-04-22  Roland McGrath  <roland@redhat.com>
5917         * Makeconfig (shared-thread-library): Reverse link order to work
5918         around linker bug.
5920 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
5922         * semaphore.h: Fix typo in comment.
5924 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
5926         * sysdeps/pthread/sigfillset.c: New file.
5928         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5929         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5930         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5931         * sysdeps/pthread/sigaction.c: Likewise.
5932         * sysdeps/pthread/sigprocmask.c: New file.
5933         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5934         __SIGRTMIN+1.
5935         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5936         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
5937         in this case.
5939 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
5941         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5942         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5944         * sysdeps/unix/sysv/linux/unregister-atfork.c
5945         (__unregister_atfork): Don't free memory not allocated dynamically.
5947         * semaphore.h: Remove __THROW marker from cancellation points.
5948         * nptl/sysdeps/pthread/pthread.h: Likewise.
5950 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
5952         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5953         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5954         __THROW.
5956 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
5958         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5960 2003-04-15  Roland McGrath  <roland@redhat.com>
5962         * forward.c (__pthread_unwind): Tweak to avoid warning.
5964 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
5966         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5968 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
5970         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5971         overflow CFA advance instructions.
5972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5974 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
5976         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5977         * sysdeps/i386/pthread_spin_lock.c: Likewise.
5978         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
5979         defined.
5981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5982         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5984         DW_CFA_advance_loc for .Laddl-.Lsubl.
5986 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
5988         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5989         position-independent unwind data for static libraries.
5990         Add missing unwind info.  Add comments.
5992         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5993         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5997 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
5999         * Makefile: Make sure all cancellation points are compiled with
6000         exception and asynchronous unwind tables.
6002         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6003         which mishandles loading of global object addresses in PIC.
6004         (THREAD_SETMEM_NC): Likewise.
6006 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6008         * pthread.h: Define new data structure for cleanup buffer.  Declare
6009         new cleanup handler interfaces.
6010         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6011         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6012         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6013         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6014         it.  Declare old cleanup handler installation functions.
6015         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6016         handling.
6017         * cleanup_defer.c: Likewise.
6018         * cleanup_compat.c: New file.  Old cleanup code.
6019         * cleanup_def_compat.c: New file.  Old cleanup code.
6020         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6021         if own thread descriptor.
6022         * unwind.c: New file.
6023         * forward.c: Add __pthread_unwind.
6024         * init.c (pthread_functions): Add __pthread_unwind.
6025         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6026         Add ptr___pthread_unwind.
6027         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6028         and unwind function.
6029         * Makefile (libpthread-routines): Add cleanup_compat,
6030         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6031         table generation if necessary.
6032         * version.c: Record whether unwind support is compiled in.
6033         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6034         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6035         handler interfaces.
6036         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6037         complication to generate unwind information for syscall wrappers.
6038         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6039         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6040         __cleanup_fct_attribute.
6042         * Makefile: Add rules to build and run tst-cleanup0.
6043         * tst-cleanup0.c: New file.
6044         * tst-cleanup0.expect: New file.
6046         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
6047         caller.  Optimize to avoid often unecessary local variable.
6049 2003-04-11  Roland McGrath  <roland@redhat.com>
6051         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6052         sets variable `multidir'; include that.
6053         (generated): Add it.
6054         ($(objpfx)$(multidir)/crti.o): New target.
6055         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6057 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6059         * tst-attr2.c (do_test): Add cast to avoid warning.
6060         * tst-mutex4.c (do_test): Likewise.
6062 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
6064         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6065         in child.
6067 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
6069         * Makefile (tests): Add tst-detach1.
6070         * tst-detach1.c: New file.
6072 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
6074         * sysdeps/pthread/pthread.h: Remove duplicate
6075         pthread_cleanup_{push,pop} definitions.
6077         * tst-barrier2.c: Eliminate warnings.
6078         * tst-cancel4.c: Likewise.
6079         * tst-cond4.c: Likewise.
6080         * tst-cond6.c: Likewise.
6081         * tst-detach1.c: Likewise.
6082         * tst-rwlock4.c: Likewise.
6083         * tst-rwlock6.c: Likewise.
6084         * tst-rwlock7.c: Likewise.
6085         * tst-sem3.c: Likewise.
6086         * tst-spin2.c: Likewise.
6087         * tst-umask1.c: Likewise.
6089 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
6091         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6093 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
6095         * descr.h (struct pthread): Move cancelhandling member to the front.
6097 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
6099         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6100         malloc_parent, and malloc_child statically.
6101         (__register_atfork_malloc): New function.
6102         (free_mem): Don't free any of the malloc_* variables on the list.
6103         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6104         Define HAVE_register_atfork_malloc.
6106 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
6108         * sysdeps/pthread/createthread.c (create_thread): Add some more
6109         comments explaining when to set multiple_threads and when not.
6111         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6112         THREAD_ATOMIC_BIT_SET if not already defined.
6113         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6114         THREAD_ATOMIC_BIT_SET:
6115         * sysdeps/x86_64/tls.h: Likewise.
6116         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6117         THREAD_ATOMIC_CMPXCHG_VAL.
6118         (_pthread_cleanup_pop_restore): Likewise.
6119         * cancellation.c (__pthread_enable_asynccancel): Likewise.
6120         (__pthread_enable_asynccancel_2): Likewise.
6121         (__pthread_disable_asynccancel): Likewise.
6122         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6123         (__libc_disable_asynccancel): Likewise.
6124         * init.c (sigcancel_handler): Likewise.
6125         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6126         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6128 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
6130         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6131         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6132         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6133         * Makefile (tests): Add tst-cancel11.
6134         * tst-cancel11.c: New file.
6136 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
6138         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6139         round, not the first.  Use specific_used flag instead of local
6140         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
6141         (__free_tcb): Don't call deallocate_tsd here.
6142         (start_thread): Call deallocate_tsd here.
6143         * pthread_setspecific.c: Set specific_used flag really only when
6144         needed.
6145         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6146         * tst-tsd3.c: New file.
6147         * tst-tsd4.c: New file.
6149 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6151         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6152         Use atomic_exchange_and_add instead of __lll_add.
6153         (__lll_mutex_timedlock): Likewise.
6154         Patch by Ian Wienand.
6156 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
6158         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6159         (SINGLE_THREAD_P): Fix typo.
6160         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6162 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6164         * Makefile (tests): Add tst-align.
6165         * tst-align.c: New file.
6166         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6168         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6169         function correctly.
6171         * tst-tsd2.c: Add casts to avoid warnings.
6173 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
6175         * descr.h (struct pthread): Move most often used elements to the front.
6177 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
6179         * Makefile (libpthread-routines): Add pthread_atfork.
6180         (libpthread-static-only-routines): Add pthread_atfork.
6182 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6184         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6185         of TLS_DTV_AT_TP.
6186         (INSTALL_DTV): Add parens.
6187         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6188         Use passed descr instead of THREAD_SELF.
6189         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6190         (__lll_mutex_timedlock_wait): Correct expected value after
6191         spurious wakeup.
6192         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6193         Release lock before waking up the waiters.
6194         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6195         criteria.  Reorderstruct passed to cleanup handler.  Fix
6196         handling of cancellation and failung pthread_mutex_unlock call.
6197         Use __pthread_enable_asynccancel_2 instead of
6198         __pthread_enable_asynccancel.
6199         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6200         Return result of lock re-get if it fails.
6201         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6202         for __pthread_cleanup_push.
6203         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6204         completely broken rwlock implementation.
6205         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6206         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6207         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6208         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6209         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6210         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
6211         versioned_symbol macro.
6212         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6213         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6215 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
6217         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
6218         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
6219         and __helper_tid.
6220         (struct timer): Remove th and bar field.
6221         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
6222         debugging code.  Create only one helper thread.
6223         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
6224         helper thread.
6225         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6226         Renamed.  Define statically.  Use thread info from siginfo.
6227         (__helper_once): New variable.
6228         (__helper_tid): New variable.
6229         (__reset_helper_control): New function.
6230         (__start_helper_thread): New function.
6232         * pthread_create.c (start_thread): Don't use setjmp inside
6233         __builtin_expect to work around gcc bug.
6235         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
6236         timer_delete syscall fails, but not with ENOSYS, set
6237         __no_posix_timers.
6239         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
6240         (timer_settime): Fix typo.
6241         * sysdeps/unix/sysv/linux/timer_getoverr.c
6242         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
6244 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
6246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
6247         offset of cleanupbuf.__prev.
6249 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
6251         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
6252         of included file.
6254 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
6256         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
6257         NULL provide default definition to syscall.
6259 2003-03-25  Roland McGrath  <roland@redhat.com>
6261         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
6262         (timer_id2ptr): Fix typo.
6264 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
6266         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
6267         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
6268         * sysdeps/ia64/pthreaddef.h: Likewise.
6269         * sysdeps/powerpc/pthreaddef.h: Likewise.
6270         * sysdeps/s390/pthreaddef.h: Likewise.
6271         * sysdeps/sh/pthreaddef.h: Likewise.
6272         * sysdeps/x86_64/pthreaddef.h: Likewise.
6273         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
6274         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
6275         being changed.
6276         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6277         SIGTIMER is not unblocked.
6278         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
6279         RT signal taken.
6280         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
6281         be send.
6282         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
6283         pass pointer through as ID.
6284         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
6285         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
6286         * sysdeps/unix/sysv/linux/timer_create.c: New file.
6287         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
6288         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
6289         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
6290         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
6291         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
6292         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
6293         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
6294         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
6295         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
6296         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
6297         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
6298         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
6299         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
6300         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
6301         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
6302         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
6303         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
6304         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
6305         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
6306         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
6307         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
6308         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
6309         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
6310         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
6311         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
6312         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
6313         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
6314         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
6315         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
6316         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
6318         * pthreadP.h: Remove FRAME_LEFT definition.
6319         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
6320         already left frame.  Programs which have this problem are not POSIX
6321         compliant.
6322         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
6324 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
6326         * sysdeps/pthread/tst-timer.c: Check return values of the
6327         functions we test.
6329 2003-03-23  Roland McGrath  <roland@redhat.com>
6331         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
6332         * tst-tls3mod.c: Likewise.
6333         * tst-tls1.c: Likewise.
6334         * tst-tls2.c: Likewise.
6336         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
6337         undefined behavior.
6339         * tst-join5.c (tf1, tf2): Add a cast.
6341         * Makeconfig (includes): Append -I$(..)nptl to this variable.
6343         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
6344         Don't test anything.
6345         * tst-cond4.c: Likewise.
6346         * tst-cond6.c: Likewise.
6347         * tst-flock2.c: Likewise.
6348         * tst-mutex4.c: Likewise.
6349         * tst-rwlock4.c: Likewise.
6350         * tst-signal1.c: Likewise.
6351         * tst-spin2.c: Likewise.
6352         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
6354         * tst-mutex4.c: Use test-skeleton.c.
6355         * tst-spin2.c: Likewise.
6356         * tst-sysconf.c: Likewise.
6357         * tst-barrier2.c: Likewise.
6358         * tst-cond4.c: Likewise.
6359         * tst-cond6.c: Likewise.
6360         * tst-rwlock4.c: Likewise.
6361         * tst-unload.c: Likewise.
6362         * tst-flock2.c (do_test): Use return instead of exit.
6364 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
6366         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
6368 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
6370         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6371         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
6372         instead of __lll_compare_and_swap.
6373         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6374         Likewise.
6375         Removed definition if __lll_compare_and_swap.
6377         * cancellation.c: Adjust for new form of compare&exchange macros.
6378         * cleanup_defer.c: Likewise.
6379         * init.c: Likewise.
6380         * libc-cancellation.c: Likewise.
6381         * old_pthread_cond_broadcast.c: Likewise.
6382         * old_pthread_cond_signal.c: Likewise.
6383         * old_pthread_cond_timedwait.c: Likewise.
6384         * old_pthread_cond_wait.c: Likewise.
6385         * pthread_cancel.c: Likewise.
6386         * pthread_create.c: Likewise.
6387         * pthread_detach.c: Likewise.
6388         * pthread_join.c: Likewise.
6389         * pthread_key_delete.c: Likewise.
6390         * pthread_setcancelstate.c: Likewise.
6391         * pthread_setcanceltype.c: Likewise.
6392         * pthread_timedjoin.c: Likewise.
6393         * pthread_tryjoin.c: Likewise.
6394         * sysdeps/pthread/createthread.c: Likewise.
6396 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
6398         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
6399         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
6400         definitions.  Replace uses with calls to atomic_* functions.
6401         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6402         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
6403         __lll_test_and_set calls with atomic_exchange_and_add and
6404         atomic_exchange calls respectively.
6405         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
6406         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
6407         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
6408         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6409         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
6410         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
6411         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
6413         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
6414         returns the old value.
6416 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
6418         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
6419         int for variable OLDVAL and correct inline assembler contraint.
6420         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
6421         type int for variable OLD.
6423         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
6424         only for s390-32.
6425         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
6426         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
6427         instead of multiple_threads field in the TCB.
6429 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
6431         * sysdeps/i386/i686/bits/atomic.h: Removed.
6432         * sysdeps/i386/i586/bits/atomic.h: Removed.
6433         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
6434         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
6435         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
6436         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
6437         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
6438         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
6439         * atomic.h: Removed.  Moved to glibc.
6441         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
6442         support for clock selection.
6444         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
6445         signalling waiters.
6447 2003-03-18  Roland McGrath  <roland@redhat.com>
6449         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
6450         Add __lll_rel_instr first.  Add memory clobber.
6451         (lll_mutex_unlock): Use __lll_test_and_set.
6452         From Paul Mackerras <paulus@samba.org>.
6454         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
6455         unconditionally.
6456         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6457         (SINGLE_THREAD_P):  Add `header.' prefix.
6458         From Paul Mackerras <paulus@samba.org>.
6460         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
6461         pthread_timedjoin_np to ...
6462         (libpthread: GLIBC_2.3.3): ... here.
6463         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
6465         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6466         Avoid shadowing VAL variable.
6468         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
6469         New macro.
6471 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
6473         * Makefile (tests): Add tst-cond11.
6474         * tst-cond11.c: New file.
6476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
6477         struct passed to cleanup handler to eliminate one more
6478         instruction.
6479         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6481         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6482         (pthrad_cond_t): Replace __unused field with __clock.
6484         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
6485         waken all waiters in cleanup handler.
6486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6489         * pthread_condattr_getclock.c: New file.
6490         * pthread_condattr_setclock.c: New file.
6491         * sysdeps/pthread/pthread.h: Declare these new functions.
6492         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
6493         * Makefile (libpthread-routines): Add the new functions.
6494         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
6495         Renamed field to value.  Document use of the bits.
6496         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
6497         change.
6498         * pthread_condattr_setpshared.c: Likewise.
6499         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
6500         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
6501         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6502         Add __clock field.
6503         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6504         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6505         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6506         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6508         Implement clock selection.
6509         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6510         * pthread-errnos.sym: Add ENOSYS.
6511         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6512         _POSIX_CLOCK_SELECTION.
6513         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6515         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
6516         invalid .size directive.
6518 2003-03-17  Roland McGrath  <roland@redhat.com>
6520         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6521         Formatting tweaks.
6523 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
6525         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
6526         Use __lll_add instead of spelling it out.  Use protected symbol names.
6527         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
6528         Use __lll_add.
6529         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
6530         Renamed from lll_compare_and_swap.  Use new name where necessary.
6531         (__lll_add): Defined.
6532         (__lll_dec_if_positive): Defined.
6533         (__lll_test_and_set): Defined.
6534         * sysdeps/ia64/pthread_spin_init.c: Removed.
6535         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
6536         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
6537         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
6538         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
6539         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
6540         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
6541         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
6542         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
6543         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
6544         __sync_lock_release_si.
6545         Patch by Jakub Jelinek.
6547         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6548         Fix timeout handling.
6549         (__lll_timedwait_tid): Likewise.
6550         (lll_unlock_wake_cb): Wake up other waiters if necessary.
6551         Patch by Jakub Jelinek.
6553         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
6555 2003-03-17  Roland McGrath  <roland@redhat.com>
6557         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
6558         * sysdeps/pthread/pthread_spin_init.c: New file.
6559         * sysdeps/pthread/pthread_spin_unlock.c: New file.
6560         * sysdeps/powerpc/Makefile: New file.
6561         * sysdeps/powerpc/pthread_spin_lock.c: New file.
6562         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
6563         * sysdeps/powerpc/pthreaddef.h: New file.
6564         * sysdeps/powerpc/tcb-offsets.sym: New file.
6565         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
6566         * sysdeps/powerpc/tls.h: New file.
6567         * sysdeps/powerpc/bits/atomic.h: New file.
6568         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
6569         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
6570         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
6572         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
6573         * sysdeps/unix/sysv/linux/sem_post.c: New file.
6574         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
6575         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
6576         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
6577         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
6578         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
6579         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
6580         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
6581         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
6582         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
6583         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
6584         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
6585         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
6586         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
6588         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
6589         not gettimeofday.
6590         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
6591         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6592         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
6593         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
6594         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6596 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
6598         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
6599         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6602         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
6604 2003-03-16  Roland McGrath  <roland@redhat.com>
6606         * tst-fork4.c: Include <string.h>.
6607         * tst-signal2.c: Likewise.
6608         * tst-mutex5.c (do_test): exit -> return.
6609         * tst-mutex2.c: Include <stdlib.h>.
6611 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
6613         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6614         (__lll_mutex_timedlock_wait): Correct expected value after
6615         spurious wakeup.  Otherwise we would never wait again.
6617         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
6618         zone versus inline asm stupidity.  Use correct instructions.
6620         * tst-rwlock6.c: Add some more status output.
6622 2003-03-15  Roland McGrath  <roland@redhat.com>
6624         * sysdeps/pthread/configure.in: New file.
6625         * sysdeps/pthread/configure: New file (generated).
6627 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
6629         * allocatestack.c (allocate_stack): Store the exact stack size of
6630         user allocated stacks.
6632 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
6634         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
6635         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
6636         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
6637         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
6638         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
6639         Use `header.' prefix.
6640         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
6642 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
6644         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
6645         __builtin_frame_address, use stack pointer.
6647         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
6648         instead of __builtin_frame_pointer.
6650 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
6652         * tst-basic1.c (do_test): Add cast to avoid warning.
6653         * tst-basic2.c (do_test): Likewise.
6655         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
6656         amount of stack correction.
6658         * tst-fork4.c: Use test-skeleton.c.
6660 2003-03-14  Roland McGrath  <roland@redhat.com>
6662         * init.c: Fix typo "#eli" for "#else".
6664 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
6666         * allocatestack.c (__stack_user): Use hidden_data_def.
6667         * pthread_create.c (__pthread_keys): Likewise.
6669         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
6671 2003-03-14  Roland McGrath  <roland@redhat.com>
6673         * tst-fork4.c: New file.
6674         * Makefile (tests): Add it.
6676         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
6677         we always define the padding space.
6678         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
6679         stopped supporting its own extensions fully.
6680         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
6681         struct also called `header', so `header.multiple_threads' is the field
6682         name to use on all machines.
6683         * allocatestack.c (allocate_stack): Use `header.' prefix.
6684         * sysdeps/pthread/createthread.c (create_thread): Likewise.
6685         * pthread_create.c (__pthread_create_2_1): Likewise.
6686         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
6687         (THREAD_SELF): Likewise.
6688         * sysdeps/x86_64/tls.h: Likewise.
6689         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6690         (SINGLE_THREAD_P): Likewise.
6691         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6692         (SINGLE_THREAD_P): Likewise.
6693         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
6694         (SINGLE_THREAD_P): Likewise.
6696         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
6697         value directly.
6699 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
6701         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
6702         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
6704         * pthread_create.c (start_thread): setjmp is expected to return 0.
6706         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
6707         (THREAD_GETMEM_NC): Likewise.
6709 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
6711         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
6712         and the size of the stack which must be allocated is a multiple,
6713         allocate one more page.
6714         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
6715         MULTI_PAGE_ALIASING.
6717 2003-03-13  Roland McGrath  <roland@redhat.com>
6719         * pthread_create.c (start_thread): Set EXITING_BIT after the
6720         event-reporting (and destructors), not before.
6722 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
6724         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
6725         lll_futex_wake): Declare register variables as long int instead of
6726         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
6727         Make syscall arguments clobbered by the syscall.
6728         (lll_futex_wait): Define using lll_futex_timed_wait.
6730         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
6731         to void *.
6733         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
6734         PPID if [! NDEBUG].
6736         * allocatestack.c (nptl_ncreated): Only declare if
6737         COLORING_INCREMENT != 0.
6739         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
6740         (__libc_enable_asynccancel_2): Remove prototype.
6742         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
6743         ctid to match kernel.
6745 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6747         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
6748         libc_multiple_threads.
6749         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
6750         __libc_multiple_threads to...
6751         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
6753         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
6754         versioning.
6755         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6756         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6758         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
6759         (__pthread_once_internal): Define.
6761         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
6762         macros instead of .symver directly.
6763         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6764         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6766         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
6767         * sysdeps/x86_64/tcb-offsets.sym: New file.
6768         * sysdeps/x86_64/Makefile: New file.
6770         * sysdeps/i386/tcb-offsets.sym: Add SELF.
6771         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
6772         to access own pthread_t in TCB.
6773         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6774         Likewise.
6775         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6776         Likewise.
6777         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6779 2003-03-12  Roland McGrath  <roland@redhat.com>
6781         * pthread-errnos.sym: New file.
6782         * Makefile (gen-as-const-headers): New variable, list that file.
6783         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
6784         header <pthread-errnos.h> instead of defining errno values here.
6785         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6786         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6787         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6788         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6789         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6790         Likewise.
6791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6792         Likewise.
6793         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6795         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6796         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6797         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6798         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6799         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6800         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6802         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6803         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6804         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
6805         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6806         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
6807         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6808         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6809         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6810         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6811         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6812         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6813         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6814         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6815         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
6816         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
6817         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
6818         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6819         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6821         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
6822         CLONE_CHILD_SETTID worked.
6824 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
6826         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
6827         file.
6828         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
6829         file.
6831         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6832         (pthread_cond_t): Add padding.
6834         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
6835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
6836         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
6838         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
6839         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
6840         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
6841         (__pthread_rwlock_timedrdlock): Likewise.
6842         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
6843         (__pthread_rwlock_wrlock): Likewise.
6844         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
6845         (__pthread_rwlock_rdlock): Likewise.
6847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
6849         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
6850         result of lock re-get if it fails.
6852 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6854         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
6855         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6856         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6858         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6859         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6860         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6861         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6862         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6863         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6865         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
6866         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
6868         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
6869         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
6870         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
6871         (create_thread): Likewise.
6872         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
6873         * init.c (__pthread_initialize_minimal_internal): Initialize
6874         __libc_multiple_threads_ptr if necessary.
6875         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
6876         __pthread_multiple_threads and __libc_multiple_threads_ptr.
6877         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
6878         __libc_multiple_threads.
6879         (__libc_pthread_init): Return pointer to __libc_pthread_init if
6880         necessary.
6882         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
6883         (THREAD_SETMEM_NC): Likewise.
6885         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
6886         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
6887         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
6888         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
6890         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
6891         Eliminate one entire instruction.
6893         * cancellation.c (__pthread_enable_asynccancel_2): New function.
6894         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
6895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6896         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
6897         instead of __pthread_enable_asynccancel.
6898         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6899         (__pthread_cond_wait): Likewise.
6900         * sysdeps/pthread/pthread_cond_timedwait.c
6901         (__pthread_cond_timedwait): Likewise.
6902         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6905         (__condvar_cleanup): Wake up all waiters in case we got signaled
6906         after being woken up but before disabling asynchronous
6907         cancellation.
6908         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6909         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6910         (__condvar_cleanup): Likewise.
6912         * init.c (__NR_set_tid_address): If already defined, don't redefine.
6913         Make it an error if architecture has no #if case.  Add x86-64.
6915         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6916         pt-initfini.s generation.
6918         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6919         (TLS_INIT_TP): Fix typo.
6921 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6923         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6924         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6926         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6927         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6928         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6929         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6930         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6931         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6932         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6933         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6935 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
6937         * sysdeps/pthread/pthread_cond_timedwait.c
6938         (__pthread_cond_timedwait): Return the result of the final
6939         locking.  If it succeeds, the regular function return value.
6941         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6942         Return result of the final locking.
6943         * version.c (__nptl_main): Work around problems with the strange
6944         INTERNAL_SYSCALL macro on ppc32.
6945         * init.c (__pthread_initialize_minimal_internal): Unblock
6946         SIGCANCEL in case the parent blocked it.
6947         Reported by Paul Mackerras <paulus@samba.org>.
6949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6951         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6953 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
6955         * sysdeps/pthread/pthread_cond_timedwait.c
6956         (__pthread_cond_timedwait): Unlock and fail if
6957         __pthread_mutex_unlock_internal failed.
6959         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6960         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6961         Use ARCH_CLONE.
6962         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6963         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6964         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6965         ALLOCATE_STACK): New macros.
6966         (TLS_TPADJ): New macro.
6967         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6968         (allocate_stack): Handle TLS_DTV_AT_TP and
6969         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
6970         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6971         Don't set PD->self.
6972         * init.c [__ia64__] (__NR_set_tid_address): Define.
6974         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6975         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6976         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6977         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6978         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6979         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6980         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6981         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6982         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6983         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6984         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6985         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6986         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6987         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6988         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6989         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6990         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6991         * sysdeps/ia64/bits/atomic.h: New file.
6992         * sysdeps/ia64/Makefile: New file.
6993         * sysdeps/ia64/pthread_spin_init.c: New file.
6994         * sysdeps/ia64/pthread_spin_lock.c: New file.
6995         * sysdeps/ia64/pthread_spin_trylock.c: New file.
6996         * sysdeps/ia64/pthread_spin_unlock.c: New file.
6997         * sysdeps/ia64/pthreaddef.h: New file.
6998         * sysdeps/ia64/tcb-offsets.sym: New file.
6999         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7000         * sysdeps/ia64/tls.h: New file.
7002         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7003         to syscall instead of no arguments.
7005 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7007         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7008         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7009         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7010         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7012         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7013         unused code.
7015         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7017         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7018         lowlevelbarrier.sym.
7019         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7020         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7021         Include lowlevelbarrier.h and don't define offsets locally.
7022         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7024         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7025         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7026         (__lll_mutex_timedlock_wait): Likewise.
7027         (lll_mutex_lock): Adjust asm for that.
7028         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7029         (lll_lock): Adjust asm for operand order change.
7030         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7031         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7033         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7034         Reverse order of parameters.
7035         (__lll_timedwait_tid): Remove regparms attribute.
7036         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7037         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7039         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7040         (__lll_timedwait_tid): Remove one unnecessary instruction.
7042         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7043         __lll_mutex_timedlock_wait only for NOT_IN_libc.
7044         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7045         lowlevelmutex.S.
7047         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7048         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7049         for NOT_IN_libc.
7050         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7051         lowlevellock.S.
7053         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7054         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
7055         for libc.so.
7056         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7057         define LOCK here (if UP is not defined).  The actual code is in
7058         lowlevelmutex.S.
7060         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7061         LOCK is already defined.  Don't define lll_unlock_wake_cb and
7062         __lll_timedwait_tid for libc.so.
7063         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7064         define LOCK here (if UP is not defined).  The actual code is in
7065         lowlevellock.S.
7067         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7068         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7069         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7070         instead of lowlevelsem.h.
7071         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7072         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7073         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7075         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7076         lowlevelrwlock.sym.
7077         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7078         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7079         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7081         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7082         register loading.
7083         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7084         last changed.  D'oh.
7086         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7088         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7089         of __libc_locking_needed.
7090         (lll_trylock): Initialize %eax to zero.
7092         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7093         pthread_cond_t definition.
7095 2003-03-10  Roland McGrath  <roland@redhat.com>
7097         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7098         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7099         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7100         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7101         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7103         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7104         Instead of setting PD->multiple_threads, set globals
7105         __pthread_multiple_threads and __libc_multiple_threads.
7106         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7107         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7108         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7110         * descr.h (struct pthread): Conditionalize first member on
7111         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
7112         containing an anonymous tcbhead_t.  Move `list' member out.
7113         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7114         * allocatestack.c: Remove use of `header.data.' prefix.
7115         * pthread_create.c: Likewise.
7116         * init.c (__pthread_initialize_minimal_internal): Likewise.
7117         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7118         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7119         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7120         * sysdeps/x86_64/tls.h: Likewise.
7121         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7122         (SINGLE_THREAD_P): Likewise.
7123         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7124         (SINGLE_THREAD_P): Likewise.
7125         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7126         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7128 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
7130         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7132         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7133         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7135         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7136         leftovers from the ia32 code.
7138         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7139         memory load.
7140         (clear_once_control): Don't load %esi.
7142         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7143         handling.
7145         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7147         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7148         * sysdeps/unix/sysv/linux/createthread.c: ...here.
7150         * Makefile (tests): Add tst-cond10.
7151         * tst-cond10.c: New file.
7153 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
7155         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7156         * tst-signal3.c (do_test): Likewise.
7157         * tst-sem5.c (do_test): Likewise.
7158         * tst-kill6.c (do_test): Likewise.
7159         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
7161         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7162         of inc/dec.
7163         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7164         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7165         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7166         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7170         Likewise.
7171         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7172         Likewise.
7173         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7175         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7176         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7178         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7179         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7180         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7182         * allocatestack.c (allocate_stack): If mprotect() fails free the
7183         TLS memory.
7185 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
7187         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7189         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7190         lll_wake_tid.  This was used only to work around kernel limits in
7191         the early days.
7192         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7193         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7194         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7195         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7197         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7198         (__pthread_initialize_minimal_internal): Change initialization of
7199         __static_tls_align_m1 appropriately.
7200         * pthreadP.h (__static_tls_align_m1): Renamed from
7201         __static_tls_align.
7202         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7203         instead of __static_tls_align-1.
7205 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
7207         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7209         * pthread_create.c: Define __pthread_keys using nocommon
7210         attribute, not by placing it explicitly in bss.
7211         Remove DEFINE_DEALLOC definition.  Not needed anymore.
7213         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7214         Use it in mmap call to allocate stacks.
7216         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
7218         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
7219         result of the thread function.
7221 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
7223         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
7224         version is just fine.
7226         * sysdeps/unix/sysv/linux/libc_pthread_init.c
7227         (__pthread_child_handler): Renamed from pthread_child_handler,
7228         exported, and marked hidden.  Change all users.
7229         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
7230         free __pthread_child_handler from child list.
7232 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7234         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
7236         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7237         Fix handling of cancellation and failing pthread_mutex_unlock call.
7238         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7239         (__pthread_cond_wait): Likewise.
7241         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
7242         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
7243         lll_futex_timed_wait call.
7244         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7245         (pthread_rwlock_timedwrlock): Likewise.
7247         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7248         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
7249         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
7251         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
7252         check of lll_futex_wake return value.
7254 2003-03-03  Roland McGrath  <roland@redhat.com>
7256         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
7258         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7259         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
7260         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
7262 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
7264         * sysdeps/pthread/timer_create.c (timer_create): Return correct
7265         error for CPU clocks.
7267         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7268         _POSIX_MONOTONIC_CLOCK.
7269         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7271         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
7272         recent kernels.
7274 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
7276         * descr.h (struct pthread): Move cleanup field to the front.
7278 2003-03-01  Roland McGrath  <roland@redhat.com>
7280         * sem_open.c (sem_open): Braino fix.
7282 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
7284         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
7285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
7286         __pthread_cleanup_pop functionality.
7287         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7289         * descr.h (struct pthread): Move tid field to the front now that
7290         it is often used.
7292         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
7293         (__lll_mutex_timedlock_wait): Remove.
7294         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7295         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7296         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7297         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7298         (lll_unlock_wake_cb): Don't save and restore %esi.
7299         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
7300         %esi.
7301         (__lll_timedwait_tid): Add alignment.
7302         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7303         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
7304         %esi.
7305         (__lll_timedwait_tid): Removed.
7306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7307         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
7308         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7309         (pthread_barrier_wait): Don't save, load, and restore %esi for
7310         last thread.
7311         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7312         (__pthread_cond_signal): Don't save, load, and restore %esi.
7313         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
7314         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
7315         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
7316         Don't save, load, and restore %esi.
7318 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
7320         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
7321         Release lock before waking up the waiters.
7323         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
7325         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
7326         (reader_thread): Likewise.
7328         * sysdeps/pthread/pthread_rwlock_unlock.c
7329         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
7330         to wake up readers if there are none.
7332         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
7333         Release internal lock before wake threads.
7335 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
7337         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
7338         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
7339         predefined.
7340         * tst-rwlock9.c: Likewise.
7341         * tst-rwlock10.c: New file.
7342         * tst-rwlock11.c: New file.
7344         * Makefile (tests): Add tst-dlsym1.
7345         * tst-dlsym1.c: New file.
7347         * init.c (__pthread_initialize_minimal_internal): Set
7348         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
7349         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
7351 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
7353         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
7355         * tst-cond2.c: Fix sychronization with child.
7357         * tst-rwlock8.c (reader_thread): Remove unused variable.
7359         * Makefile: Add rules to build and run tst-tls3.
7360         * tst-tls3.c: New file.
7361         * tst-tls3mod.c: New file.
7363         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
7364         * tst-rwlock8.c: New file.
7365         * tst-rwlock9.c: New file.
7366         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
7367         complete broken rwlock implementation.
7368         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7369         Likewise.
7370         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7371         Likewise.
7372         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7373         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7374         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7375         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7376         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7377         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
7378         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7380 2003-02-23  Roland McGrath  <roland@redhat.com>
7382         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
7384 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
7386         * Makefile (tests): Add tst-context1.
7387         * tst-context1.c: New file.
7389         * Makefile (tests): Add tst-tls1 and tst-tls2.
7390         * tst-tls1.c: New file.
7391         * tst-tls2.c: New file.
7393         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
7394         for failed cmpxchg.
7396         * pthread_create.c (start_thread): Set EXITING_BIT early.
7398         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
7399         (THREAD_GETMEM_NC): Likewise.
7401 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
7403         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
7404         off 3 more bytes by using offset-less instructions when possible.
7406         * Makefile: Add dependency for $(objpfx)version.d.
7408         * eintr.c (eintr_source): Add unnecessary return but the compiler
7409         insists.
7411         * tst-kill3.c: Include <unistd.h>.
7413 2003-02-21  Roland McGrath  <roland@redhat.com>
7415         * pthread_create.c (start_thread): Call __libc_thread_freeres.
7417 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
7419         * Makefile (tests): Add tst-eintr1.
7420         (distribute): Add eintr.c.
7421         * tst-eintr1.c: New file.
7422         * eintr.c: New file.
7424         * pthread_cancel.c (pthread_cancel): Use tkill directly.
7426         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
7427         Disallow sending SIGCANCEL.
7429         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
7430         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
7431         * tst-kill1.c: New file.
7432         * tst-kill2.c: New file.
7433         * tst-kill3.c: New file.
7434         * tst-kill5.c: New file.
7435         * tst-kill6.c: New file.
7436         * tst-basic7.c: Renamed to...
7437         * tst-kill4.c: ...this.
7439 2003-02-21  Roland McGrath  <roland@redhat.com>
7441         * Makefile (install-lib-ldscripts): New variable.
7443 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
7445         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
7446         * pthread_cancel.c: Use INVALID_TD_P.
7447         * pthread_detach.c: Likewise.
7448         * pthread_getschedparam.c: Likewise.
7449         * pthread_setschedparam.c: Likewise.
7450         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7451         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7452         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
7453         * pthread_timedjoin.c: Likewise.
7455         * tst-basic7.c: Include <signal.h>.
7457         * pthread_join.c (pthread_join): Limited checking for invalid
7458         descriptors.
7459         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
7461 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
7463         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
7464         beginning of the loop.  Clear the entire first block of TSD.
7465         * Makefile (tests): Add tst-key4.
7466         * tst-key4.c: New file.
7468 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
7470         * Makefile (tests): Add tst-basic7.
7471         * tst-basic7.c: New file.
7473         * pthread_create.c (deallocate_tsd): Mark as internal_function.
7474         Add some more __builtin_expect.
7476         * pthreadP.h: Define dummy version of DEBUGGING_P.
7478 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
7480         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
7481         _POSIX_THREAD_PRIORITY_SCHEDULING.
7482         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
7483         _XOPEN_REALTIME_THREADS.
7484         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
7486         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
7487         kernel returns EINVAL for PID <= 0, work around it.
7489         * Makefile (tests): Add tst-signal5.
7490         * tst-signal5.c: New file.
7492         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
7493         and LOGIN_NAME_MAX.
7495         * tst-cancel1.c (tf): Block all signals.
7497         * Makefile (tests): Add tst-basic6.
7498         * tst-basic6.c: New file.
7500         * tst-basic1.c: Add test for process ID.
7502         * Makefile (tests): Add tst-cancel10.
7503         * tst-cancel10.c: New file.
7505         * Makefile (tests): Add tst-signal4.
7506         * tst-signal4.c: New file.
7508         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
7509         __sigismember instead of sigismember.  Add __builtin_expect.
7511 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
7513         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
7514         pthread_setcancelstate, and pthread_rwlock_setpshared.
7516         * tst-cancel7.c (do_test): Make sure the pid file exists before
7517         canceling the thread.
7519         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
7520         pthread_rwlock_timedrdlock tests.
7521         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
7522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7523         Check for invalid tv_nsec field.
7524         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7525         Likewise.
7527         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
7528         recursive mutex of overflow.
7530         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
7532         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
7533         going into an endless loop.
7534         * Makefile (tests): Add tst-cancel9.
7535         * tst-cancel9.c: New file.
7537         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
7539 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
7541         * tst-mutex5.c (do_test): Add more timedlock tests.
7543         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
7544         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
7546         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
7547         use INLINE_SYSCALL.  Error number is returned, not -1.
7549         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
7550         and __deallocate_stack with internal_function.
7551         * pthread_create.c: Adjust definitions appropriately.
7552         * allocatestack.c: Likewise.
7554         * pthread_join.c: Add one more __builtin_expect.
7555         * pthread_timedjoin.c: Likewise.
7557         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
7558         not data of sequence number does not match.
7559         Add one __builtin_expect.
7561         * Makefile (tests): Add tst-clock1.
7562         * tst-clock1.c: New file.
7564         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
7565         negative arguments.
7566         * Makefile (tests): Add tst-basic5.
7567         * tst-basic5.c: New file.
7569 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
7571         * Makefile (tests): Add tst-basic4.
7572         * tst-basic4.c: New file.
7574         * pthreadP.h: Add declaraction for __nptl_nthreads.
7575         * pthread_create.c: Define __nptl_nthreads
7576         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
7577         after thread is done.  If then zero, call exit(0).
7578         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7579         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
7580         * init.c (pthread_functions): Initialize ptr_nthreads.
7581         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
7582         (__reclaim_stacks): Decrement __nptl_nthreads.
7583         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
7584         Define.
7585         * Makefile (tests): Add tst-basic3.
7586         * tst-basic3.c: New file.
7588         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
7589         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
7590         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
7591         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
7592         if asynchronous canceling is enabled.
7593         * pthread_join.c (pthread_join): When recognizing circular joins,
7594         take into account the other thread might be already canceled.
7595         * Makefile (tests): Add tst-join5.
7596         * tst-join5.c: New file.
7598         * Makefile (tests): Add tst-join4.
7599         * tst-join4.c: New file.
7601 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
7603         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
7605 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7607         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
7608         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
7609         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
7610         warning.
7611         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
7612         to avoid warning.
7613         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
7614         error if lll_futex_wake failed.
7616 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
7618         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
7619         handling of cancellation and failung pthread_mutex_unlock call.
7620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7621         * Makefile (tests): Add tst-cond8 and tst-cond9.
7622         * tst-cond8.c: New file.
7623         * tst-cond9.c: New file.
7625         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
7627         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
7628         non-standard initializers with __USE_GNU.
7630         * Makefile (tests): Add tst-cleanup3.
7631         * tst-cleanup3.c: New file.
7633 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
7635         * Makefile (tests): Add tst-attr1 and tst-attr2.
7636         * tst-attr1.c: New file.
7637         * tst-attr2.c: New file.
7639         * Makefile: Add rules to build and run tst-atfork2 test.
7640         * tst-atfork2.c: New file.
7641         * tst-atfork2mod.c: New file.
7643         * sysdeps/unix/sysv/linux/unregister-atfork.c
7644         (__unregister_atfork): Free the memory allocated for the handlers
7645         after removing them from the lists.
7647         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
7648         cleanup function.
7650         * tst-atfork1.c (do_test): Wait for the child we forked.
7651         Report error in child.
7653         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
7655         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
7657 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
7659         * Makefile (tests): Add tst-cancel8.
7660         * tst-cancel8.c: New file.
7662         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
7663         clearing of control variable.
7664         * Makefile (tests): Add tst-once3 and tst-once4.
7665         * tst-once3.c: New file.
7666         * tst-once4.c: New file.
7668 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
7670         * sysdeps/sh/Makefile: New file.
7671         * sysdeps/sh/bits/atomic.h: New file.
7672         * sysdeps/sh/pthread_spin_init.c: New file.
7673         * sysdeps/sh/pthread_spin_lock.c: New file.
7674         * sysdeps/sh/pthread_spin_trylock.S: New file.
7675         * sysdeps/sh/pthread_spin_unlock.S: New file.
7676         * sysdeps/sh/pthreaddef.h: New file.
7677         * sysdeps/sh/tcb-offsets.sym: New file.
7678         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
7679         * sysdeps/sh/tls.h: New file.
7680         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
7681         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
7682         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
7683         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
7684         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
7685         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
7686         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
7687         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
7688         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
7689         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
7690         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
7691         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
7692         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
7693         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
7694         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
7695         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
7696         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
7697         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
7698         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
7699         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
7700         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
7701         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
7702         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
7703         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
7704         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
7705         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
7706         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
7707         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
7708         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
7709         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
7711 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
7713         * tst-cond2.c: Rearrange code to not rely on behavior undefined
7714         according to POSIX.
7716         * tst-basic2.c (do_test): Lock mutex before creating the thread.
7718 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
7720         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
7721         (TLS_GET_FS): New #define.
7722         (TLS_SET_FS): New #define.
7723         Correct value of __NR_set_thread_area.
7725         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
7727 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
7729         * Makefile (tests): Add tst-popen1.
7730         * tst-popen1.c: New file.
7732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
7733         but inactive generalization.
7734         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7736         Minor optimization, remove one instruction.
7737         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7739 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7741         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
7743 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7745         * init.c (__NR_set_tid_address): Add #ifdef for s390.
7746         * sysdeps/pthread/pthread_barrier_wait.c: New file.
7747         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
7748         * sysdeps/pthread/pthread_cond_signal.c: New file.
7749         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
7750         * sysdeps/pthread/pthread_cond_wait.c: New file.
7751         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
7752         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
7753         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
7754         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
7755         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
7756         * sysdeps/s390/Makefile: New file.
7757         * sysdeps/s390/bits/atomic.h: New file.
7758         * sysdeps/s390/pthread_spin_init.c: New file.
7759         * sysdeps/s390/pthread_spin_lock.c: New file.
7760         * sysdeps/s390/pthread_spin_trylock.c: New file.
7761         * sysdeps/s390/pthread_spin_unlock.c: New file.
7762         * sysdeps/s390/pthreaddef.h: New file.
7763         * sysdeps/s390/tcb-offsets.sym: New file.
7764         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
7765         * sysdeps/s390/tls.h: New file.
7766         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
7767         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
7768         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
7769         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
7770         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
7771         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
7772         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7773         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
7774         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
7775         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
7776         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
7777         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
7778         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
7779         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
7780         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
7781         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
7782         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
7783         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
7784         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
7785         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
7786         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
7787         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7788         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
7790 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
7792         * atomic.h: Add a couple more default implementations.
7793         (atomic_compare_and_exchange_acq): Use
7794         __arch_compare_and_exchange_32_acq in return value definition.  It
7795         always exists.
7796         (atomic_bit_set): Renamed from atomic_set_bit.
7797         Add missing atomic_ prefixes.
7799         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
7800         thread library is available, use correct value to mark initialized
7801         once variable.
7803 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
7805         * allocatestack.c (allocate_stack): Use __getpagesize instead of
7806         __sysconf to determine pagesize.
7808         * pthread_create.c: Include <atomic.h>.
7809         * allocatestack.c (allocate_stack): Implement coloring of the
7810         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
7811         size minus one.  Adjust users.
7812         * sysdeps/i386/i686/Makefile: New file.
7814 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
7816         * allocatestack.c: Improve comment throughout the file.
7818         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7819         (__lll_lock_wait): Add branch prediction.
7820         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7821         (__lll_lock_wait): Likewise.
7822         (lll_unlock_wake_cb): Removed.
7824 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
7826         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
7827         _POSIX_THREAD_PRIORITY_SCHEDULING.
7829 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
7831         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7832         Fix return type of ptr___pthread_getspecific.
7834 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
7836         * Makefile (tests): Add tst-umask1.
7837         (tst-umask1-ARGS): Define.
7838         * tst-umask1.c: New file.
7840 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
7842         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
7843         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
7844         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
7845         pthread_rwlock_unlock.
7846         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
7847         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
7848         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
7849         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
7850         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7851         New file.
7852         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
7853         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7854         New file.
7855         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
7856         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
7857         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
7858         New file.
7859         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
7860         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
7861         New file.
7862         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
7863         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
7864         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
7865         New file.
7866         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
7867         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
7868         New file.
7869         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
7871         * Makefile (libpthread-routines): Remove lowlevelcond and
7872         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
7873         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
7874         and pthread_cond_broadcast.
7875         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
7876         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
7877         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
7878         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
7879         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
7880         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
7881         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
7882         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
7883         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
7884         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
7885         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
7886         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
7887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
7888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
7889         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
7890         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
7891         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
7892         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
7893         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
7894         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
7895         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
7896         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
7897         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
7898         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
7899         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
7900         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
7901         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
7902         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
7903         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
7904         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
7905         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
7907         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
7908         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
7909         of the code is moved to ...
7910         * sysdeps/pthread/createthread.c: ...here.  New file.
7912 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
7914         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7915         (__new_sem_post): Clear %eax before returning.
7916         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7918         * Makefile (tests): Add tst-cleanup2.
7919         * tst-cleanup2.c: New file.
7921         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7922         Interpret first parameter correctly.
7924 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
7926         * Makefile (headers): Add bits/semaphore.h.
7928 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
7930         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7931         if not SHARED.
7933 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
7935         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7936         must be used and mapping failed.
7937         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7939         * Makefile (CFLAGS-pthread_self.os): Define this, not
7940         CFLAGS-pthread_self.c.
7942 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7944         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7945         lll_unlock_wake_cb.
7947         * Makefile (libpthread-routines): Add version.  Add rules to build
7948         version.os and banner.h.
7949         * version.c: New file.
7951 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
7953         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7954         the alias unconditional.
7955         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
7957 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
7959         * Makefile (CFLAGS-pthread_self.c): New definition.
7961 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7963         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7964         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7965         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7966         * init.c (__pthread_initialize_minimal_internal): Likewise.
7968 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
7970         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7972         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7973         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7974         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7975         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7976         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7977         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7979 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
7981         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7982         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7983         * tst-cancel-wrappers.sh: Remove all exceptions.
7985 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
7987         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7988         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
7990         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7991         Use __libc_pthread_functions array if SHARED.
7993         * pthreadP.h: Move pthread_cond_2_0_t definition to...
7994         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7996         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7997         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7998         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7999         __libc_ptf_call instead of __libc_maybe_call.
8000         (PTF): New #define.
8001         (__libc_cleanup_region_start): Wrap function name with PTF call.
8002         (__libc_cleanup_region_end): Likewise.
8003         (__libc_cleanup_end): Likewise.
8005         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8006         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8007         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8008         * pthreadP.h: Add prototypes.
8010         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8011         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8012         __pthread_rwlock_unlock aliases.
8013         * pthreadP.h: Add prototypes for new aliases.
8015         * pthreadP.h (struct pthead_functions): Moved to...
8016         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8017         * init.c (pthread_functions): Add initializers for new elements.
8019         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8020         __pthread_cleanup_pop_restore aliases.
8021         * pthreadP.h: Add prototypes.
8023         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8024         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8025         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8026         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8027         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8028         * pthreadP.h: Adjust prototypes and callers.
8030 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
8032         * Makefile (tests): Add tst-cancel7.
8033         (tst-cancel7-ARGS): New variable.
8034         * tst-cancel7.c: New file.
8036         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8037         around gcc defficiencies.
8038         * old_pthread_cond_signal.c: Likewise.
8039         * old_pthread_cond_timedwait.c: Likewise.
8040         * old_pthread_cond_wait.c: Likewise.
8042         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8044 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8046         * Makefile (tests): Add tst-cond7.
8047         * tst-cond7.c: New file.
8049         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8050         (condvar_cleanup): Get condvar address from the right place.
8052         * atomic.h: Correct definitions of atomic_full_barrier,
8053         atomic_read_barrier, atomic_write_barrier.
8055         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8056         race-free.
8057         * old_pthread_cond_signal.c: Likewise.
8058         * old_pthread_cond_timedwait.c: Likewise.
8059         * old_pthread_cond_wait.c: Likewise.
8061 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
8063         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8065 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8067         * pthreadP.h (pthread_cond_2_0_t): New type.
8068         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8069         Use new type for the 2.0 condvar function prototypes.
8070         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8071         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8072         parameter.
8073         * old_pthread_cond_destroy.c: Likewise.
8074         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
8075         * old_pthread_cond_signal.c: Likewise.
8076         * old_pthread_cond_timedwait.c: Likewise.
8077         * old_pthread_cond_wait.c: Likewise.
8079         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8080         (__pthread_cond_wait): Don't save cancellation mode and seq value
8081         in same location.
8083         * herrno.c (__h_errno_location): Don't define as weak.
8085 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8087         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8088         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8089         and pthread_cond_wait.
8090         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8091         Renamed to...
8092         (__pthread_cond_broadcast_2_0): ... this.
8093         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8094         Renamed to...
8095         (__pthread_cond_destroy_2_0): ... this.
8096         * old_pthread_cond_init.c (__old_pthread_cond_init):
8097         Renamed to...
8098         (__pthread_cond_init_2_0): ... this.
8099         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8100         Renamed to...
8101         (__pthread_cond_signal_2_0): ... this.
8102         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8103         Renamed to...
8104         (__pthread_cond_wait_2_0): ... this.
8105         * pthread_cond_destroy.c: Include shlib-compat.h.
8106         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8107         * pthread_cond_init.c: Include shlib-compat.h.
8108         (pthread_cond_init): Change strong_alias into versioned_symbol.
8109         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8110         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8111         fields.
8112         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8113         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8114         __pthread_cond_wait_2_0): New prototypes.
8115         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8116         __old_pthread_cond_init, __old_pthread_cond_signal,
8117         __old_pthread_cond_wait): Removed.
8118         * init.c: Include shlib-compat.h.
8119         (pthread_functions): Guard ptr___pthread_attr_init_2_0
8120         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8121         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8122         ptr___pthread_cond_*_2_0 fields.
8123         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8124         pthread_cond_*@GLIBC_2.0 compatibility symbols.
8126         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8127         LIBC_SIGACTION was not yet defined.
8128         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8129         [!defined LIBC_SIGACTION] (__sigaction): New function and
8130         libc_hidden_weak.
8131         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8132         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8134 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8136         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8138 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
8140         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8141         New, larger type definition.
8142         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8143         implementation.
8144         * Versions [libpthread]: Add definitions for new pthread_cond_*
8145         interfaces for version GLIBC_2.3.2.
8146         * pthread_cond_init.c: Update initialization for new type definition.
8147         * Makefile (libpthread-routines): Remove pthread_cond_wait,
8148         pthread_cond_timedwait, pthread_cond_signal, and
8149         pthread_cond_broadcast.  Add old_pthread_cond_init,
8150         old_pthread_cond_destroy, old_pthread_cond_wait,
8151         old_pthread_cond_timedwait, old_pthread_cond_signal, and
8152         old_pthread_cond_broadcast.
8153         * old_pthread_cond_broadcast.c: New file.
8154         * old_pthread_cond_destroy.c: New file.
8155         * old_pthread_cond_init.c: New file.
8156         * old_pthread_cond_signal.c: New file.
8157         * old_pthread_cond_timedwait.c: New file.
8158         * old_pthread_cond_wait.c: New file.
8159         * pthreadP.h: Add prototypes for the compatibility interfaces.
8161         * pthread_cond_destroy.c: Don't include <errno.h>.
8163 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
8165         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8166         unnecessary zero offset when addressing MUTEX.
8168 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8170         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8171         __register_atfork.
8172         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8173         for __register_atfork.
8175 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8177         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8178         instead of ASSEMBLER test macro.
8180         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8181         __libc_current_sigrtmax): Add libc_hidden_def.
8183         * sysdeps/pthread/list.h: Remove assert.h include.
8185 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8187         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8188         __pthread_initialize_minimal_internal not
8189         __pthread_initialize_minimal.
8191 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
8193         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8194         __pthread_initialize_minimal as hidden.
8196         * init.c (__pthread_initialize_minimal_internal): Don't mark as
8197         constructor.
8199 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8201         * Makefile ($(inst_libdir)/libpthread.so): Depend on
8202         $(common-objpfx)format.lds, include that into the output script.
8203         Fix comment.
8204         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8206 2002-12-28  Andreas Jaeger  <aj@suse.de>
8208         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8209         nsec resolution changes.
8210         (xstat64_conv): Likewise.
8211         (xstat32_conv): Likewise.
8212         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8213         struct kernel_stat.
8214         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
8215         structs stat and stat64.
8216         * time/time.h (__timespec_defined): Define for __USE_MISC.
8217         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8219 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
8221         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
8222         argument.
8223         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
8224         (pthread_exit): Use strong_alias to avoid warnings.
8225         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
8226         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
8227         ptr___pthread_attr_init_2_*.
8228         * init.c (pthread_functions): Adjust.
8230 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
8232         * forward.c: Make all functions available by default again.  It
8233         caused too much trouble.
8235         * pt-siglongjmp.c: Removed.
8237 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
8239         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
8240         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
8241         * sysdeps/i386/Makefile: New file.
8242         * sysdeps/i386/tcb-offsets.sym: New file.
8243         * sysdeps/pthread/tcb-offsets.h: New file.
8244         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8245         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
8247         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
8248         __register_atfork...
8249         (GLIBC_2.3.2): ...here.
8251 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
8253         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
8254         pthread_attr_setstackaddr with __attribute_deprecated__.
8256 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
8258         * pt-system.c (system): Remove cancellation handling.
8259         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
8260         cancellation routines.
8262 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
8264         * descr.h: Include <dl-sysdep.h>.
8265         (struct pthread): Move header.data.list to the back of the struct.
8266         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
8267         (MULTIPLE_THREADS_OFFSET): Adjust offset.
8268         (SYSINFO_OFFSEET): Likewise.
8270 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
8272         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
8273         Define.
8274         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
8275         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
8276         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
8277         (USE_DL_SYSINFO): Undef.
8279 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
8281         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
8282         $(common-objpfx)libc.so.
8283         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
8284         it is bigger than pipe buffer size even on arches with bigger
8285         page size.
8286         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
8288 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
8290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
8291         correct errno access for case that USE___THREAD is not defined.
8293 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
8295         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
8296         Patch by Marijn Ros <marijn@mad.scientist.com>.
8298 2002-12-22  Roland McGrath  <roland@redhat.com>
8300         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
8302 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
8304         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
8306 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
8308         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
8309         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
8310         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
8312         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
8313         of int $0x80.
8314         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8315         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
8316         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
8317         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8318         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8319         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
8320         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
8321         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8323         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
8324         sysenter.
8325         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8327         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
8329         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
8330         in new TCB.
8331         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
8332         that sysinfo is properly initialized.
8333         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
8334         to 1 only for ld.so.
8336         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
8337         RTLD_CORRECT_DYNAMIC_WEAK.
8339 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
8341         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
8342         Use return 0 as 6th argument to FORWARD4.
8343         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
8345 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
8347         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
8348         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
8349         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
8350         (INIT_SYSINFO): New #define.
8351         (TLS_TP_INIT): Use INIT_SYSINFO.
8352         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8353         At test to make sure SYSINFO_OFFSET value is correct.
8354         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
8356 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
8358         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
8359         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
8360         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
8361         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
8362         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
8363         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
8364         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
8366 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
8368         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
8369         macro instead of using int $0x80 directly.
8371         * sysdeps/pthread/bits/stdio-lock.h: New file.
8372         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
8373         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
8374         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
8375         * Makefile (routines): Add libc-lowlevelmutex.
8377         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
8378         __i686.get_pc_thunk.dx.
8380 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
8382         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
8383         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
8384         ($(objpfx)tst-cancel-wrappers.out): New rule.
8385         * tst-cancel-wrappers.sh: New test.
8386         * tst-locale1.c: Include signal.h.
8387         (uselocale): Test static linking of __libc_current_sigrt*.
8389 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
8391         * Makefile (tests): Add tst-cancel6.
8392         * tst-cancel6.c: New file
8394 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
8396         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
8397         Define meaningfully for assembler as well.
8398         * pthreadP.h (struct pthread_functions): Remove
8399         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
8400         and ptr_pthread_attr_init_2_1 fields.
8401         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
8402         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
8403         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
8404         (FORWARD3): Define using FORWARD4.
8405         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
8406         versions.
8407         * pt-system.c: Remove duplicate stdlib.h include.
8409 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
8411         * sem_init.c: Define sem_init@GLIBC_2.0.
8412         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
8413         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
8415         * flockfile.c: Moved to...
8416         * sysdeps/pthread/flockfile.c: ...here.  New file.
8417         * funlockfile.c: Moved to...
8418         * sysdeps/pthread/funlockfile.c: ...here.  New file.
8419         * ftrylockfile.c: Moved to...
8420         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
8422 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
8424         * libc-cancellation.c: Guard both function with
8425         #if !defined NOT_IN_libc.
8426         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
8427         automatically provided pthread wrappers.
8428         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
8429         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
8430         nor in libpthread.
8431         * pt-open.c: Removed.
8432         * pt-fcntl.c: Removed.
8433         * pt-fsync.c: Removed.
8434         * pt-lseek.c: Removed.
8435         * pt-msgrcv.c: Removed.
8436         * pt-msgsnd.c: Removed.
8437         * pt-msync.c: Removed.
8438         * pt-nanosleep.c: Removed.
8439         * pt-open64.c: Removed.
8440         * pt-pause.c: Removed.
8441         * pt-pread.c: Removed.
8442         * pt-pread64.c: Removed.
8443         * pt-pwrite.c: Removed.
8444         * pt-pwrite64.c: Removed.
8445         * pt-read.c: Removed.
8446         * pt-recv.c: Removed.
8447         * pt-recvfrom.c: Removed.
8448         * pt-recvmsg.c: Removed.
8449         * pt-send.c: Removed.
8450         * pt-sendto.c: Removed.
8451         * pt-sigtimedwait.c: Removed.
8452         * pt-sigwait.c: Removed.
8453         * pt-wait.c: Removed.
8454         * pt-waitpid.c: Removed.
8455         * pt-write.c: Removed.
8456         * pt-accept.c: Removed.
8457         * pt-close.c: Removed.
8458         * pt-connect.c: Removed.
8459         * pt-lseek64.c: Removed.
8460         * pt-sendmsg.c: Removed.
8461         * pt-tcdrain.c: Removed.
8463 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
8465         * init.c (__pthread_initialize_minimal_internal): Renamed from
8466         __pthread_initialize_minimal.  Make old name an alias.  This
8467         converts a normal relocation into a relative relocation.
8469         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
8471         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
8472         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
8473         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
8474         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
8475         pt-sigwaitinfo, pt-waitid, and pt-writev.
8476         * pt-creat.c: Removed.
8477         * pt-poll.c: Removed.
8478         * pt-pselect.c: Removed.
8479         * pt-readv.c: Removed.
8480         * pt-select.c: Removed.
8481         * pt-sigpause.c: Removed.
8482         * pt-sigsuspend.c: Removed.
8483         * pt-sigwaitinfo.c: Removed.
8484         * pt-waitid.c: Removed.
8485         * pt-writev.c: Removed.
8487         * init.c (pthread_functions): New variable.
8488         (__pthread_initialize_minimal): Pass pointer to pthread_functions
8489         (or NULL) to __libc_pthread_init.
8490         * forward.c: Rewrite to use __libc:pthread_functions array to get
8491         function addresses.
8492         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
8493         prototype.
8494         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8495         Take new parameter.  Copy content of variable pointed to by it
8496         to __libc_pthread_init.
8498         * pthreadP.h (struct pthread_functions): New type.
8499         (__libc_pthread_init): Declare.
8501         * pthread_attr_destroy.c: Add namespace protected alias.
8502         * pthread_attr_getdetachstate.c: Likewise.
8503         * pthread_attr_getinheritsched.c: Likewise.
8504         * pthread_attr_getschedparam.c: Likewise.
8505         * pthread_attr_getschedpolicy.c: Likewise.
8506         * pthread_attr_getscope.c: Likewise.
8507         * pthread_attr_setdetachstate.c: Likewise.
8508         * pthread_attr_setinheritsched.c: Likewise.
8509         * pthread_attr_setschedparam.c: Likewise.
8510         * pthread_attr_setschedpolicy.c: Likewise.
8511         * pthread_attr_setscope.c: Likewise.
8512         * pthread_cond_broadcast.c: Likewise.
8513         * pthread_cond_destroy.c: Likewise.
8514         * pthread_cond_init.c: Likewise.
8515         * pthread_cond_signal.c: Likewise.
8516         * pthread_cond_wait.c: Likewise.
8517         * pthread_condattr_destroy.c: Likewise.
8518         * pthread_condattr_init.c: Likewise.
8519         * pthread_equal.c: Likewise.
8520         * pthread_exit.c: Likewise.
8521         * pthread_getschedparam.c: Likewise.
8522         * pthread_self.c: Likewise.
8523         * pthread_setcancelstate.c: Likewise.
8524         * pthread_setschedparam.c: Likewise.
8525         * pthread_mutex_destroy.c: Likewise.
8526         * pthread_mutex_init.c: Likewise.
8527         * pthreadP.h: Add prototypes for the aliases.
8529         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
8530         multiple_threads member in correct TCB to 1.
8532         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
8533         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
8534         member of thread decriptor, otherwise return unconditionally 1.
8536 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
8538         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
8539         regular Linux version.  Remove file.
8540         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
8541         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
8542         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
8543         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
8544         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
8545         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
8546         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
8547         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
8548         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
8549         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
8550         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
8551         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
8552         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
8553         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
8554         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
8555         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
8556         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
8557         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
8558         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
8559         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
8560         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
8561         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
8562         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
8563         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
8564         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
8565         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
8566         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
8567         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
8568         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
8569         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
8571 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
8573         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
8574         * sysdeps/unix/sysv/linux/open.c: Removed.
8575         * sysdeps/unix/sysv/linux/fsync.c: Removed.
8576         * sysdeps/unix/sysv/linux/lseek.c: Removed.
8577         * sysdeps/unix/sysv/linux/msync.c: Removed.
8578         * sysdeps/unix/sysv/linux/read.c: Removed.
8579         * sysdeps/unix/sysv/linux/close.c: Removed.
8580         * sysdeps/unix/sysv/linux/creat.c: Removed.
8581         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
8582         * sysdeps/unix/sysv/linux/pause.c: Removed.
8583         * sysdeps/unix/sysv/linux/select.c: Removed.
8584         * sysdeps/unix/sysv/linux/write.c: Removed.
8586 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
8588         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
8589         element in TCB to see whether locking is needed.
8591         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
8592         MULTIPLE_THREADS_OFFSET value is correct.
8594         * sysdeps/unix/sysv/linux/close.c: New file.
8595         * sysdeps/unix/sysv/linux/connect.S: New file.
8596         * sysdeps/unix/sysv/linux/creat.c: New file.
8597         * sysdeps/unix/sysv/linux/fsync.c: New file.
8598         * sysdeps/unix/sysv/linux/llseek.c: New file.
8599         * sysdeps/unix/sysv/linux/lseek.c: New file.
8600         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
8601         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
8602         * sysdeps/unix/sysv/linux/msync.c: New file.
8603         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
8604         * sysdeps/unix/sysv/linux/open.c: New file.
8605         * sysdeps/unix/sysv/linux/open64.c: New file.
8606         * sysdeps/unix/sysv/linux/pause.c: New file.
8607         * sysdeps/unix/sysv/linux/poll.c: New file.
8608         * sysdeps/unix/sysv/linux/pread.c: New file.
8609         * sysdeps/unix/sysv/linux/pread64.c: New file.
8610         * sysdeps/unix/sysv/linux/pselect.c: New file.
8611         * sysdeps/unix/sysv/linux/pwrite.c: New file.
8612         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
8613         * sysdeps/unix/sysv/linux/readv.c: New file.
8614         * sysdeps/unix/sysv/linux/recv.S: New file.
8615         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
8616         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
8617         * sysdeps/unix/sysv/linux/select.c: New file.
8618         * sysdeps/unix/sysv/linux/send.S: New file.
8619         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
8620         * sysdeps/unix/sysv/linux/sendto.S: New file.
8621         * sysdeps/unix/sysv/linux/sigpause.c: New file.
8622         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
8623         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8624         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8625         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8626         * sysdeps/unix/sysv/linux/system.c: New file.
8627         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
8628         * sysdeps/unix/sysv/linux/wait.c: New file.
8629         * sysdeps/unix/sysv/linux/waitid.c: New file.
8630         * sysdeps/unix/sysv/linux/waitpid.c: New file.
8631         * sysdeps/unix/sysv/linux/writev.c: New file.
8632         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
8634         * pt-readv.c: Fix comment.
8636 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
8638         * tst-cleanup1.c: Include stdlib.h.
8640         * tst-cancel5.c: New test.
8641         * Makefile (tests): Add tst-cancel5.
8642         (tst-cancel5): Link against libc.so libpthread.so in that order.
8644 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
8646         * forward.c (test_loaded): Prevent recursive calls.
8648         * Makefile (routines): Add libc-cancellation.
8649         * libc-cancellation.c: New file.
8650         * descr.h (struct pthread): Add multiple_threads field.
8651         * allocatestack.c (allocate_stack): Initialize multiple_header field of
8652         new thread descriptor to 1.
8653         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
8654         Initialize multiple_thread field after successful thread creation.
8655         * cancellation.c (__do_cancel): Move to pthreadP.h.
8656         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
8657         (__pthread_disable_asynccancel): Add internal_function attribute.
8658         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
8659         * pthread_setcancelstate.c: Likewise.
8660         * pthread_setcanceltype.c: Likewise.
8661         * pthread_exit.c: Likewise.
8662         * pthreadP.h (CANCELLATION_P): Likewise.
8663         (__do_cancel): Define as static inline.
8664         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
8665         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
8666         declarations.
8667         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
8668         fields.  Define MULTIPLE_THREADS_OFFSET.
8669         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
8670         declaration.
8671         * sysdeps/unix/sysv/linux/accept.S: New file.
8672         * sysdeps/unix/sysv/linux/read.c: New file.
8673         * sysdeps/unix/sysv/linux/write.c: New file.
8674         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
8675         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
8676         initialization of __libc_locking_needed.
8677         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
8678         __libc_locking_needed, use multiple_threads field in TCB.
8679         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8681 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8683         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
8684         version.
8685         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
8687         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
8688         access to __libc_locking_needed for PIC.
8690 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
8692         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
8693         declare for libc.so.
8694         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
8695         expression.
8696         (__libc_lock_lock): Put into statement expression.
8697         (__libc_lock_unlock): Remove trailing semicolon.
8698         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
8700 2002-12-12  Roland McGrath  <roland@redhat.com>
8702         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
8703         "m" constraint to refer to __libc_locking_needed.  Declare it here.
8705 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
8707         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
8708         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
8709         Initialize __libc_locking_needed.
8710         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
8711         instead of __register_pthread_fork_handler.
8712         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
8713         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
8714         fork-gen with libc_pthread_init.
8715         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
8716         of __register_pthread_fork_handler.
8717         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
8718         of __register_pthread_fork_handler.
8719         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
8720         __libc_locking_needed to determine whether lock prefix can be avoided.
8721         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8723 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
8725         * Makefile (tests): Add tst-cleanup1.
8726         * tst-cleanup1.c: New file.
8727         * cancellation.c (__cleanup_thread): Removed.
8728         (__do_cancel): Remove call to __cleanup_thread.
8729         * pthreadP.h: Remove __cleanup_thread prorotype.
8731         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8732         Remember function and argument even if cancellation handler
8733         function is not available.
8734         (__libc_cleanup_region_end): Execute registered function directly if
8735         pthread functions are not available.
8736         (__libc_cleanup_end): Likewise.
8738         * init.c (__pthread_initialize_minimal): Fix initialization in
8739         static lib by preventing gcc from being too clever.
8741 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
8743         * init.c (__pthread_initialize_minimal): Remove unneccesary
8744         sigaddset call.
8746         * Makefile (tests): We can run tst-locale2 now.
8748 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
8750         * Versions: Remove duplicated sigwait entry.
8752 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
8754         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
8755         inside libpthread.
8757         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
8759         * pthreadP.h: Declare __pthread_enable_asynccancel and
8760         __pthread_disable_asynccancel.
8761         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
8762         (CANCEL_RESET): Use __pthread_disable_asynccancel.
8763         * cancellation.c (__pthread_enable_asynccancel): New function.
8764         (__pthread_disable_asynccancel): New function.
8765         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
8766         * pt-close.c: Likewise.
8767         * pt-connect.c: Likewise.
8768         * pt-creat.c: Likewise.
8769         * pt-fcntl.c: Likewise.
8770         * pt-fsync.c: Likewise.
8771         * pt-lseek.c: Likewise.
8772         * pt-lseek64.c: Likewise.
8773         * pt-msgrcv.c: Likewise.
8774         * pt-msgsnd.c: Likewise.
8775         * pt-msync.c: Likewise.
8776         * pt-nanosleep.c: Likewise.
8777         * pt-open.c: Likewise.
8778         * pt-open64.c: Likewise.
8779         * pt-pause.c: Likewise.
8780         * pt-poll.c: Likewise.
8781         * pt-pread.c: Likewise.
8782         * pt-pread64.c: Likewise.
8783         * pt-pselect.c: Likewise.
8784         * pt-pwrite.c: Likewise.
8785         * pt-pwrite64.c: Likewise.
8786         * pt-read.c: Likewise.
8787         * pt-readv.c: Likewise.
8788         * pt-recv.c: Likewise.
8789         * pt-recvfrom.c: Likewise.
8790         * pt-recvmsg.c: Likewise.
8791         * pt-select.c: Likewise.
8792         * pt-send.c: Likewise.
8793         * pt-sendmsg.c: Likewise.
8794         * pt-sendto.c: Likewise.
8795         * pt-sigpause.c: Likewise.
8796         * pt-sigsuspend.c: Likewise.
8797         * pt-sigtimedwait.c: Likewise.
8798         * pt-sigwait.c: Likewise.
8799         * pt-sigwaitinfo.c: Likewise.
8800         * pt-system.c: Likewise.
8801         * pt-tcdrain.c: Likewise.
8802         * pt-wait.c: Likewise.
8803         * pt-waitid.c: Likewise.
8804         * pt-waitpid.c: Likewise.
8805         * pt-write.c: Likewise.
8806         * pt-writev.c: Likewise.
8807         * pthread_join.c: Likewise.
8808         * pthread_timedjoin.c: Likewise.
8810         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
8811         (__xpg_sigpause): New function.
8812         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
8814 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
8816         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
8818         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
8819         _GI_pthread_cleanup_pop to pthreadP.h.
8821         * ftrylockfile.c: Use _IO_lock_trylock instead of
8822         pthread_mutex_trylock.
8824         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
8825         (CANCEL_RESET): Likewise.
8826         (__pthread_setcanceltype_): Declare.
8827         (__pthread_mutex_lock_internal): Declare.
8828         (__pthread_mutex_unlock_internal): Declare.
8829         (__pthread_once_internal): Declare.
8830         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
8831         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
8833         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
8834         and pthread_mutex_unlock.
8835         * pthread_cond_wait.c: Likewise.
8836         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
8837         * pthread_mutex_unlock.c: Likewise.
8839         * pthread_setcanceltype.c: Add additional alias
8840         __pthread_setcanceltype.
8842         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
8843         * sem_open.c (sem_open): Likewise.
8844         Use __libc_open, __libc_write, and __libc_close instead of
8845         open, write, and close respectively.
8847         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
8848         Rewrite as statement expression since it must return a value.
8850         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
8851         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
8852         __pthread_kill.
8854         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
8855         alias __pthread_once_internal.
8857         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
8859 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
8861         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
8862         * tst-stdio1.c: New file.
8863         * tst-stdio2.c: New file.
8865         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
8867         * Makefile (tests): Comment out tst-locale2 for now.
8868         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
8870         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
8871         -D_IO_MTSAFE_IO.
8872         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
8873         Use _IO_lock_init instead of explicit assignment.
8875         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
8876         Define __libc_lock_* and __libc_lock_recursive macros with
8877         lowlevellock macros, not pthread mutexes.
8879         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
8880         of pthread_mutex_lock.
8881         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
8882         instead of pthread_mutex_unlock.
8884 2002-12-06  Roland McGrath  <roland@redhat.com>
8886         * allocatestack.c (__stack_user): Use uninitialized defn.
8887         * init.c (__pthread_initialize_minimal): Initialize it here.
8889 2002-12-05  Roland McGrath  <roland@redhat.com>
8891         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
8892         string.
8893         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
8895         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
8896         missing & here too.
8898 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
8900         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8901         lowlevellock.
8902         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
8903         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
8904         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
8905         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
8906         for __libc_lock_* macros.
8907         * Makefile (routines): Add libc-lowlevellock.
8909 2002-10-09  Roland McGrath  <roland@redhat.com>
8911         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
8912         Under [__PIC__], call the function via the pointer fetched for
8913         comparison rather than a call by name that uses the PLT.
8914         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8915         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8916         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8917         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8918         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8920 2002-12-04  Roland McGrath  <roland@redhat.com>
8922         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8924         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8925         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8927         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8929 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8931         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8932         a completely opaque, non-integer type.
8933         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8935 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
8937         * sysdeps/i386/tls.h: Include stdlib.h.
8938         * sysdeps/x86_64/tls.h: Likewise.
8940 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
8942         * Makefile (tests): Add tst-locale2.
8943         (tests-static): Likewise.
8944         * tst-locale2.c: New file.
8946         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8947         volatile and add memory clobbers to lock operations.
8949 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
8951         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8952         * sysdeps/i386/i486/bits/atomic.h: New file.
8953         * sysdeps/i386/i586/bits/atomic.h: New file.
8954         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8955         include i486 version.
8956         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8957         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8958         Patch by Marijn Ros <marijn@mad.scientist.com>.
8960         * allocatestack.c (get_cached_stack): Don't crash if we first
8961         found a stack with a larger size then needed.
8962         Reported by Hui Huang <hui.huang@sun.com>.
8964         * Makefile (tests): Add tst-sysconf.
8965         * tst-sysconf.c: New file.
8967         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8968         PTHREAD_THREADS_MAX.
8970 2002-12-02  Roland McGrath  <roland@redhat.com>
8972         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8973         Declare using hidden_proto instead of attribute_hidden, so there are
8974         non-.hidden static symbols for gdb to find.
8975         (__pthread_keys): Likewise.
8976         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8977         * allocatestack.c (__stack_user): Likewise.
8978         * pthread_create.c (__pthread_keys): Likewise.
8979         (__nptl_threads_events, __nptl_last_event): Make these static instead
8980         of hidden.
8981         * pthread_key_create.c (__pthread_pthread_keys_max,
8982         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8984 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
8986         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
8987         statically.
8988         * tst-locale1.c: New file.
8990         * pthread_cond_timedwait.c: Include <stdlib.h>.
8992         * Makefile (tests): Add tst-fork2 and tst-fork3.
8993         * tst-fork2.c: New file.
8994         * tst-fork3.c: New file.
8996 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
8998         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9000         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9001         require it to 200112L.
9003         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9004         instruction only if HAVE_CMOV is defined.
9005         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9007         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9009         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9011         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9013         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9015 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9017         * sysdeps/x86_64/bits/atomic.h: New file.
9019         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9020         16-bit operations.
9022         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9023         possible since gettid cannot fail.
9025         * sysdeps/x86_64/pthreaddef.h: New file.
9027         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9029         * sysdeps/x86_64/pthread_spin_init.c: New file.
9030         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9031         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9032         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9034         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9035         Add missing lock prefix.  Minute optimization.
9037         * tst-spin2.c (main): Also check successful trylock call.
9039         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9040         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
9042         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9043         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
9045         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
9046         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9047         value in case of an error.  Add support for INTERNAL_SYSCALL.
9049         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9050         value in case of an error.
9052         * sysdeps/x86_64/tls.h: New file.
9054 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9056         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
9057         takes the array member name and the index as parameters.
9058         (THREAD_SETMEM_NC): Likewise.
9059         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9060         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9061         interfaces.
9063         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9064         to decide which code to use.
9065         (THREAD_SETMEM_NC): Likewise.
9067         * allocatestack.c (queue_stack): Don't remove stack from list here.
9068         Do it in the caller.  Correct condition to prematurely terminate
9069         loop to free stacks.
9070         (__deallocate_stack): Remove stack from list here.
9072 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9074         * Makefile (tests): Add tst-stack1.
9075         * tst-stack1.c: New file.
9077         * allocatestack.c (allocate_stack): Initialize the TCB on a user
9078         provided stack.
9080         * pthread_attr_getstack.c: Return bottom of the thread area.
9082 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
9084         * Makefile (libpthread-routines): Add pt-allocrtsig and
9085         pthread_kill_other_threads.
9086         * pt-allocrtsig.c: New file.
9087         * pthread_kill_other_threads.c: New file.
9088         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9089         all three functions.
9090         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9091         allocrtsig.
9092         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9093         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9094         and __libc_allocate_rtsig_private.
9095         * Versions (libpthread): Export pthread_kill_other_threads_np,
9096         __libc_current_sigrtmin, and __libc_current_sigrtmax.
9098 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
9100         * allocatestack.c (allocate_stack): stackaddr in attribute points to
9101         the end of the stack.  Adjust computations.
9102         When mprotect call fails dequeue stack and free it.
9103         * pthread_attr_setstack.c: Store top of the stack in stackaddr
9104         attribute.
9105         * pthread_getattr_np.c: Likewise.
9107         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9108         surprises.
9110 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
9112         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9113         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9115 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
9117         * pthread_getspecific.c: Optimize access to first 2nd-level array.
9118         * pthread_setspecific.c: Likewise.
9120 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
9122         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9123         definitions.  Get them from the official place.
9124         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9126         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9127         Use new CLONE_ flags in clone() calls.
9129         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9130         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9132         * Versions: Add pthread_* functions for libc.
9133         * forward.c: New file.
9135         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9136         errno-loc.
9137         * herrno.c: New file.
9138         * res.c: New file.
9140         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9141         sem_trywait, and sem_timedwait.  Add herrno and res.
9142         * sem_init.c: Don't initialize lock and waiters members.
9143         * sem_open.c: Likewise.
9144         * sem_post.c: Removed.
9145         * sem_wait.c: Removed.
9146         * sem_trywait.c: Removed.
9147         * sem_timedwait.c: Removed.
9148         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9149         Includes full implementations of sem_post, sem_wait, sem_trywait,
9150         and sem_timedwait.
9151         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9152         for new implementation.
9153         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9154         and waiters fields.
9156         * tst-sem3.c: Improve error message.
9157         * tst-signal3.c: Likewise.
9159         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9160         to tell the kernel about the termination futex and to initialize tid
9161         member.  Don't initialize main_thread.
9162         * descr.h (struct pthread): Remove main_thread member.
9163         * cancelllation.c (__do_cancel): Remove code handling main thread.
9164         The main thread is not special anymore.
9166         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
9167         size of the stacks to stack_cache_actsize.
9169         * pt-readv.c: Add missing "defined".
9170         * pt-sigwait.c: Likewise.
9171         * pt-writev.c: Likewise.
9173 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
9175         * Versions: Export __connect from libpthread.
9176         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9178         * Makefile (libpthread-routines): Add pt-raise.
9179         * sysdeps/unix/sysv/linux/raise.c: New file.
9180         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9181         * sysdeps/generic/pt-raise.c: New file.
9183         * pthread_cond_init.c: Initialize all data elements of the condvar
9184         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9186         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9187         * pthread_create.c: Likewise.
9189         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9190         * tst-key1.c: New file.
9191         * tst-key2.c: New file.
9192         * tst-key3.c: New file.
9194         * Versions: Export pthread_detach for version GLIBC_2.0.
9195         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9197 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
9199         * pthread_key_create.c: Terminate search after an unused key was found.
9200         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9202         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9203         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9205 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
9207         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9208         dynamic lookup for errno in PIC.
9210         * allocatestack.c (get_cached_stack): Rearrange code slightly to
9211         release the stack lock as soon as possible.
9212         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9213         the static TLS block.
9214         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
9216         * cancellation.c: Renamed from cancelation.c.
9217         * Makefile: Adjust accordingly.
9218         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
9219         * cleanup_defer.c: Use CANCELLATION_P.
9220         * pthread_testcancel.c: Likewise.
9221         * descr.h: Fix spelling in comments.
9222         * init.c: Likewise.
9223         * pthread_getattr_np.c: Likewise.
9224         * pthread_getschedparam.c: Likewise.
9225         * pthread_setschedparam.c: Likewise.
9226         * Versions: Likewise.
9228         * pt-pselect.c: New file.
9229         * Makefile (libpthread-routines): Add pt-pselect.
9230         * Versions: Add pselect.
9232         * tst-cancel4.c: New file.
9233         * Makefile (tests): Add tst-cancel4.
9235 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
9237         * pthread_mutex_lock.c: Always record lock ownership.
9238         * pthread_mutex_timedlock.c: Likewise.
9239         * pthread_mutex_trylock.c: Likewise.
9241         * pt-readv.c: New file.
9242         * pt-writev.c: New file.
9243         * pt-creat.c: New file.
9244         * pt-msgrcv.c: New file.
9245         * pt-msgsnd.c: New file.
9246         * pt-poll.c: New file.
9247         * pt-select.c: New file.
9248         * pt-sigpause.c: New file.
9249         * pt-sigsuspend.c: New file.
9250         * pt-sigwait.c: New file.
9251         * pt-sigwaitinfo.c: New file.
9252         * pt-waitid.c: New file.
9253         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
9254         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
9255         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
9256         * Versions: Add all the new functions.
9258         * tst-exit1.c: New file.
9259         * Makefile (tests): Add tst-exit1.
9261         * sem_timedwait.c: Minor optimization for more optimal fastpath.
9263 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
9265         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
9267         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
9268         call.  pthread_join is an official cancellation point.
9269         * pthread_timedjoin.c: Likewise.
9271         * pthread_cond_wait.c: Revert order in which internal lock are dropped
9272         and the condvar's mutex are retrieved.
9273         * pthread_cond_timedwait.c: Likewise.
9274         Reported by dice@saros.East.Sun.COM.
9276 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
9278         * pthreadP.h: Cut out all type definitions and move them...
9279         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
9280         * pthreadP.h: Include <internaltypes.h>.
9282         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
9283         performance tweaks.
9285         * sem_trywait.c: Shuffle #includes around to get right order.
9286         * sem_timedwait.c: Likewise.
9287         * sem_post.c: Likewise.
9288         * sem_wait.c: Likewise.
9290         * nptl 0.3 released.
9292         * Makefile (tests): Add tst-signal3.
9293         * tst-signal3.c: New file.
9295 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
9297         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
9298         the asms modify the sem object.
9299         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
9301         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
9302         the actual members.
9303         * pthreadP.h (struct sem): New type.  Actual semaphore type.
9304         * semaphoreP.h: Include pthreadP.h.
9305         * sem_getvalue.c: Adjust to sem_t change.
9306         * sem_init.c: Likewise.
9307         * sem_open.c: Likewise.
9308         * sem_post.c: Likewise.
9309         * sem_timedwait.c: Likewise.
9310         * sem_trywait.c: Likewise.
9311         * sem_wait.c: Likewise.
9313 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
9315         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
9316         * tst-basic2.c: New file.
9317         * tst-exec1.c: New file.
9318         * tst-exec2.c: New file.
9319         * tst-exec3.c: New file.
9321         * tst-fork1.c: Remove extra */.
9323         * nptl 0.2 released.  The API for IA-32 is complete.