Updated to fedora-glibc-20070804T2027
[glibc.git] / nptl / ChangeLog
blob04473b031c3068f201dc06d628f843f90e40ebef
1 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
4         definitions for private futexes.
5         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
6         kernel-features.h and lowlevellock.h.  Use private futexes if
7         they are available.
8         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
9         (__lll_mutex_lock_wait): Rename to
10         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
11         (__lll_mutex_timedlock_wait): Rename to ...
12         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
13         Don't compile in for libc.so.
14         (__lll_mutex_unlock_wake): Rename to ...
15         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
16         (__lll_timedwait_tid): Use __NR_gettimeofday.
17         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
18         the header from assembler.  Renamed all lll_mutex_* resp.
19         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
20         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
21         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
22         Define.
23         (__lll_lock_wait_private): Add prototype.
24         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
25         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
26         __lll_unlock_wake): Likewise.
27         (lll_lock): Add private argument.  Call __lll_lock_wait_private
28         if private is constant LLL_PRIVATE.
29         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
30         lll_timedlock, lll_robust_timedlock): Add private argument.
31         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
32         if private is constant LLL_PRIVATE.
33         (lll_robust_unlock, lll_robust_dead): Add private argument.
34         (lll_lock_t): Remove.
35         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
36         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
37         lll_cond_wake, lll_cond_broadcast): Remove.
38         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
39         kernel-features.h and lowlevellock.h.
40         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
41         (LOAD_FUTEX_WAIT): Define.
42         (__lll_robust_mutex_lock_wait): Rename to ...
43         (__lll_robust_lock_wait): ... this.  Add private argument.
44         Use LOAD_FUTEX_WAIT macro.
45         (__lll_robust_mutex_timedlock_wait): Rename to ...
46         (__lll_robust_timedlock_wait): ... this.    Add private argument.
47         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
48         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
49         lowlevellock.h.
50         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
51         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
52         __lll_mutex_{lock,unlock}_*.
53         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
54         lowlevellock.h and pthread-errnos.h.
55         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
56         FUTEX_CMP_REQUEUE, EINVAL): Remove.
57         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
58         __lll_mutex_{lock,unlock}_*.
59         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
60         lowlevellock.h and pthread-errnos.h.
61         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
62         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
63         __lll_mutex_{lock,unlock}_*.
64         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
65         lowlevellock.h.
66         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
67         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
68         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
69         (__condvar_tw_cleanup): Likewise.
70         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
71         lowlevellock.h.
72         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
73         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
74         __lll_mutex_{lock,unlock}_*.
75         ( __condvar_w_cleanup): Likewise.
76         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
77         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
78         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
79         lowlevellock.h.
80         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
81         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
82         __lll_mutex_{lock,unlock}_*.
83         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
84         lowlevellock.h.
85         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
86         FUTEX_PRIVATE_FLAG): Remove.
87         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
88         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
89         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
90         lowlevellock.h.
91         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
92         FUTEX_PRIVATE_FLAG): Remove.
93         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
94         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
95         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
96         lowlevellock.h.
97         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
98         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
99         __lll_mutex_{lock,unlock}_*.
100         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
101         lowlevellock.h.
102         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
103         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
104         __lll_mutex_{lock,unlock}_*.
105         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
106         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
107         (__new_sem_post): Use standard initial exec code sequences.
108         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
109         lowlevellock.h.
110         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
111         FUTEX_PRIVATE_FLAG): Remove.
112         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
113         exec code sequences.
114         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
115         (__new_sem_trywait): Use standard initial exec code sequences.
116         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
117         (__new_sem_wait): Use standard initial exec code sequences.
119 2007-07-31  Anton Blanchard  <anton@samba.org>
121         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
122         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
123         atomic_full_barrier.
125 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
127         * allocatestack.c (stack_cache_lock): Change type to int.
128         (get_cached_stack, allocate_stack, __deallocate_stack,
129         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
130         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
131         as second argument to lll_lock and lll_unlock macros on
132         stack_cache_lock.
133         * pthread_create.c (__find_in_stack_list): Likewise.
134         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
135         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
136         as second argument.
137         * descr.h (struct pthread): Change lock and setxid_futex field
138         type to int.
139         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
140         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
141         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
142         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
143         Likewise.
144         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
145         * pthread_cond_init.c (__pthread_cond_init): Likewise.
146         * pthreadP.h (__attr_list_lock): Change type to int.
147         * pthread_attr_init.c (__attr_list_lock): Likewise.
148         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
149         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
150         lll_{,un}lock.
151         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
152         also for lll_futex_{wake,wait}.
153         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
154         a pointer to const.
155         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
156         LLL_SHARED as second argument to lll_{,un}lock.
157         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
158         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
159         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
160         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
161         Likewise.
162         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
163         as second argument to lll_{,un}lock macros on pd->lock.
164         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
165         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
166         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
167         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
168         Likewise.
169         * sysdeps/pthread/createthread.c (do_clone, create_thread):
170         Likewise.
171         * pthread_once.c (once_lock): Change type to int.
172         (__pthread_once): Pass LLL_PRIVATE as second argument to
173         lll_{,un}lock macros on once_lock.
174         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
175         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
176         rwlock->__data.__shared as second argument to them and similarly
177         for lll_futex_w*.
178         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
179         Likewise.
180         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
181         Likewise.
182         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
183         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
184         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
185         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
186         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
187         to lll_{,un}lock macros on __sem_mappings_lock.
188         * sem_open.c (check_add_mapping): Likewise.
189         (__sem_mappings_lock): Change type to int.
190         * semaphoreP.h (__sem_mappings_lock): Likewise.
191         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
192         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
193         instead of lll_*mutex_*, pass LLL_SHARED as last
194         argument.
195         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
196         pass LLL_SHARED as last argument.
197         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
198         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
199         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
200         pass LLL_SHARED as last argument.
201         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
202         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
203         LLL_SHARED as last argument.
204         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
205         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
206         Similarly.
207         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
208         __libc_lock_lock_recursive, __libc_lock_unlock,
209         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
210         argument to lll_{,un}lock.
211         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
212         _IO_lock_unlock): Likewise.
213         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
214         compound literal.
215         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
216         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
217         __fork_lock.
218         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
219         free_mem): Likewise.
220         (__fork_lock): Change type to int.
221         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
222         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
223         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
224         lll_futex_wake.
225         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
226         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
227         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
228         New function.
229         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
230         pass it through to lll_futex_*wait, only compile in when
231         IS_IN_libpthread.
232         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
233         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
234         argument and pass it through to lll_futex_*wait.
235         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
236         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
237         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
238         inline functions to __lll_* resp. __lll_robust_*.
239         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
240         (lll_mutex_dead): Add private argument.
241         (__lll_lock_wait_private): New prototype.
242         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
243         __lll_robust_lock_timedwait): Add private argument to prototypes.
244         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
245         call __lll_lock_wait_private, otherwise pass private to
246         __lll_lock_wait.
247         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
248         __lll_robust_timedlock): Add private argument, pass it to
249         __lll_*wait functions.
250         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
251         call __lll_unlock_wake_private, otherwise pass private to
252         __lll_unlock_wake.
253         (__lll_robust_unlock): Add private argument, pass it to
254         __lll_robust_unlock_wake.
255         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
256         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
257         argument, pass it through to __lll_* inline function.
258         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
259         (lll_lock_t): Remove.
260         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
261         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
262         lll_cond_wake, lll_cond_broadcast): Remove.
263         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
264         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
265         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
266         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
267         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
268         the header from assembler.  Renamed all lll_mutex_* resp.
269         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
270         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
271         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
272         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
273         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
274         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
275         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
276         Remove prototype.
277         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
278         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
279         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
280         (lll_trylock): Likewise, use __lll_trylock_asm, pass
281         MULTIPLE_THREADS_OFFSET as another asm operand.
282         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
283         MULTIPLE_THREADS_OFFSET as last asm operand, call
284         __lll_lock_wait_private if private is constant LLL_PRIVATE,
285         otherwise pass private as another argument to __lll_lock_wait.
286         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
287         lll_timedlock, lll_robust_timedlock): Add private argument, pass
288         private as another argument to __lll_*lock_wait call.
289         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
290         MULTIPLE_THREADS_OFFSET as another asm operand, call
291         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
292         otherwise pass private as another argument to __lll_unlock_wake.
293         (lll_robust_unlock): Add private argument, pass private as another
294         argument to __lll_unlock_wake.
295         (lll_robust_dead): Add private argument, use __lll_private_flag
296         macro.
297         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
298         LLL_MUTEX_LOCK_INITIALIZER.
299         (lll_lock_t): Remove.
300         (LLL_LOCK_INITIALIZER_WAITERS): Define.
301         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
302         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
303         lll_cond_wake, lll_cond_broadcast): Remove.
304         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
305         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
306         2007-05-2{3,9} changes.
307         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
308         kernel-features.h and lowlevellock.h.
309         (LOAD_PRIVATE_FUTEX_WAIT): Define.
310         (LOAD_FUTEX_WAIT): Rewritten.
311         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
312         define.
313         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
314         (__lll_mutex_lock_wait): Rename to ...
315         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
316         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
317         (__lll_mutex_timedlock_wait): Rename to ...
318         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
319         contains private argument.  Don't compile in for libc.so.
320         (__lll_mutex_unlock_wake): Rename to ...
321         (__lll_unlock_wake): ... this.  %ecx contains private argument.
322         Don't compile in for libc.so.
323         (__lll_timedwait_tid): Use __NR_gettimeofday.
324         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
325         kernel-features.h and lowlevellock.h.
326         (LOAD_FUTEX_WAIT): Define.
327         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
328         define.
329         (__lll_robust_mutex_lock_wait): Rename to ...
330         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
331         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
332         macro.
333         (__lll_robust_mutex_timedlock_wait): Rename to ...
334         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
335         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
336         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
337         lowlevellock.h.
338         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
339         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
340         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
341         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
342         to __lll_lock_wait in %edx.
343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
344         Include lowlevellock.h and pthread-errnos.h.
345         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
346         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
347         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
348         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
349         pass LLL_SHARED in %ecx to both __lll_lock_wait and
350         __lll_unlock_wake.
351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
352         Include lowlevellock.h and pthread-errnos.h.
353         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
354         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
355         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
356         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
357         pass LLL_SHARED in %ecx to both __lll_lock_wait and
358         __lll_unlock_wake.
359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
360         Include lowlevellock.h.
361         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
362         Don't define.
363         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
364         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
365         pass LLL_SHARED in %ecx to both __lll_lock_wait and
366         __lll_unlock_wake.  Use __NR_gettimeofday.
367         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
368         Include lowlevellock.h.
369         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
370         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
371         to __lll_*, pass cond_lock address in %edx rather than %ecx to
372         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
373         and __lll_unlock_wake.
374         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
375         Include lowlevellock.h.
376         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
377         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
378         MUTEX(%ebx) address in %edx rather than %ecx to
379         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
380         and __lll_unlock_wake.  Move return value from %ecx to %edx
381         register.
382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
383         Include lowlevellock.h.
384         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
385         Don't define.
386         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
387         MUTEX(%ebp) address in %edx rather than %ecx to
388         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
389         and __lll_unlock_wake.  Move return value from %ecx to %edx
390         register.  Use __NR_gettimeofday.
391         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
392         Include lowlevellock.h.
393         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
394         Don't define.
395         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
396         MUTEX(%ebp) address in %edx rather than %ecx to
397         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
398         and __lll_unlock_wake.  Move return value from %ecx to %edx
399         register.  Use __NR_gettimeofday.
400         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
401         Include lowlevellock.h.
402         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
403         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
404         MUTEX(%edi) address in %edx rather than %ecx to
405         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
406         and __lll_unlock_wake.
407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
408         Include lowlevellock.h.
409         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
410         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
411         MUTEX(%ebx) address in %edx rather than %ecx to
412         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
413         and __lll_unlock_wake.  Move return value from %ecx to %edx
414         register.
415         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
416         lowlevellock.h.
417         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
418         define.
419         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
420         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
421         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
422         lowlevellock.h.
423         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
424         (sem_timedwait): Use __NR_gettimeofday.
425         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
426         lowlevellock.h.
427         (LOCK): Don't define.
428         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
429         lowlevellock.h.
430         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
431         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
432         are waiters.
433         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
434         2007-05-2{3,9} changes.
435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
436         kernel-features.h and lowlevellock.h.
437         (LOAD_PRIVATE_FUTEX_WAIT): Define.
438         (LOAD_FUTEX_WAIT): Rewritten.
439         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
440         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
441         (__lll_mutex_lock_wait): Rename to ...
442         (__lll_lock_wait): ... this.  %esi is now private argument.
443         Don't compile in for libc.so.
444         (__lll_mutex_timedlock_wait): Rename to ...
445         (__lll_timedlock_wait): ... this.  %esi contains private argument.
446         Don't compile in for libc.so.
447         (__lll_mutex_unlock_wake): Rename to ...
448         (__lll_unlock_wake): ... this.  %esi contains private argument.
449         Don't compile in for libc.so.
450         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
451         kernel-features.h and lowlevellock.h.
452         (LOAD_FUTEX_WAIT): Define.
453         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
454         (__lll_robust_mutex_lock_wait): Rename to ...
455         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
456         Use LOAD_FUTEX_WAIT macro.
457         (__lll_robust_mutex_timedlock_wait): Rename to ...
458         (__lll_robust_timedlock_wait): ... this. %esi argument contains
459         private, use LOAD_FUTEX_WAIT macro.
460         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
461         lowlevellock.h.
462         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
463         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
464         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
465         __lll_lock_wait and __lll_unlock_wake.
466         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
467         Include lowlevellock.h and pthread-errnos.h.
468         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
469         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
470         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
471         pass LLL_SHARED in %esi to both __lll_lock_wait and
472         __lll_unlock_wake.
473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
474         Include lowlevellock.h and pthread-errnos.h.
475         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
476         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
477         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
478         pass LLL_SHARED in %esi to both __lll_lock_wait and
479         __lll_unlock_wake.
480         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
481         Include lowlevellock.h.
482         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
483         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
484         pass LLL_SHARED in %esi to both __lll_lock_wait and
485         __lll_unlock_wake.
486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
487         Include lowlevellock.h.
488         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
489         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
490         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
491         and __lll_unlock_wake.
492         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
493         Include lowlevellock.h.
494         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
495         Don't define.
496         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
497         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
498         and __lll_unlock_wake.
499         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
500         Include lowlevellock.h.
501         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
502         Don't define.
503         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
504         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
505         and __lll_unlock_wake.
506         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
507         Include lowlevellock.h.
508         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
509         Don't define.
510         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
511         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
512         and __lll_unlock_wake.
513         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
514         Include lowlevellock.h.
515         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
516         Don't define.
517         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
518         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
519         and __lll_unlock_wake.
520         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
521         Include lowlevellock.h.
522         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
523         Don't define.
524         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
525         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
526         and __lll_unlock_wake.
527         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
528         lowlevellock.h.
529         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
530         define.
531         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
532         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
533         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
534         lowlevellock.h.
535         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
536         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
537         lowlevellock.h.
538         (LOCK): Don't define.
539         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
540         lowlevellock.h.
541         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
542         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
543         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
544         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
545         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
546         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
547         (__lll_lock_wait_private): New function.
548         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
549         it to lll_futex_*wait.  Don't compile in for libc.so.
550         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
551         Remove.
552         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
553         (struct sparc_pthread_barrier): Remove.
554         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
555         struct sparc_pthread_barrier.  Pass
556         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
557         and lll_futex_wait macros.
558         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
559         Remove.
560         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
561         Include sparc pthread_barrier_wait.c instead of generic one.
563 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
565         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
567         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
568         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
569         %ecx.
570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
571         (pthread_rwlock_timedwrlock): Likewise.
572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
573         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
575 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
577         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
579 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
581         * tst-locale2.c (useless): Add return statement.
583 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
585         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
586         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
587         * pthread_create.c (start_thread): Likewise.
588         * init.c (sighandler_setxid): Likewise.
589         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
590         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
591         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
592         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
593         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
594         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
595         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
596         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
597         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
598         Likewise.
599         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
600         Likewise.
601         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
602         Likewise.
603         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
604         __rtld_notify): Likewise.
605         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
606         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
607         __pthread_once): Likewise.
608         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
609         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
610         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
611         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
612         (lll_futex_wait): Add private argument, define as wrapper around
613         lll_futex_timed_wait.
614         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
615         use __lll_private_flag macro.
616         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
617         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
618         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
619         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
620         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
621         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
622         (lll_futex_wait): Add private argument, define as wrapper around
623         lll_futex_timed_wait.
624         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
625         use __lll_private_flag macro.
626         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
627         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
628         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
629         Define.
630         (lll_futex_timed_wait, lll_futex_wake): Use it.
631         (lll_private_futex_wait, lll_private_futex_timed_wait,
632         lll_private_futex_wake): Removed.
633         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
634         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
635         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
636         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
637         (lll_futex_wait): Add private argument, define as wrapper around
638         lll_futex_timed_wait.
639         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
640         use __lll_private_flag macro.
641         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
642         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
643         to lll_futex_*.
644         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
645         (lll_private_futex_wait, lll_private_futex_timed_wait,
646         lll_private_futex_wake): Removed.
647         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
648         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
649         (lll_private_futex_wait, lll_private_futex_timed_wait,
650         lll_private_futex_wake): Removed.
651         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
652         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
653         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
654         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
655         (lll_futex_wait): Add private argument, define as wrapper around
656         lll_futex_timed_wait.
657         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
658         use __lll_private_flag macro.
659         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
660         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
661         to lll_futex_*.
662         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
663         Define.
664         (lll_futex_timed_wait, lll_futex_wake): Use it.
665         (lll_private_futex_wait, lll_private_futex_timed_wait,
666         lll_private_futex_wake): Removed.
668 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
670         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
671         of the structure for sparc32.
673 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
675         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
677 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
679         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
680         code used when private futexes are assumed.
681         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
682         Likewise.
684 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
686         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
687         (__lll_private_flag): Define.
688         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
689         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
690         __lll_private_flag.
691         (lll_private_futex_wait, lll_private_futex_timedwait,
692         lll_private_futex_wake): Define as wrapper around non-_private
693         macros.
694         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
695         (__lll_private_flag): Define.
696         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
697         (lll_private_futex_wait, lll_private_futex_timedwait,
698         lll_private_futex_wake): Define as wrapper around non-_private
699         macros.
701 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
703         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
704         parameter to lll_futex_wait call.
705         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
707         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
708         Replace lll_futex_wait with lll_private_futex_wait.
709         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
710         Add LLL_SHARED parameter to lll_futex_wake().
712         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
713         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
714         lll_private_futex_wake.
715         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
716         bit from private parm before syscall.
717         (lll_futex_timed_wait): Likewise.
718         (lll_futex_wake): Likewise.
719         (lll_futex_wake_unlock): Likewise.
720         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
721         (lll_robust_mutex_unlock): Likewise.
722         (lll_mutex_unlock_force): Likewise.
723         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
725 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
727         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
728         compilation when unconditionally using private futexes.
729         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
730         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
731         Likewise.
732         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
733         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
735 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
737         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
738         Define.
740 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
742         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
743         kernel-features.h.
745 2007-05-16  Roland McGrath  <roland@redhat.com>
747         * init.c (__nptl_initial_report_events): New variable.
748         (__pthread_initialize_minimal_internal): Initialize pd->report_events
749         to that.
751 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
753         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
754         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
756 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
758         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
759         implementation.
761 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
763         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
764         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
765         * pthread_mutex_timedlock.c: Likewise.
766         * pthread_mutex_trylock.c: Likewise.
767         * pthread_mutex_unlock.c: Likewise.
769 2007-06-17  Andreas Schwab  <schwab@suse.de>
771         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
772         sections.
774 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
776         * allocatestack.c (allocate_stack): Make code compile if
777         __ASSUME_PRIVATE_FUTEX is set.
779 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
781         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
782         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
784         (__pthread_rwlock_wrlock): Likewise.
785         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
786         (pthread_rwlock_timedrdlock): Likewise.
787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
788         (pthread_rwlock_timedwrlock): Likewise.
789         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
790         (__pthread_rwlock_unlock): Likewise.
792 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
794         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
795         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
796         Split __flags into __flags, __shared, __pad1 and __pad2.
797         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
798         futexes if they are available.
799         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
800         in libc-lowlevellock.S allow using private futexes.
801         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
802         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
803         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
804         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
805         lll_private_futex_timed_wait and lll_private_futex_wake.
806         (lll_robust_mutex_unlock): Fix typo.
807         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
808         field in futex command setup.
809         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
810         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
811         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
812         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
813         if they are available.  Remove clear_once_control.
814         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
815         futexes if they are available.
816         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
817         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
818         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
819         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
820         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
821         Wake only when there are waiters.
822         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
823         support.  Indicate that there are waiters.  Remove unnecessary
824         extra cancellation test.
825         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
826         left-over duplication of __sem_wait_cleanup.
828 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
830         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
831         parameter to lll_futex_wait, lll_futex_timed_wait, and
832         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
833         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
834         lll_private_futex_wake.
835         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
836         * allocatestack.c: Adjust use of lll_futex_* macros.
837         * init.c: Likewise.
838         * lowlevellock.h: Likewise.
839         * pthread_barrier_wait.c: Likewise.
840         * pthread_cond_broadcast.c: Likewise.
841         * pthread_cond_destroy.c: Likewise.
842         * pthread_cond_signal.c: Likewise.
843         * pthread_cond_timedwait.c: Likewise.
844         * pthread_cond_wait.c: Likewise.
845         * pthread_create.c: Likewise.
846         * pthread_mutex_lock.c: Likewise.
847         * pthread_mutex_setprioceiling.c: Likewise.
848         * pthread_mutex_timedlock.c: Likewise.
849         * pthread_mutex_unlock.c: Likewise.
850         * pthread_rwlock_timedrdlock.c: Likewise.
851         * pthread_rwlock_timedwrlock.c: Likewise.
852         * pthread_rwlock_unlock.c: Likewise.
853         * sysdeps/alpha/tls.h: Likewise.
854         * sysdeps/i386/tls.h: Likewise.
855         * sysdeps/ia64/tls.h: Likewise.
856         * sysdeps/powerpc/tls.h: Likewise.
857         * sysdeps/pthread/aio_misc.h: Likewise.
858         * sysdeps/pthread/gai_misc.h: Likewise.
859         * sysdeps/s390/tls.h: Likewise.
860         * sysdeps/sh/tls.h: Likewise.
861         * sysdeps/sparc/tls.h: Likewise.
862         * sysdeps/unix/sysv/linux/fork.c: Likewise.
863         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
864         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
865         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
866         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
867         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
868         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
869         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
870         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
871         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
872         Likewise.
873         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
874         * sysdeps/x86_64/tls.h: Likewise.
876 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
878         * pthread_getattr_np.c: No need to install a cancellation handler,
879         this is no cancellation point.
880         * pthread_getschedparam.c: Likewise.
881         * pthread_setschedparam.c: Likewise.
882         * pthread_setschedprio.c: Likewise.
883         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
884         lll_unlock_wake_cb.
885         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
886         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
887         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
888         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
889         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
890         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
891         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
892         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
893         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
894         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
895         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
896         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
898         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
899         whether there are more than one thread makes no sense here since
900         we only call the slow path if the locks are taken.
901         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
903         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
904         COND_NWAITERS_SHIFT.
905         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
906         COND_CLOCK_BITS.
907         * pthread_cond_init.c: Likewise.
908         * pthread_cond_timedwait.c: Likewise.
909         * pthread_cond_wait.c: Likewise.
910         * pthread_condattr_getclock.c: Likewise.
911         * pthread_condattr_setclock.c: Likewise.
912         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
914         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
915         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
918 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
920         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
921         unistd.h.
923         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
924         insn suffix.
925         (THREAD_GSCOPE_GET_FLAG): Remove.
926         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
927         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
928         changes.
929         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
930         (THREAD_GSCOPE_GET_FLAG): Remove.
931         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
932         instead of THREAD_GSCOPE_GET_FLAG.
933         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
934         it.
935         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
936         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
937         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
938         THREAD_GSCOPE_WAIT): Define.
939         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
940         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
941         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
942         THREAD_GSCOPE_WAIT): Define.
943         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
944         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
945         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
946         THREAD_GSCOPE_WAIT): Define.
947         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
948         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
949         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
950         THREAD_GSCOPE_WAIT): Define.
952 2007-05-24  Richard Henderson  <rth@redhat.com>
954         * descr.h (struct pthread): Add header.gscope_flag.
955         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
956         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
957         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
958         THREAD_GSCOPE_WAIT): Define.
960 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
962         * init.c: Make it compile with older kernel headers.
964         * tst-initializers1.c: Show through exit code which test failed.
966         * pthread_rwlock_init.c: Also initialize __shared field.
967         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
968         element in rwlock structure into four byte elements.  One of them is
969         the new __shared element.
970         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
971         Likewise.
972         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
973         __shared, adjust names of other padding elements.
974         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
975         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
976         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
977         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
978         FUTEX_PRIVATE_FLAG.
979         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
980         futex to use private operations if possible.
981         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
982         Likewise.
983         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
984         Likewise.
985         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
986         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
987         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
988         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
989         Likewise.
990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
991         Likewise.
992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
993         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
995 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
997         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
998         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
999         * pthread_rwlock_timedrdlock.c: Likewise.
1000         * pthread_rwlock_tryrdlock.c: Likewise.
1002         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1003         optimization.
1005         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1006         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1007         duplication of __sem_wait_cleanup.
1009         * allocatestack.c: Revert last change.
1010         * init.c: Likewise.
1011         * sysdeps/i386/tls.h: Likewise.
1012         * sysdeps/x86_64/tls.h: Likewise.
1013         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1014         header structure.
1015         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1017         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1018         Add private field.
1019         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1020         * pthread_barrier_init.c: Set private flag if pshared and private
1021         futexes are supported.
1022         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1023         private field in futex command setup.
1024         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1026 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1028         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1029         support.
1030         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1031         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1032         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1033         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1034         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1036         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1037         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1038         fields in the structure.
1039         (__old_sem_init): New function.
1040         * sem_open.c: Initialize all fields of the structure.
1041         * sem_getvalue.c: Adjust for renamed element.
1042         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1043         (gen-as-const-headers): Add structsem.sym.
1044         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1045         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1046         struct new_sem.  Add struct old_sem.
1047         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1048         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1049         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1050         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1051         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1052         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1053         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1054         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1055         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1056         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1057         * tst-sem10.c: New file.
1058         * tst-sem11.c: New file.
1059         * tst-sem12.c: New file.
1060         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1061         of struct sem.
1063 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1064             Jakub Jelinek  <jakub@redhat.com>
1066         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1067         Move __pthread_enable_asynccancel right before futex syscall.
1068         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1069         Likewise.
1071 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1073         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1074         THREAD_COPY_PRIVATE_FUTEX): Define.
1075         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1076         THREAD_COPY_PRIVATE_FUTEX): Define.
1077         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1078         * init.c (__pthread_initialize_minimal_internal): Use
1079         THREAD_SET_PRIVATE_FUTEX.
1081         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1082         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1083         THREAD_GSCOPE_FLAG_WAIT): Define.
1084         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1085         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1086         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1087         PTR_DEMANGLE.
1088         (THREAD_GSCOPE_GET_FLAG): Define.
1089         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1090         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1091         instead of ->header.gscope_flag directly.
1093 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1095         * init.c (__pthread_initialize_minimal_internal): Check whether
1096         private futexes are available.
1097         * allocatestack.c (allocate_stack): Copy private_futex field from
1098         current thread into the new stack.
1099         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1100         futexes if they are available.
1101         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1103         in libc-lowlevellock.S allow using private futexes.
1104         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1105         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1106         FUTEX_PRIVATE_FLAG.
1107         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1108         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1109         if they are available.
1110         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1111         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1112         * sysdeps/i386/tcb-offsets.sym: Likewise.
1113         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1114         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1116 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1118         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1119         Remove ptr_wait_lookup_done again.
1120         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1121         (__pthread_initialize_minimal_internal): Initialize
1122         _dl_wait_lookup_done pointer in _rtld_global directly.
1123         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1124         Remove code to code _dl_wait_lookup_done.
1125         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1126         encrypted for now.
1128 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1130         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1131         pthread_mutex_init failed with ENOTSUP.
1133 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1135         * allocatestack.c (__wait_lookup_done): New function.
1136         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1137         Add ptr_wait_lookup_done.
1138         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1139         * pthreadP.h: Declare __wait_lookup_done.
1140         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1141         Define macros to implement reference handling of global scope.
1142         * sysdeps/x86_64/tls.h: Likewise.
1143         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1144         Initialize GL(dl_wait_lookup_done).
1146 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1148         [BZ #4512]
1149         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1150         is detected.
1151         * pthread_mutex_timedlock.c: Likewise.
1152         * pthread_mutex_trylock.c: Likewise.
1153         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1155         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1156         * tst-robust9.c: New file.
1157         * tst-robustpi9.c: New file.
1159         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1160         unnecessary extra cancellation test.
1162 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1164         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1165         extra cancellation test.
1166         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1168 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1170         * descr.h (struct pthread): Rearrange members to fill hole in
1171         64-bit layout.
1173         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1174         (__pthread_setaffinity_new): If syscall was successful and
1175         RESET_VGETCPU_CACHE is defined, use it before returning.
1176         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1178 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1180         [BZ #4455]
1181         * tst-align2.c: Include stackinfo.h.
1182         * tst-getpid1.c: Likewise.
1184 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1186         [BZ #4455]
1187         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1188         * tst-getpid1.c (do_test): Likewise.
1190         [BZ #4456]
1191         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1192         (allocate_stack): Likewise.
1194 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1196         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1197         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1198         (__lll_robust_timedlock_wait): Likewise.
1199         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1201 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1203         [BZ #4465]
1204         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1205         * tst-cancel4.c (tf_fdatasync): New test.
1207 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1209         [BZ #4392]
1210         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1211         check mutexes like normal mutexes.
1213         [BZ #4306]
1214         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1215         Initialize the whole sigevent structure to appease valgrind.
1217 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1219         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1220         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1222 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1224         * tst-locale1.c: Avoid warnings.
1225         * tst-locale2.c: Likewise.
1227 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1229         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1230         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1232 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1234         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1235         __extern_always_inline where appropriate.
1236         * sysdeps/pthread/pthread.h: Likewise.
1238 2007-03-13  Richard Henderson  <rth@redhat.com>
1240         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1241         separate cfi regions for the two subsections.
1243 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1245         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1246         new thread, don't just decrement it.
1247         Patch by Suzuki K P <suzuki@in.ibm.com>.
1249 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1251         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1252         PTHFCT_CALL definition.
1254 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1256         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1257         available, don't use it.
1259 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1261         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1262         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1263         call into the kernel to delay.
1265 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1267         * tst-initializers1.c: We want to test the initializers as seen
1268         outside of libc, so undefined _LIBC.
1270         * pthread_join.c (cleanup): Avoid warning.
1272 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1274         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1275         (__lll_timedwait_tid): Add unwind info.
1277         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1278         function table, mangle the pointers.
1279         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1280         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1281         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1282         demangle pointers before use.
1283         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1284         demangle pointer.
1285         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1286         * sysdeps/pthread/setxid.h: Likewise.
1288 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1290         * tst-rwlock7.c: Show some more information in case of correct
1291         behavior.
1293 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1296         (lll_futex_timed_wait): Undo part of last change, don't negate
1297         return value.
1299 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1301         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1302         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1304 2006-12-28  David S. Miller  <davem@davemloft.net>
1306         * shlib-versions: Fix sparc64 linux target specification.
1308 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1310         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1311         Adjust include path for pthread_barrier_wait.c move.
1313 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1315         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1316         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1318 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1320         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1321         6 argument cancellable syscalls.
1322         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1323         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1324         6 argument cancellable syscalls.
1325         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1327 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1329         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1330         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1332 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1334         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1335         __sync_lock_release instead of __sync_lock_release_si.
1337 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1339         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1340         Define.
1341         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1342         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1343         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1344         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1345         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1346         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1347         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1348         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1349         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1350         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1351         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1353 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1355         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1356         * pthread_barrier_wait.c: ...here.
1357         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1358         * pthread_cond_broadcast.c: ...here.
1359         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1360         * pthread_cond_signal.c: ...here.
1361         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1362         * pthread_cond_timedwait.c: ...here.
1363         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1364         * pthread_cond_wait.c: ...here.
1365         * sysdeps/pthread/pthread_once.c: Move to...
1366         * pthread_once.c: ...here.
1367         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1368         * pthread_rwlock_rdlock.c: ...here.
1369         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1370         * pthread_rwlock_timedrdlock.c: ...here.
1371         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1372         * pthread_rwlock_timedwrlock.c: ...here.
1373         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1374         * pthread_rwlock_unlock.c: ...here.
1375         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1376         * pthread_rwlock_wrlock.c: ...here.
1377         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1378         * pthread_spin_destroy.c: ...here.
1379         * sysdeps/pthread/pthread_spin_init.c: Move to...
1380         * pthread_spin_init.c: ...here.
1381         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1382         * pthread_spin_unlock.c: ...here.
1383         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1384         * pthread_getcpuclockid.c: ...here.
1386         * init.c: USE_TLS support is now always enabled.
1387         * tst-tls5.h: Likewise.
1388         * sysdeps/alpha/tls.h: Likewise.
1389         * sysdeps/i386/tls.h: Likewise.
1390         * sysdeps/ia64/tls.h: Likewise.
1391         * sysdeps/powerpc/tls.h: Likewise.
1392         * sysdeps/s390/tls.h: Likewise.
1393         * sysdeps/sh/tls.h: Likewise.
1394         * sysdeps/sparc/tls.h: Likewise.
1395         * sysdeps/x86_64/tls.h: Likewise.
1397 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1399         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1400         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1401         failed.
1403         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1404         Define to THREAD_SELF->header.multiple_threads.
1405         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1406         Likewise.
1407         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1408         Likewise.
1409         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1410         (SINGLE_THREAD_P): Likewise.
1411         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1412         (SINGLE_THREAD_P): Likewise.
1413         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1414         (SINGLE_THREAD_P): Likewise.
1415         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1416         (SINGLE_THREAD_P): Likewise.
1417         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1418         Likewise.
1419         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1420         (SINGLE_THREAD_P): Likewise.
1421         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1422         (SINGLE_THREAD_P): Likewise.
1423         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1424         Likewise.
1426 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1428         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1429         by default rather than 2_3_3.
1431 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1433         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1434         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1435         atomic_* instead of catomic_* macros.
1437 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1439         [BZ #3285]
1440         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1441         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1442         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1443         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1444         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1445         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1446         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1447         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1448         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1449         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1450         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1451         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1452         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1454 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1456         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1457         cancelable syscalls with six parameters.
1459         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1460         operations instead of atomic_*.
1462 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1464         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1466 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1468         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1469         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1470         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1471         New file.
1472         * pthread_attr_setstack.c: Allow overwriting the version number of the
1473         new symbol.
1474         * pthread_attr_setstacksize.c: Likewise.
1475         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1476         it.
1477         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1478         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1480 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1482         [BZ #3251]
1483         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1484         Patch by Petr Baudis.
1486 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1488         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1490         * tst-cancel2.c (tf): Loop as long as something was written.
1492 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1494         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1495         mutexes wake all mutexes.
1496         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1497         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1498         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1500 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1502         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1503         to guarantee the thread is always canceled.
1505 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1507         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1508         Include stdlib.h.
1509         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1510         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1513         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1515 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1517         [BZ #3123]
1518         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1519         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1520         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1521         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1523         * Makefile (tests): Add tst-cond22.
1524         * tst-cond22.c: New file.
1526 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1528         [BZ #3124]
1529         * descr.h (struct pthread): Add parent_cancelhandling.
1530         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1531         cancelhandling value to child.
1532         * pthread_create.c (start_thread): If parent thread was canceled
1533         reset the SIGCANCEL mask.
1534         * Makefile (tests): Add tst-cancel25.
1535         * tst-cancel25.c: New file.
1537 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1538             Ulrich Drepper  <drepper@redhat.com>
1540         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1541         counterp if it is already zero.
1542         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1544 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1545             Roland McGrath  <roland@redhat.com>
1547         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1548         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1549         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1550         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1551         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1552         lll_robust_mutex_timedlock, lll_mutex_unlock,
1553         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1554         Add _L_*_ symbols around the subsection.
1555         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1556         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1558 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1559             Roland McGrath  <roland@redhat.com>
1561         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1562         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1563         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1564         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1565         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1566         lll_robust_mutex_timedlock, lll_mutex_unlock,
1567         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1568         Add _L_*_ symbols around the subsection.
1569         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1570         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1572 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1574         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1575         change because it can disturb too much existing code.  If real hard
1576         reader preference is needed we'll introduce another type.
1577         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1578         (pthread_rwlock_timedwrlock): Likewise.
1579         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1580         Likewise.
1582 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1584         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1585         reader preference.
1586         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1587         (pthread_rwlock_timedwrlock): Likewise.
1588         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1589         Likewise.
1591 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1593         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1594         Only define ifdef SHARED.
1596 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1598         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1599         (free_stacks): ...here.
1600         (__free_stack_cache): New function.
1601         * pthreadP.h: Declare __free_stack_cache.
1602         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1603         ptr_freeres.
1604         * init.c (pthread_functions): Initialize ptr_freeres.
1605         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1606         New freeres function.
1608 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
1610         [BZ #3018]
1611         * Makefile (extra-objs): Add modules to extra-test-objs instead.
1613 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
1615         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1616         _XOPEN_REALTIME_THREADS.
1618 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
1620         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1621         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1622         HAVE_CLOCK_GETTIME_VSYSCALL.
1623         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1625 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
1627         * sysdeps/unix/sysv/linux/bits/posix_opt.h
1628         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1629         * descr.h (struct priority_protection_data): New type.
1630         (struct pthread): Add tpp field.
1631         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1632         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1633         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1634         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1635         TPP mutexes.
1636         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1637         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1638         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1639         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1640         * tpp.c: New file.
1641         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1642         boosted by TPP.
1643         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1644         * pthread_mutexattr_getprioceiling.c
1645         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1646         in the SCHED_FIFO priority range.
1647         * pthread_mutexattr_setprioceiling.c
1648         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1649         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1650         if mutex is not TPP.  Ceiling is now in __data.__lock.
1651         * pthread_mutex_setprioceiling.c: Include stdbool.h.
1652         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
1653         is now in __data.__lock.  Add locking.
1654         * pthread_create.c (__free_tcb): Free pd->tpp structure.
1655         * Makefile (libpthread-routines): Add tpp.
1656         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1657         * tst-tpp.h: New file.
1658         * tst-mutexpp1.c: New file.
1659         * tst-mutexpp6.c: New file.
1660         * tst-mutexpp10.c: New file.
1661         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1662         * tst-mutex6.c (TEST_FUNCTION): Likewise.
1664 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
1666         [BZ #2843]
1667         * pthread_join.c (pthread_join): Account for self being canceled
1668         when checking for deadlocks.
1669         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
1670         (tf1): Don't print anything after pthread_join returns, this would be
1671         another cancellation point.
1672         (tf2): Likewise.
1673         * tst-join6.c: New file.
1674         * Makefile (tests): Add tst-join6.
1676 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
1678         [BZ #2892]
1679         * pthread_setspecific.c (__pthread_setspecific): Check
1680         out-of-range index before checking for unused key.
1682         * sysdeps/pthread/gai_misc.h: New file.
1684 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
1686         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
1687         file.  Don't use sysctl.
1688         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
1689         overwrite the file if this is likely not true.
1691 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
1693         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1694         * Makefile (tests): Add tst-getpid3.
1695         * tst-getpid3.c: New file.
1697 2006-07-30  Roland McGrath  <roland@redhat.com>
1699         * Makefile (libpthread-routines): Add ptw-sigsuspend.
1701         * sysdeps/unix/sysv/linux/i386/not-cancel.h
1702         (pause_not_cancel): New macro.
1703         (nanosleep_not_cancel): New macro.
1704         (sigsuspend_not_cancel): New macro.
1705         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1706         nanosleep_not_cancel macro from <not-cancel.h>.
1707         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1708         macro from <not-cancel.h>.
1710 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
1711             Jakub Jelinek  <jakub@redhat.com>
1713         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1714         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
1715         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1716         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1717         * pthread_mutex_init.c: Add support for priority inheritance mutex.
1718         * pthread_mutex_lock.c: Likewise.
1719         * pthread_mutex_timedlock.c: Likewise.
1720         * pthread_mutex_trylock.c: Likewise.
1721         * pthread_mutex_unlock.c: Likewise.
1722         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1723         all mutexes.
1724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1725         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1726         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1727         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1728         pthread-pi-defines.sym.
1729         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1730         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1731         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1732         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1733         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1734         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1735         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1736         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1737         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1738         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1739         _POSIX_THREAD_PRIO_INHERIT to 200112L.
1740         * tst-mutex1.c: Adjust to allow use in PI mutex test.
1741         * tst-mutex2.c: Likewise.
1742         * tst-mutex3.c: Likewise.
1743         * tst-mutex4.c: Likewise.
1744         * tst-mutex5.c: Likewise.
1745         * tst-mutex6.c: Likewise.
1746         * tst-mutex7.c: Likewise.
1747         * tst-mutex7a.c: Likewise.
1748         * tst-mutex8.c: Likewise.
1749         * tst-mutex9.c: Likewise.
1750         * tst-robust1.c: Likewise.
1751         * tst-robust7.c: Likewise.
1752         * tst-robust8.c: Likewise.
1753         * tst-mutexpi1.c: New file.
1754         * tst-mutexpi2.c: New file.
1755         * tst-mutexpi3.c: New file.
1756         * tst-mutexpi4.c: New file.
1757         * tst-mutexpi5.c: New file.
1758         * tst-mutexpi6.c: New file.
1759         * tst-mutexpi7.c: New file.
1760         * tst-mutexpi7a.c: New file.
1761         * tst-mutexpi8.c: New file.
1762         * tst-mutexpi9.c: New file.
1763         * tst-robust1.c: New file.
1764         * tst-robust2.c: New file.
1765         * tst-robust3.c: New file.
1766         * tst-robust4.c: New file.
1767         * tst-robust5.c: New file.
1768         * tst-robust6.c: New file.
1769         * tst-robust7.c: New file.
1770         * tst-robust8.c: New file.
1771         * Makefile (tests): Add the new tests.
1773         * pthread_create.c (start_thread): Add some casts to avoid warnings.
1774         * pthread_mutex_destroy.c: Remove unneeded label.
1776 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
1778         * pthread_mutex_init.c (__pthread_mutex_init): Move some
1779         computations to compile time.
1781 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
1783         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1785 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
1787         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
1789 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
1791         * pthread_key_create.c (__pthread_key_create): Do away with
1792         __pthread_keys_lock.
1794         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1795         (__kernel_cpumask_size): Mark as hidden.
1796         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1798         * sem_open.c (__sem_mappings_lock): Mark as hidden.
1799         * semaphoreP.h (__sem_mappings_lock): Likewise.
1801 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
1803         * pthread_atfork.c: Mark __dso_handle as hidden.
1805 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
1807         [BZ #2644]
1808         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
1809         the reload problem.  Change the one path in pthread_cancel_init
1810         which causes the problem.  Force gcc to reload.  Simplify callers.
1811         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
1812         (_Unwind_GetBSP): Undo last patch.
1814 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
1816         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
1817         function pointer is reloaded after pthread_cancel_init calls.
1819         [BZ #2644]
1820         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
1821         pointers are reloaded after pthread_cancel_init calls.
1823 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
1825         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
1826         __always_inline.
1828 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
1830         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1831         Allocate new object which is passed to timer_sigev_thread so that
1832         the timer can be deleted before the new thread is scheduled.
1834 2006-04-26  Roland McGrath  <roland@redhat.com>
1836         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
1838 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
1840         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
1841         suffix for conditional jumps.
1842         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1843         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1844         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1845         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1846         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1847         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1849         * init.c (sigcancel_handler): Compare with correct PID even if the
1850         thread is in the middle of a fork call.
1851         (sighandler_setxid): Likewise.
1852         Reported by Suzuki K P <suzuki@in.ibm.com> .
1854 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
1856         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
1858 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
1860         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
1861         fails [Coverity CID 105].
1863 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
1865         * sysdeps/pthread/pthread.h: Add nonnull attributes.
1867 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
1869         [BZ #2505]
1870         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
1871         Define __lll_rel_instr using lwsync.
1873 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
1875         * allocatestack.c (allocate_stack): Always initialize robust_head.
1876         * descr.h: Define struct robust_list_head.
1877         (struct pthread): Use robust_list_head in robust mutex list definition.
1878         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
1879         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
1880         (__pthread_initialize_minimal_internal): Register robust_list with
1881         the kernel.
1882         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
1883         Declare __set_robust_list_avail.
1884         * pthread_create.c (start_thread): Register robust_list of new thread.
1885         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
1886         waiters.
1887         * pthread_mutex_destroy.c: For robust mutexes don't look at the
1888         number of users, it's unreliable.
1889         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
1890         set_robust_list syscall is available.
1891         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
1892         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
1893         Set robust_head.list_op_pending before trying to lock a robust mutex.
1894         * pthread_mutex_timedlock.c: Likewise.
1895         * pthread_mutex_trylock.c: Likewise.
1896         * pthread_mutex_unlock.c: Likewise for unlocking.
1897         * Makefile (tests): Add tst-robust8.
1898         * tst-robust8.c: New file.
1900 2006-03-08  Andreas Schwab  <schwab@suse.de>
1902         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
1903         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
1905 2006-03-05  Roland McGrath  <roland@redhat.com>
1907         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
1908         and $config_os doesn't match *linux*.
1910 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
1912         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
1913         Use __syscall_error.
1914         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1915         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1916         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
1917         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1918         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1919         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
1921 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
1923         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
1925 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
1927         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1928         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
1929         mutex.
1930         (__lll_robust_timedlock_wait): Likewise.
1931         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
1932         (__lll_robust_lock_wait): Likewise.
1933         (__lll_robust_timedlock_wait): Likewise.
1934         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1935         (__lll_robust_lock_wait): Likewise.
1936         (__lll_robust_timedlock_wait): Likewise.
1938 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
1940         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
1941         lll_robust_mutex_trylock, lll_robust_mutex_lock,
1942         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
1943         lll_robust_mutex_unlock): Define.
1944         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
1946 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
1948         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
1949         instead of <clone.S>.
1951 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
1953         * Makefile (libpthread-routines): Add
1954         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
1955         and pthread_mutex_[sg]etprioceiling.
1956         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
1957         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
1958         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
1959         pthread_mutex_setprioceiling.
1960         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
1961         PTHREAD_PRIO_PROTECT): New enum values.
1962         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
1963         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
1964         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
1965         prototypes.
1966         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
1967         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
1968         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
1969         Define.
1970         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
1971         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
1972         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
1973         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
1974         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
1975         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
1976         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
1977         protocol mutexes.
1978         * pthread_mutex_getprioceiling.c: New file.
1979         * pthread_mutex_setprioceiling.c: New file.
1980         * pthread_mutexattr_getprioceiling.c: New file.
1981         * pthread_mutexattr_setprioceiling.c: New file.
1982         * pthread_mutexattr_getprotocol.c: New file.
1983         * pthread_mutexattr_setprotocol.c: New file.
1985 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
1987         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
1989 2006-02-27  Roland McGrath  <roland@redhat.com>
1991         * sysdeps/pthread/Subdirs: List nptl here too.
1992         * configure (libc_add_on_canonical): New variable.
1994         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
1996         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
1997         self to get main source tree's file.
1998         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
1999         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2000         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2001         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2002         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2003         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2004         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2005         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2006         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2007         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2008         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2009         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2010         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2012         * Makefile: Use $(sysdirs) in vpath directive.
2014         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2015         (CPPFLAGS-timer_routines.c): Likewise.
2017         * Makeconfig (includes): Variable removed.
2019 2006-02-26  Roland McGrath  <roland@redhat.com>
2021         * sysdeps/generic/pt-raise.c: Moved to ...
2022         * pt-raise.c: ... here.
2023         * sysdeps/generic/lowlevellock.h: Moved to ...
2024         * lowlevellock.h: ... here.
2026 2006-02-23  Roland McGrath  <roland@redhat.com>
2028         * descr.h (struct pthread): Add final member `end_padding'.
2029         (PTHREAD_STRUCT_END_PADDING): Use it.
2031 2006-02-20  Roland McGrath  <roland@redhat.com>
2033         * sysdeps/mips: Directory removed, saved in ports repository.
2034         * sysdeps/unix/sysv/linux/mips: Likewise.
2036 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2038         * tst-robust1.c: Add second mutex to check that the mutex list is
2039         handled correctly.
2041 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2043         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2044         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2045         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2046         lll_robust_mutex_unlock): New macros.
2047         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2048         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2049         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2050         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2051         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2053 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2055         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2056         definitions.
2057         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2059 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2061         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2062         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2063         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2064         (lll_robust_mutex_unlock): Likewise.
2066 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2068         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2069         Set robust_list.__next rather than robust_list.
2070         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2071         (__pthread_list_t): New typedef.
2072         (pthread_mutex_t): Replace __next and __prev fields with __list.
2073         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2074         (__pthread_list_t): New typedef.
2075         (pthread_mutex_t): Replace __next and __prev fields with __list.
2076         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2077         (__pthread_list_t, __pthread_slist_t): New typedefs.
2078         (pthread_mutex_t): Replace __next and __prev fields with __list.
2079         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2080         (__pthread_list_t, __pthread_slist_t): New typedefs.
2081         (pthread_mutex_t): Replace __next and __prev fields with __list.
2082         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2083         (__pthread_list_t, __pthread_slist_t): New typedefs.
2084         (pthread_mutex_t): Replace __next and __prev fields with __list.
2085         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2086         (__pthread_slist_t): New typedef.
2087         (pthread_mutex_t): Replace __next field with __list.
2089 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2091         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2092         PTHREAD_MUTEX_OWNERDEAD.
2093         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2094         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2095         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2096         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2097         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2098         to PTHREAD_MUTEX_INCONSISTENT.
2099         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2100         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2101         * pthread_mutex_trylock.c: Likewise.
2102         * pthread_mutex_timedlock.c: Likewise.
2103         * pthread_mutex_unlock.c: Likewise.
2104         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2105         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2106         lowlevelrobustlock.sym.
2107         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2108         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2109         definitions.
2110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2111         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2112         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2113         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2114         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2116 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2118         * allocatestack.c (allocate_stack): Initialize robust_list.
2119         * init.c (__pthread_initialize_minimal_internal): Likewise.
2120         * descr.h (struct xid_command): Pretty printing.
2121         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2122         robust_list.  Adjust macros.
2123         * pthread_create.c (start_thread): Adjust robust_list handling.
2124         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2125         but the owner for all robust mutex types.
2126         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2127         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2128         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2129         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2131         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2132         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2134 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2136         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2137         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2139 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2141         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2142         Return status.
2143         (lll_futex_timed_wait): Define.
2145 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2147         * tst-cancel4.c: Test ppoll.
2149 2006-01-18  Andreas Jaeger  <aj@suse.de>
2151         [BZ #2167]
2152         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2153         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2154         by Jim Gifford <patches@jg555.com>.
2156 2006-01-13  Richard Henderson  <rth@redhat.com>
2158         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2160 2006-01-10  Roland McGrath  <roland@redhat.com>
2162         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2163         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2164         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2165         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2166         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2167         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2168         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2169         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2170         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2171         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2173 2006-01-09  Roland McGrath  <roland@redhat.com>
2175         * tst-initializers1-c89.c: New file.
2176         * tst-initializers1-c99.c: New file.
2177         * tst-initializers1-gnu89.c: New file.
2178         * tst-initializers1-gnu99.c: New file.
2179         * Makefile (tests): Add them.
2180         (CFLAGS-tst-initializers1-c89.c): New variable.
2181         (CFLAGS-tst-initializers1-c99.c): New variable.
2182         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2183         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2185         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2186         Use __extension__ on anonymous union definition.
2187         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2188         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2189         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2190         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2191         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2193 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2195         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2196         Don't give the union a name because it changes the mangled name.
2197         Instead name the struct for __data.
2198         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2199         Likewise.
2200         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2201         Likewise.
2203 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2205         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2206         stack bias to mc_ftp field.
2208 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2210         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2211         being too clever and reloading the futex value where it shouldn't.
2213 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2215         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2216         correct type.
2218 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2220         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2221         Add cfi directives.
2223 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2225         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2226         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2227         rename in tcbhead_t.
2229         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2230         Don't give the union a name because it changes the mangled name.
2231         Instead name the struct for __data.
2232         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2233         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2234         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2235         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2236         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2237         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2239 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2241         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2242         Return status.
2243         (lll_futex_timed_wait): Define.
2244         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2245         * sysdeps/pthread/aio_misc.h: New file.
2247 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2249         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2251 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2253         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2254         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2255         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2257 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2259         * tst-cancel24.cc: Use C headers instead of C++ headers.
2261 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2263         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2264         sparc-linux configured glibc.
2265         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2266         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2267         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2268         atomic_compare_and_exchange_val_24_acq instead of
2269         atomic_compare_and_exchange_val_acq.
2270         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2271         instead of atomic_exchange_rel.
2272         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2273         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2274         file.
2275         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2276         file.
2277         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2278         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2279         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2280         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2281         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2282         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2283         New file.
2284         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2285         New file.
2286         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2287         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2288         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2289         file.
2290         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2291         file.
2292         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2294 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2296         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2297         mutex initializers.
2299 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2301         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2302         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2303         THREAD_COPY_POINTER_GUARD): Define.
2304         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2305         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2307 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2309         * version.c: Update copyright year.
2311 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2313         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2314         .eh_frame section, use cfi_* directives.
2315         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2317 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2319         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2320         now.
2322 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2324         * sysdeps/pthread/sigaction.c: Removed.
2325         * sigaction.c: New file.
2326         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2328 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2330         * Makefile (tests): Add tst-signal7.
2331         * tst-signal7.c: New file.
2333 2005-12-27  Roland McGrath  <roland@redhat.com>
2335         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2336         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2337         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2338         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2339         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2340         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2341         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2342         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2343         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2344         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2345         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2347 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2349         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2350         and __prev field to pthread_mutex_t.
2351         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2352         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2353         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2354         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2355         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2356         to pthread_mutex_t.
2358 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2360         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2361         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2362         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2363         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2364         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2365         and PTHREAD_MUTEXATTR_FLAG_BITS.
2366         * descr.h (struct pthread): Add robust_list field and define
2367         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2368         * pthread_mutexattr_getrobust.c: New file.
2369         * pthread_mutexattr_setrobust.c: New file.
2370         * pthread_mutex_consistent.c: New file.
2371         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2372         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2373         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2374         Adjust pthread_mutex_t initializers.
2375         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2376         field to pthread_mutex_t.
2377         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2378         and __prev field to pthread_mutex_t.
2379         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2380         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2381         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2382         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2383         * pthread_mutexattr_gettype.c: Likewise.
2384         * pthread_mutexattr_setpshared.c: Likewise.
2385         * pthread_mutexattr_settype.c: Likewise.
2386         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2387         Initialize mutex kind according to robust flag.
2388         * pthread_mutex_lock.c: Implement local robust mutex.
2389         * pthread_mutex_timedlock.c: Likewise.
2390         * pthread_mutex_trylock.c: Likewise.
2391         * pthread_mutex_unlock.c: Likewise.
2392         * pthread_create.c (start_thread): Mark robust mutexes which remained
2393         locked as dead.
2394         * tst-robust1.c: New file.
2395         * tst-robust2.c: New file.
2396         * tst-robust3.c: New file.
2397         * tst-robust4.c: New file.
2398         * tst-robust5.c: New file.
2399         * tst-robust6.c: New file.
2400         * tst-robust7.c: New file.
2401         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2402         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2403         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2404         tst-robust5, tst-robust6, and tst-robust7.
2406         * tst-typesizes.c: New file.
2407         * Makefile (tests): Add tst-typesizes.
2409         * tst-once3.c: More debug output.
2411 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2413         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2414         missing after last change.
2416         * version.c: Update copyright year.
2418 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2420         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2421         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2422         * pthread_mutex_trylock.c: Likewise.
2423         * pthread_mutex_timedlock.c: Likewise.
2424         * pthread_mutex_unlock.c: Likewise.
2426 2005-12-22  Roland McGrath  <roland@redhat.com>
2428         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2429         so that #include_next's search location is not reset to the -I..
2430         directory where <nptl/...> can be found.
2432 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2434         [BZ #1913]
2435         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2436         Fix unwind info.  Remove useless branch prediction prefix.
2437         * tst-cancel24.cc: New file.
2438         * Makefile: Add rules to build and run tst-cancel24.
2440 2005-12-21  Roland McGrath  <roland@redhat.com>
2442         * libc-cancellation.c: Use <> rather than "" #includes.
2443         * pt-cleanup.c: Likewise.
2444         * pthread_create.c: Likewise.
2445         * pthread_join.c: Likewise.
2446         * pthread_timedjoin.c: Likewise.
2447         * pthread_tryjoin.c: Likewise.
2448         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2449         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2450         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2451         * unwind.c: Likewise.
2453 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2455         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2456         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2457         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2458         THREAD_COPY_POINTER_GUARD): Define.
2460 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2462         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2463         rather than one.
2464         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2465         THREAD_COPY_POINTER_GUARD): Define.
2466         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2467         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2468         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2469         THREAD_COPY_POINTER_GUARD): Define.
2470         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2471         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2472         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2473         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2474         Use PTR_DEMANGLE for B0 if defined.
2476 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2478         * pthread_create.c (__pthread_create_2_1): Use
2479         THREAD_COPY_POINTER_GUARD if available.
2480         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2481         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2482         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2483         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2484         * sysdeps/x86_64/tls.h: Likewise.
2486 2005-12-15  Roland McGrath  <roland@redhat.com>
2488         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2490 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2492         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2493         sysdeps/generic.
2494         * errno-loc.c: New file.
2496 2005-12-12  Roland McGrath  <roland@redhat.com>
2498         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2499         adjustments before choosing stack size.  Update minimum stack size
2500         calculation to match allocate_stack change.
2502 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2504         * allocatestack.c (allocate_stack): Don't demand that there is an
2505         additional full page available on the stack beside guard, TLS, the
2506         minimum stack.
2508 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2510         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2511         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2513         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2514         compiling 32-bit code we must define __cleanup_fct_attribute.
2516 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2518         [BZ #1920]
2519         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2520         __attribute__ instead of __attribute.
2521         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2522         (__cleanup_fct_attribute): Likewise.
2524 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2526         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2527         a write barrier before writing libgcc_s_getcfa.
2529 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2531         * sysdeps/unix/sysv/linux/configure: Removed.
2533 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2535         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2536         optional init_array/fini_array support.
2538 2005-10-24  Roland McGrath  <roland@redhat.com>
2540         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2541         versioned_symbol use.
2543 2005-10-16  Roland McGrath  <roland@redhat.com>
2545         * init.c (__pthread_initialize_minimal_internal): Even when using a
2546         compile-time default stack size, apply the minimum that allocate_stack
2547         will require, and round up to page size.
2549 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2551         * Makefile ($(test-modules)): Remove static pattern rule.
2553 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2554             Ulrich Drepper  <drepper@redhat.com>
2556         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2557         alignment in callback function.
2558         * Makefile: Add rules to build and run tst-align3.
2559         * tst-align3.c: New file.
2561 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2563         * allocatestack.c (setxid_signal_thread): Add
2564         INTERNAL_SYSCALL_DECL (err).
2566 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2568         * allocatestack.c (setxid_signal_thread): Need to use
2569         atomic_compare_and_exchange_bool_acq.
2571 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2572             Jakub Jelinek  <jakub@redhat.com>
2574         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2575         CANCEL_RESTMASK.
2576         (struct pthread): Move specific_used field to avoid padding.
2577         Add setxid_futex field.
2578         * init.c (sighandler_setxid): Reset setxid flag and release the
2579         setxid futex.
2580         * allocatestack.c (setxid_signal_thread): New function.  Broken
2581         out of the bodies of the two loops in __nptl_setxid.  For undetached
2582         threads check whether they are exiting and if yes, don't send a signal.
2583         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2584         * pthread_create.c (start_thread): For undetached threads, check
2585         whether setxid bit is set.  If yes, wait until signal has been
2586         processed.
2588         * allocatestack.c (STACK_VARIABLES): Initialize them.
2589         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2591 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2593         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2594         waiters, awake all waiters on the associated mutex.
2596 2005-09-22  Roland McGrath  <roland@redhat.com>
2598         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2599         ../sysdeps/x86_64/hp-timing.h).
2601 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2603         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2604         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2605         (lll_futex_wake_unlock): Define.
2606         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2607         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2608         (lll_futex_wake_unlock): Define.
2609         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2610         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2611         (lll_futex_wake_unlock): Define.
2612         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2613         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2614         (lll_futex_wake_unlock): Define.
2615         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2616         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2617         (lll_futex_wake_unlock): Define.
2618         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2619         lll_futex_wake_unlock.
2620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2621         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2622         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2623         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2624         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2625         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2627 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2629         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2630         Fix typo in register name.
2632 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
2634         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2635         Use __sigfillset.  Document that sigfillset does the right thing wrt
2636         to SIGSETXID.
2638 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
2640         * tst-stackguard1.c (do_test): Likewise.
2642 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
2644         * tst-stackguard1.c (do_test): Don't fail if the poor man's
2645         randomization doesn't work well enough.
2647 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2649         [BZ #1102]
2650         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2651         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2652         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2653         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2654         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2655         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2656         in the structure.
2657         * Makefile (tests): Add tst-initializers1.
2658         (CFLAGS-tst-initializers1.c): Set.
2659         * tst-initializers1.c: New test.
2661 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2663         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2664         Make sure __flags are located at offset 48 from the start of the
2665         structure.
2667 2005-07-02  Roland McGrath  <roland@redhat.com>
2669         * Makeconfig: Comment fix.
2671 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
2673         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2674         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2675         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2676         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2677         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2678         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2679         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2680         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2681         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2682         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2684 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
2686         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2687         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2688         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2689         fields.
2690         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2691         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2692         field.  Put in sysinfo field unconditionally.
2693         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2694         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2695         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2696         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2697         fields.
2698         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2699         * pthread_create.c (__pthread_create_2_1): Use
2700         THREAD_COPY_STACK_GUARD macro.
2701         * Makefile: Add rules to build and run tst-stackguard1{,-static}
2702         tests.
2703         * tst-stackguard1.c: New file.
2704         * tst-stackguard1-static.c: New file.
2706 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
2708         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2709         Invoke CGOTSETUP and CGOTRESTORE.
2710         (CGOTSETUP, CGOTRESTORE): Define.
2712 2005-05-29  Richard Henderson  <rth@redhat.com>
2714         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2715         (tf_write, tf_writev): Use it.
2716         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
2717         the system minimum.
2719 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
2721         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2722         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2723         __librt_*_asynccancel@local.
2725 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
2727         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2728         all occurrences of JUMPTARGET.  Instead append @local to labels.
2730 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
2732         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2733         size/alignment of struct pthread rather than tcbhead_t.
2734         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2735         Likewise.
2736         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2737         Likewise.
2738         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2739         Likewise.
2741 2005-05-19  Richard Henderson  <rth@redhat.com>
2743         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2744         __sync_val_compare_and_swap, not explicit _si variant.
2745         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2747 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
2749         [BZ #915]
2750         * sysdeps/pthread/pthread.h: Avoid empty initializers.
2752 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
2754         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2755         .eh_frame section, use cfi_* directives.
2757 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
2759         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2760         of "" includes.
2762 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
2764         [BZ #1075]
2765         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2766         aio_write blocks.
2768 2005-04-27  Roland McGrath  <roland@redhat.com>
2770         * Makefile (tests): Remove tst-clock2.
2772         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2773         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2774         translating to the kernel clockid_t for our own process/thread clock.
2776         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2778 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
2780         * old_pthread_cond_init.c: Include <errno.h>.
2781         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2782         process shared or uses clock other than CLOCK_REALTIME.
2783         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2785 2005-04-13  David S. Miller  <davem@davemloft.net>
2787         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2788         * sysdeps/sparc/sparc64/clone.S: New file.
2790 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2792         [BZ #1102]
2793         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2794         __inline instead of inline.
2795         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2797 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
2799         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2800         functionally equivalent, but shorter instructions.
2801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2802         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2803         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2804         Likewise.
2805         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2806         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2807         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2810         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2811         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2812         Likewise.
2813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2814         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2816         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2817         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2819 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
2821         * sysdeps/mips/Makefile: New file.
2822         * sysdeps/mips/nptl-sysdep.S: New file.
2823         * sysdeps/mips/tcb-offsets.sym: New file.
2824         * sysdeps/mips/pthread_spin_lock.S: New file.
2825         * sysdeps/mips/pthread_spin_trylock.S: New file.
2826         * sysdeps/mips/pthreaddef.h: New file.
2827         * sysdeps/mips/tls.h: New file.
2828         * sysdeps/mips/jmpbuf-unwind.h: New file.
2829         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
2830         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
2831         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
2832         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
2833         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
2834         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
2835         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
2836         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
2837         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
2838         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
2840 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
2842         [BZ #1112]
2843         * pthread_create.c (__pthread_create_2_1): Rename syscall error
2844         variable to scerr.
2846 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
2848         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
2850 2005-02-25  Roland McGrath  <roland@redhat.com>
2852         * alloca_cutoff.c: Correct license text.
2853         * tst-unload.c: Likewise.
2854         * sysdeps/pthread/allocalim.h: Likewise.
2855         * sysdeps/pthread/pt-initfini.c: Likewise.
2856         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2857         * sysdeps/pthread/bits/sigthread.h: Likewise.
2858         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2859         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2861 2005-02-16  Roland McGrath  <roland@redhat.com>
2863         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2864         Use unsigned int * for ptr_nthreads.
2866 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
2868         [BZ #721]
2869         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
2870         gcc4.
2872 2005-02-07  Richard Henderson  <rth@redhat.com>
2874         [BZ #787]
2875         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
2876         argument.
2878 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
2880         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
2881         order of arguments in invocation of atomic_add_zero.
2883 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
2885         [BZ #737]
2886         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
2887         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
2888         at least gotntpoff relocation and addition.
2889         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2890         Likewise.
2891         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2892         Likewise.
2893         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2894         Likewise.
2896 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
2898         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
2899         entry for static tls deallocation fix.
2900         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
2901         also contains information whether the memory pointed to is static
2902         TLS or not.
2903         * sysdeps/i386/tls.h: Likewise.
2904         * sysdeps/ia64/tls.h: Likewise.
2905         * sysdeps/powerpc/tls.h: Likewise.
2906         * sysdeps/s390/tls.h: Likewise.
2907         * sysdeps/sh/tls.h: Likewise.
2908         * sysdeps/sparc/tls.h: Likewise.
2909         * sysdeps/x86_64/tls.h: Likewise.
2911 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
2913         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
2915 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
2917         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
2918         %esp.
2919         * Makefile (tests): Add tst-align2.
2920         * tst-align2.c: New test.
2921         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
2922         -mpreferred-stack-boundary=4.
2924 2004-12-18  Roland McGrath  <roland@redhat.com>
2926         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
2927         New file removed withdrawn for the moment.
2929 2004-12-17  Richard Henderson  <rth@redhat.com>
2931         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
2932         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
2934 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
2936         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
2937         Increased PTHREAD_STACK_MIN.
2939         * tst-context1.c (stacks): Use bigger stack size.
2941 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
2943         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
2944         * sysdeps/sparc/tcb-offsets.sym: Add TID.
2946 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
2948         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
2949         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
2950         * sysdeps/s390/tcb-offsets.sym (TID): Add.
2952 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
2954         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
2956 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
2958         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
2959         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
2961         * tst-getpid1.c: If child crashes, report this first.  Print which
2962         signal.
2964 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
2966         * init.c (__pthread_initialize_minimal_internal): Also unblock
2967         SIGSETXID.
2969 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2971         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
2972         _POSIX_THREAD_CPUTIME): Define to 0.
2973         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
2974         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
2975         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
2976         __timer_signal_thread_tclk): Remove.
2977         (init_module): Remove their initialization.
2978         (thread_cleanup): Remove their cleanup assertions.
2979         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
2980         __timer_signal_thread_tclk): Remove.
2981         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
2982         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
2983         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
2985 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
2987         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
2988         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
2990         * Makefile (tests): Add tst-getpid2.
2991         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
2992         (do_test): Use it.  Use __clone2 instead of clone on ia64.
2993         * tst-getpid2.c: New test.
2995 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2997         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
2999 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3001         * Makefile (tests): Add tst-getpid1.
3002         * tst-getpid1.c: New file.
3003         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3004         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3006 2004-12-02  Roland McGrath  <roland@redhat.com>
3008         * Makefile (libpthread-nonshared): Variable removed.
3009         ($(objpfx)libpthread_nonshared.a): Target removed.
3010         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3011         These are now handled by generic magic from
3012         libpthread-static-only-routines being set.
3014 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3016         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3017         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3018         _POSIX_THREAD_PRIO_PROTECT): Define.
3019         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3020         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3021         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3023 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3025         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3026         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3027         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3028         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3029         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3030         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3031         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3033 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3035         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3037         * Makefile (libpthread-routines): Add pthread_setschedprio.
3038         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3039         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3040         * pthread_setschedprio.c: New file.
3042 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3044         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3045         * pthread_cancel.c (pthread_create): Likewise.
3047         * Makefile (libpthread-routines): Add vars.
3048         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3049         * init.c (__default_stacksize, __is_smp): Remove.
3050         * vars.c: New file.
3051         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3052         and define a wrapper macro.
3053         (PTHREAD_STATIC_FN_REQUIRE): Define.
3054         * allocatestack.c (__find_thread_by_id): Undefine.
3055         * pthread_create (__pthread_keys): Remove.
3056         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3057         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3058         PTHREAD_STATIC_FN_REQUIRE.
3060 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3062         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3063         parameter to REGISTER macro.
3065 2004-11-17  Roland McGrath  <roland@redhat.com>
3067         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3068         Make sure SIGCANCEL is blocked as well.
3070 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3072         * sysdeps/pthread/setxid.h: New file.
3073         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3074         (struct xid_command): Add forward decl.
3075         (struct pthread_functions): Change return type of __nptl_setxid hook
3076         to int.
3077         * pthreadP.h (__nptl_setxid): Change return type to int.
3078         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3079         calling thread, return its return value and set errno on failure.
3080         * descr.h (struct xid_command): Change id type to long array.
3082         * Makefile: Add rules to build and test tst-setuid1 and
3083         tst-setuid1-static.
3084         * tst-setuid1.c: New test.
3085         * tst-setuid1-static.c: New test.
3087 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3089         * Makefile (tests): Add tst-exit3.
3090         * tst-exit3.c: New test.
3092 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3094         * Makefile (tests): Add tst-exit2.
3095         * tst-exit2.c: New file.
3097 2004-11-09  Roland McGrath  <roland@redhat.com>
3099         [BZ #530]
3100         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3101         here, before calling clone.
3102         * pthread_create.c (start_thread): Don't do it here.
3104 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3106         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3108 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3110         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3111         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3112         assembler warning.
3114 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3116         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3117         if sched_priority is not between minprio and maxprio.
3119 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3121         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3122         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3124         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3125         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3127 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3129         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3130         not-cancelable I/O functions.
3132 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3134         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3135         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3136         make sure 2 is stored in the futex and we looked at the old value.
3137         Fix a few other problems to return the correct value.
3139 2004-10-14  Richard Henderson  <rth@redhat.com>
3141         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3142         make gcc4 happy.
3144 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3146         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3147         of pthread-functions.h and pthreaddef.h.
3148         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3150         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3151         Change __data.__nwaiters from int to unsigned int.
3153         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3154         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3156         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3157         before return type.
3159         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3160         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3162 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3164         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3165         test fails, remove message queue.
3166         (tf_msgsnd): Likewise.
3168 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3170         * tst-clock1.c: Change #ifdef to #if defined.
3171         * tst-clock2.c: Likewise.
3172         * tst-cond11.c: Likewise.
3174         * sysdeps/pthread/timer_create.c (timer_create): Use
3175         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3176         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3177         THREAD_CPUTIME.
3179 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3181         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3182         _POSIX_THREAD_CPUTIME): Define to 0.
3184 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3186         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3187         and _POSIX_THREAD_CPUTIME to zero.
3188         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3189         * tst-barrier2.c: Fix testing for POSIX feature.
3190         * tst-clock1.c: Likewise.
3191         * tst-clock2.c: Likewise.
3192         * tst-cond11.c: Likewise.
3193         * tst-cond4.c: Likewise.
3194         * tst-cond6.c: Likewise.
3195         * tst-flock2.c: Likewise.
3196         * tst-mutex4.c: Likewise.
3197         * tst-mutex9.c: Likewise.
3198         * tst-rwlock12.c: Likewise.
3199         * tst-rwlock4.c: Likewise.
3200         * tst-signal1.c: Likewise.
3201         * tst-spin2.c: Likewise.
3202         * sysdeps/pthread/posix-timer.h: Likewise.
3203         * sysdeps/pthread/timer_create.c: Likewise.
3204         * sysdeps/pthread/timer_routines.c: Likewise.
3206 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3209         (__lll_mutex_timedlock_wait): Address futex correctly.
3211         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3212         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3213         make sure 2 is stored in the futex and we looked at the old value.
3214         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3215         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3216         which might very well made the code not working at all before.
3217         [BZ #417]
3219 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3221         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3222         allow SIGSETXID to be sent.
3223         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3224         for SIGSETXID to be defined.
3225         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3226         SIGSETXID cannot be blocked.
3228         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3229         Add __extension__ to long long types.
3230         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3231         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3232         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3233         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3234         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3235         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3236         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3238 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3240         * descr.h (struct pthread): Add stopped_start field.
3241         * sysdeps/pthread/createthread.c (create_thread): Set
3242         start_stopped flag in descriptor for new thread appropriately.
3243         * pthread_create.c (start_thread): Only take lock to be stopped on
3244         startup if stopped_start flag says so.
3246 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3248         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3249         is created detached and if yes, do not try to free the stack in case
3250         the thread creation failed.
3251         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3252         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3253         case there has been no error.  [BZ #405]
3255         * pthread_create.c (start_thread): Don't wait for scheduler data
3256         etc to be set at the beginning of the function.  The cancellation
3257         infrastructure must have been set up.  And enable async
3258         cancellation before potentially going to sleep.  [BZ #401]
3260 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3262         * Versions: Remove exports for pthread_set*id_np functions.
3263         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3264         for now.
3265         * Makefile: Don't build pthread_set*id code for now.
3267 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3269         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3270         internal use.
3271         * allocatestack.c (__nptl_setxid): New function.
3272         * descr.h (struct xid_command): Define type.
3273         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3274         (sighandler_setxid): New function.
3275         (__pthread_initialize_minimal): Register sighandler_setxid for
3276         SIGCANCEL.
3277         * pt-allocrtsig.c: Update comment.
3278         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3279         Declare __nptl_setxid.
3280         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3281         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3282         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3283         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3284         and pthread_setresuid_np.
3285         * pthread_setgid_np.c: New file.
3286         * pthread_setuid_np.c: New file.
3287         * pthread_setegid_np.c: New file.
3288         * pthread_seteuid_np.c: New file.
3289         * pthread_setregid_np.c: New file.
3290         * pthread_setreuid_np.c: New file.
3291         * pthread_setresgid_np.c: New file.
3292         * pthread_setresuid_np.c: New file.
3293         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3294         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3295         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3296         and pthread_setresuid_np.
3297         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3298         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3299         pthread_setregid, and pthread_setresgid.
3301 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3303         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3304         ENOMEM when out of memory.
3306 2004-09-10  Roland McGrath  <roland@redhat.com>
3308         [BZ #379]
3309         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3310         code, since we don't try to use the broken CLONE_STOPPED any more.
3311         * pthread_create.c (start_thread): Likewise.
3313 2004-09-15  Richard Henderson  <rth@redhat.com>
3315         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3317 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3319         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3320         (__libc_unwind_longjmp): Delete macro and declare as function.
3321         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3322         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3323         nptl directory.
3324         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3325         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3326         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3328 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3330         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3331         for __USE_XOPEN2K.
3332         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3333         types also for __USE_XOPEN2K.
3334         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3335         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3336         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3337         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3338         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3339         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3340         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3341         [BZ #320]
3343 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3345         * sysdeps/pthread/pthread.h
3346         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3347         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3348         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3349         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3350         [BZ #375]
3352 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3354         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3355         PSEUDO to be used with . prefix.
3357         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3358         Use atomic_increment instead of atomic_exchange_and_add.
3359         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3360         Likewise.
3361         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3362         Likewise.
3363         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3364         Likewise.
3366         * allocatestack.c (allocate_stack): Use atomic_increment_val
3367         instead of atomic_exchange_and_add.
3368         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3369         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3370         Likewise.
3371         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3372         Likewise.
3374         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3375         the initialization function might throw.
3377 2005-09-05  Richard Henderson  <rth@redhat.com>
3379         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3380         Move definition inside libpthread, libc, librt check.  Provide
3381         definition for rtld.
3383 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3385         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3386         waiters, awake all waiters on the associated mutex.
3388 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3390         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3391         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3392         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3393         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3394         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3395         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3396         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3397         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3398         * unwind.c: Use it.
3400         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3401         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3402         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3403         Likewise.
3404         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3405         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3406         this is the last waiter, signal pthread_cond_destroy caller and
3407         avoid using the pthread_cond_t structure after unlock.
3408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3409         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3410         Read clock type from the least significant bits of __nwaiters instead
3411         of __clock.
3412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3413         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3415 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3417         [BZ #342]
3418         * Makefile (tests): Add tst-cond20 and tst-cond21.
3419         * tst-cond20.c: New test.
3420         * tst-cond21.c: New test.
3421         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3422         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3423         it unsigned int.
3424         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3425         Likewise.
3426         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3427         (pthread_cond_t): Likewise.
3428         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3429         Likewise.
3430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3431         Likewise.
3432         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3433         Likewise.
3434         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3435         (cond_nwaiters): New.
3436         (clock_bits): New.
3437         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3438         if there are waiters not signalled yet.
3439         Wait until all already signalled waiters wake up.
3440         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3441         __nwaiters.  If pthread_cond_destroy has been called and this is the
3442         last waiter, signal pthread_cond_destroy caller and avoid using
3443         the pthread_cond_t structure after unlock.
3444         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3445         decrement it when leaving.  If pthread_cond_destroy has been called
3446         and this is the last waiter, signal pthread_cond_destroy caller.
3447         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3448         Likewise.  Read clock type from the least significant bits of
3449         __nwaiters instead of __clock.
3450         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3451         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3452         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3453         clock type just from the last COND_CLOCK_BITS bits of value.
3454         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3455         instead of __clock, just from second bit of condattr's value.
3457 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3459         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3460         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3461         != 64.
3462         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3464 2004-08-15  Roland McGrath  <roland@frob.com>
3466         * pthread_atfork.c: Update copyright terms including special exception
3467         for these trivial files, which are statically linked into executables
3468         that use dynamic linking for the significant library code.
3470 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3472         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3473         pthread_rwlock_rdlock.
3474         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3475         Decrease __nr_readers_queued after reacquiring lock.
3476         * sysdeps/pthread/pthread_rwlock_timedrdlock
3477         (pthread_rwlock_timedrdlock): Likewise.
3478         Reported by Bob Cook <bobcook47@hotmail.com>.
3480 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3482         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3483         before pthread_barrier_wait.
3485 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3488         Remove unnecessary exception handling data.
3490 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3492         [BZ #284]
3493         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3494         instead of clockid_t.
3496 2004-07-21  Roland McGrath  <roland@redhat.com>
3498         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3500 2004-07-19  Roland McGrath  <roland@redhat.com>
3502         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3504 2004-07-02  Roland McGrath  <roland@redhat.com>
3506         * configure: Don't exit.
3508 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3510         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3511         (__pthread_cond_timedwait): Check for invalid nanosecond in
3512         timeout value.
3514 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3516         * Makefile: Add rules to build and run tst-fini1.
3517         * tst-fini1.c: New file.
3518         * tst-fini1mod.c: New file.
3520 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3522         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3523         if no cancellation support is needed.
3524         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3525         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3526         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3527         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3528         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3529         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3530         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3531         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3532         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3534         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3535         only if not already defined.
3537 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3539         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3540         constraint "m" instead of "0" for futex.
3542         * shlib-versions: Add powerpc64-.*-linux.*.
3544 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3546         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3547         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3548         for valid tv_nsec.
3549         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3550         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3551         bits.
3553 2004-06-29  Roland McGrath  <roland@redhat.com>
3555         * Banner: NPTL no longer has its own version number.
3556         * Makefile (nptl-version): Variable removed.
3557         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3558         using $(version), the glibc version number.
3560 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3562         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3563         Fix branch offset for a PLT entry.
3564         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3565         Likewise.
3566         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3567         Likewise.
3568         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3569         Likewise.
3570         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3571         Likewise.
3573 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3575         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3576         unconditionally.
3578 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3580         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3581         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3582         instead of tv_sec.
3583         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3584         (pthread_rwlock_timedrdlock): Likewise.
3586 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3588         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3589         Set __r7 to val, not mutex.
3591 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3593         * Makefile: Add rules to build tst-rwlock14.
3594         * tst-rwlock14.c: New file.
3596 2004-06-24  Boris Hu  <boris.hu@intel.com>
3598         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3599         check.
3600         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3602 2004-06-19  Andreas Jaeger  <aj@suse.de>
3604         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3605         assembler in last patch.
3607 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3609         * sysdeps/pthread/pthread_cond_timedwait.c
3610         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3612         (__pthread_cond_timedwait): Check for invalid nanosecond in
3613         timeout value.
3614         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3615         * tst-cond19.c: New file.
3616         * Makefile: Add rules to build and run tst-cond19.
3618 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3620         * tst-context1.c (GUARD_PATTERN): Defined.
3621         (tst_context_t): Define struct containing ucontext_t & guard words.
3622         (ctx): Declare as an array of tst_context_t.
3623         (fct): Verify uc_link & guard words are still valid.
3624         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
3626 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3628         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3629         Add __data.__futex field, reshuffle __data.__clock.
3630         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3631         (__pthread_cond_signal): Increment __futex at the same time as
3632         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3633         address of low 32-bits of __wakeup_seq to futex syscall.
3634         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3635         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3636         releasing internal lock to FUTEX_WAIT.
3637         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3638         (__pthread_cond_timedwait): Likewise.
3639         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3640         (FUTEX_CMP_REQUEUE): Define.
3641         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3642         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3643         Pass __futex value from before the unlock and __futex address instead
3644         of address of low 32-bits of __wakeup_seq to futex syscall.
3645         Fallback to FUTEX_WAKE all on any errors.
3647 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
3649         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3650         comment typo.
3651         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3652         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3653         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3654         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3655         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
3657 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3659         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3660         Add memory clobber to inline assembly.
3661         (__lll_mutex_trylock): Likewise.
3662         (__lll_mutex_cond_trylock): Likewise.
3664 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3666         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3667         Pass val argument as 6th system call argument in %r7.
3669 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3671         * Makefile (tests): Add tst-cond16.
3672         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3673         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3674         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3675         Add __data.__futex field, reshuffle __data.__clock.
3676         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3677         (__pthread_cond_signal): Increment __futex at the same time as
3678         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3679         address of low 32-bits of __wakeup_seq to futex syscall.
3680         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3681         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3682         releasing internal lock to FUTEX_WAIT.
3683         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3684         (__pthread_cond_timedwait): Likewise.
3685         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3686         (FUTEX_CMP_REQUEUE): Define.
3687         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3688         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3689         Pass __futex value from before the unlock and __futex address instead
3690         of address of low 32-bits of __wakeup_seq to futex syscall.
3691         Fallback to FUTEX_WAKE all on any errors.
3692         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3693         Define.
3694         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3695         internally.  Return non-zero if error, zero if success.
3696         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3697         Add __data.__futex field, reshuffle __data.__clock.
3698         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3699         Define.
3700         (lll_futex_requeue): Add val argument, return 1 unconditionally
3701         for the time being.
3702         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3703         Add __data.__futex field, reshuffle __data.__clock.
3704         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3705         Define.
3706         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3707         internally.  Return non-zero if error, zero if success.
3708         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3709         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3710         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3711         Define.
3712         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3713         internally.  Return non-zero if error, zero if success.
3714         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3715         Add __data.__futex field, reshuffle __data.__clock.
3716         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3717         Define.
3718         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3719         internally.  Return non-zero if error, zero if success.
3720         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3721         Add __data.__futex field, reshuffle __data.__clock.
3722         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3723         Add __data.__futex field, reshuffle __data.__clock.
3724         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3725         Increment __futex at the same time as __wakeup_seq or __total_seq.
3726         Pass address of __futex instead of address of low 32-bits of
3727         __wakeup_seq to futex syscall.
3728         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3729         Pass __futex value from before releasing internal lock
3730         to FUTEX_WAIT.
3731         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3732         Likewise.  Avoid unnecessary shadowing of variables.
3733         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3734         Set __futex to 2 * __total_seq.  Pass __futex value from before the
3735         unlock and __futex address instead of address of low 32-bits of
3736         __wakeup_seq to futex_requeue macro, adjust for new return value
3737         meaning.
3738         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3739         (__pthread_cond_signal): Increment __futex at the same time as
3740         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3741         address of low 32-bits of __wakeup_seq to futex syscall.
3742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3743         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3744         releasing internal lock to FUTEX_WAIT.
3745         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3746         (__pthread_cond_timedwait): Likewise.
3747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3748         (FUTEX_CMP_REQUEUE): Define.
3749         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3750         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3751         Pass __futex value from before the unlock and __futex address instead
3752         of address of low 32-bits of __wakeup_seq to futex syscall.
3753         Fallback to FUTEX_WAKE all on any errors.
3755 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3757         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3758         Add nop to align the end of critical section.
3759         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3761 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3763         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3764         Add __broadcast_seq field.
3765         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3766         all waiters as woken with woken_seq and bump broadcast counter.
3767         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3768         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
3769         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3770         Comment typo fixes.  Avoid returning -ETIMEDOUT.
3772 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
3774         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3775         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3776         Reported by Kaz Kojima.
3778 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
3780         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3782 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3784         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3785         __broadcast_seq with bc_seq after acquiring internal lock instead of
3786         before it.
3788 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
3790         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3791         compilation.
3792         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3793         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3794         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3795         (pthread_cond_t): Add __data.__broadcast_seq field.
3796         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3797         (FRAME_SIZE): Define.
3798         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
3799         Comment typo fixes.
3800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3801         Define.
3802         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
3803         typo fixes.
3804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3805         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
3806         fixes.
3808 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
3810         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
3811         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3812         Add __broadcast_seq field.
3813         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3814         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3815         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3816         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3817         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
3819         all waiters as woken with woken_seq and bump broadcast counter.
3820         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
3821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
3822         __broadcast_seq field.
3823         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3824         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3825         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3826         * pthread_cond_init.c: Initialize __broadcast_seq field.
3827         * Makefile (tests): Add tst-cond17 and tst-cond18.
3828         Add .NOTPARALLEL goal.
3829         * tst-cond16.c: New file.  From Jakub.
3830         * tst-cond17.c: New file.  From Jakub.
3831         * tst-cond18.c: New file.  From Jakub.
3833 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
3835         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
3836         unwind info.
3838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3839         Parametrize frame size.  Correct some unwind info.
3840         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3842 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3844         * tst-stack3.c: Note testing functionality beyond POSIX.
3846 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3848         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
3849         Change conditional from ifdef to if.
3851 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
3853         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
3854         SYSDEP_CANCEL_ERROR): Define.
3855         (PSEUDO): Use it.
3857 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
3859         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
3861 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
3863         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
3865 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3867         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
3868         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3869         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
3870         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3872 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
3874         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
3875         thread has all signals blocked.
3877 2004-04-18  Andreas Jaeger  <aj@suse.de>
3879         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
3880         (SEM_VALUE_MAX): Add missing brace.
3882 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
3884         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
3885         in rt subdir.
3886         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
3887         * sysdeps/pthread/tst-mqueue8x.c: New test.
3888         * tst-cancel4.c: Update comment about message queues.
3890         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
3891         return it_value { 0, 0 }.
3892         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
3893         like SIGEV_SIGNAL.
3894         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
3895         assertion for SIGEV_NONE.
3896         (thread_attr_compare): Compare all attributes, not just a partial
3897         subset.
3899 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
3901         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
3903 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
3905         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
3906         Just use a plain number.
3907         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
3908         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3909         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3910         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3911         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3912         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3913         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3915 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3917         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
3918         frame info.
3919         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3921 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
3923         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
3924         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
3925         of calling sigwaitinfo.
3927 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
3929         * allocatestack.c (allocate_stack): Set reported_guardsize
3930         unconditionally.
3931         * pthread_getattr_np.c (pthread_getattr_np): Use
3932         reported_guardsize instead of guardsize.
3933         * descr.h (struct pthread): Add reported_guardsize field.
3935 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
3937         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
3939 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
3941         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
3943 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
3945         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
3946         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
3947         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
3948         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
3949         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3950         Define.
3951         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
3952         (_POSIX_MESSAGE_PASSING): Define.
3953         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
3954         (_POSIX_MESSAGE_PASSING): Define.
3955         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
3956         (_POSIX_MESSAGE_PASSING): Define.
3958 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
3960         * tst-context1.c (fct): Check whether correct stack is used.
3962 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
3964         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
3965         matching constraints for asm mem parameters.
3967         * tst-clock2.c (tf): Don't define unless needed.
3969 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
3971         * Makefile (link-libc-static): Use $(static-gnulib) instead of
3972         $(gnulib).
3974 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
3976         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
3977         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
3978         * pthreadP.h: Declare __nptl_deallocate_tsd.
3979         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
3980         Adjust caller.
3982         * Makefile (tests): Add tst-tsd5.
3983         * tst-tsd5.c: New file.
3985 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
3987         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3988         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
3989         is SHLIB_COMPAT check.
3990         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3991         (__pthread_attr_getaffinity_old): Likewise.
3992         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3993         (__pthread_getaffinity_old): Likewise.
3994         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3995         (__pthread_setaffinity_old): Likewise.
3997 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
3999         * allocatestack.c (_make_stacks_executable): Call
4000         _dl_make_stack_executable first.
4002 2004-03-24  Roland McGrath  <roland@redhat.com>
4004         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4005         constraint instead of "0".
4007 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4009         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4010         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4012         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4013         code to avoid warning.
4015 2004-03-24  Andreas Jaeger  <aj@suse.de>
4017         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4018         (__pthread_attr_setaffinity_old): Remove const.
4020 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4022         * sysdeps/unix/sysv/linux/smp.h: New file.
4023         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4024         * init.c: Define __is_smp.
4025         (__pthread_initialize_minimal_internal): Call is_smp_system to
4026         initialize __is_smp.
4027         * pthreadP.h: Declare __is_smp.
4028         Define MAX_ADAPTIVE_COUNT is necessary.
4029         * pthread_mutex_init.c: Add comment regarding __spins field.
4030         * pthread_mutex_lock.c: Implement adaptive mutex type.
4031         * pthread_mutex_timedlock.c: Likewise.
4032         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4033         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4034         Add __spins field.
4035         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4036         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4037         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4038         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4039         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4040         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4041         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4042         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4043         lll_mutex_cond_trylock.
4044         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4045         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4046         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4047         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4048         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4049         Define BUSY_WAIT_NOP.
4050         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4051         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4053         * tst-mutex5.c: Add support for testing adaptive mutexes.
4054         * tst-mutex7.c: Likewise.
4055         * tst-mutex5a.c: New file.
4056         * tst-mutex7a.c: New file.
4057         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4060         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4061         vgettimeofday call might destroy the content.
4063         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4064         @pause in the loop.
4066         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4067         No need to restrict type of ret.  Make it int.  Add comment.
4069         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4070         Remove unnecessary setne instruction.
4072 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4074         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4075         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4076         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4077         If realloc fails, break out of the loop.
4079 2004-03-20  Andreas Jaeger  <aj@suse.de>
4081         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4082         (__pthread_setaffinity_old): Fix interface.
4083         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4084         (__pthread_getaffinity_old): Likewise.
4086         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4087         (__pthread_setaffinity_new): Remove duplicate declaration.
4089 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4091         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4092         the return value to a safe register.
4093         (CDISABLE): Set the function argument correctly.
4095 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4097         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4098         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4099         Rewrite so that only one locked memory operation per round is needed.
4100         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4101         (pthread_barrier_wait): After wakeup, release lock only when the
4102         last thread stopped using the barrier object.
4103         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4104         (__pthread_cond_wait): Don't store mutex address if the current
4105         value is ~0l.  Add correct cleanup support and unwind info.
4106         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4107         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4108         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4109         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4110         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4111         Add correct cleanup support and unwind info.
4112         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4113         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4114         information for syscall wrappers.
4116 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4118         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4119         cpusetsize field, remove next.
4120         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4121         parameter for size of the CPU set.
4122         (pthread_setaffinity_np): Likewise.
4123         (pthread_attr_getaffinity_np): Likewise.
4124         (pthread_attr_setaffinity_np): Likewise.
4125         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4126         interface change, keep compatibility code.
4127         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4128         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4129         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4130         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4131         __pthread_getaffinity_np.
4132         * Versions: Add version for changed interfaces.
4133         * tst-attr3.c: Adjust test for interface change.
4134         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4135         increasing buffer sizes.
4136         * pthread_attr_destroy.c: Remove unused list handling.
4137         * pthread_attr_init.c: Likewise.
4139 2004-03-17  Roland McGrath  <roland@redhat.com>
4141         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4142         first argument to clock_getres so we ever enable kernel timers.
4144 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4146         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4148 2004-03-12  Richard Henderson  <rth@redhat.com>
4150         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4151         oldvalue from CENABLE to CDISABLE.
4153 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4155         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4156         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4157         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4158         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4160 2004-03-11  Richard Henderson  <rth@redhat.com>
4162         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4163         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4164         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4166 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4168         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4169         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4170         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4172 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4174         * forward.c (__pthread_cond_broadcast_2_0,
4175         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4176         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4177         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4179 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4181         * sysdeps/sh/tcb-offsets.sym: Add PID.
4182         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4183         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4185 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4187         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4188         include <sysdep-cancel.h>, vfork is no cancellation point.
4189         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4190         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4191         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4193 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4195         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4196         libc_hidden_def.
4197         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4198         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4199         Likewise.
4200         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4201         Likewise.
4202         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4203         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4204         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4205         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4206         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4208         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4209         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4210         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4211         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4212         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4213         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4215         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4216         a local register for saving old PID.  Negate PID in parent upon exit.
4218         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4219         tcb-offsets.h.
4220         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4221         before syscall, set to the old value in the parent afterwards.
4222         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4223         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4224         tcb-offsets.h.
4225         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4226         before syscall, set to the old value in the parent afterwards.
4227         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4228         * sysdeps/s390/tcb-offsets.sym: Add PID.
4230         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4231         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4232         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4233         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4234         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4235         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4237 2004-03-10  Andreas Schwab  <schwab@suse.de>
4239         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4240         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4241         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4243 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4245         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4246         * tst-cancel21.c (do_one_test): Likewise.
4247         Reported by Gordon Jin <gordon.jin@intel.com>.
4249 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4251         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4252         if non-zero and set to INT_MIN if zero.
4253         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4254         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4255         (SAVE_PID, RESTORE_PID): Define.
4256         (__vfork): Use it.
4257         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4258         Use relative path to avoid including NPTL i386/vfork.S.
4259         (SAVE_PID, RESTORE_PID): Define.
4260         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4261         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4262         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4263         tst-vfork2x.
4264         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4265         * tst-vfork1.c: New test.
4266         * tst-vfork2.c: New test.
4267         * tst-vfork1x.c: New test.
4268         * tst-vfork2x.c: New test.
4270 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4272         * sysdeps/i386/tcb-offsets.sym: Add PID.
4273         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4274         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4275         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4277 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4279         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4281 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4283         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4284         _rtld_global_ro.
4286 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4288         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4289         _rtld_global_ro.
4291         * tst-once4.c: Remove unnecessary macro definition.
4293         * tst-mutex7.c (do_test): Limit thread stack size.
4294         * tst-once2.c (do_test): Likewise.
4295         * tst-tls3.c (do_test): Likewise.
4296         * tst-tls1.c (do_test): Likewise.
4297         * tst-signal3.c (do_test): Likewise.
4298         * tst-kill6.c (do_test): Likewise.
4299         * tst-key4.c (do_test): Likewise.
4300         * tst-join4.c (do_test): Likewise.
4301         * tst-fork1.c (do_test): Likewise.
4302         * tst-context1.c (do_test): Likewise.
4303         * tst-cond2.c (do_test): Likewise.
4304         * tst-cond10.c (do_test): Likewise.
4305         * tst-clock2.c (do_test): Likewise.
4306         * tst-cancel10.c (do_test): Likewise.
4307         * tst-basic2.c (do_test): Likewise.
4308         * tst-barrier4.c (do_test): Likewise.
4310 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4312         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4314 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4317         (__pthread_cond_timedwait): Optimize wakeup test.
4318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4319         (__pthread_cond_wait): Likewise.
4320         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4321         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4322         Likewise.
4324 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4326         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4327         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4328         the atomic instruction needed.
4329         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4330         (__lll_mutex_lock_wait): Likewise.
4332 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4334         * Makefile (tests): Add tst-cond14 and tst-cond15.
4335         * tst-cond14.c: New file.
4336         * tst-cond15.c: New file.
4338 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4340         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4341         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4342         needs to be implemented differently to be useful.
4344 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4346         * pthread_attr_setschedparam.c: Don't test priority against limits
4347         here.  Set ATTR_FLAG_SCHED_SET flag.
4348         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4349         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4350         from parent thread to child.  If attribute is used and scheduling
4351         parameters are not inherited, copy parameters from attribute or
4352         compute them.  Check priority value.
4353         * pthread_getschedparam.c: If the parameters aren't known yet get
4354         them from the kernel.
4355         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4356         ATTR_FLAG_POLICY_SET flag for thread.
4357         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4358         and ATTR_FLAG_POLICY_SET.
4360         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4362         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4363         fail if stack address hasn't been set.  Just return 0.
4365 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4367         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4368         libpthread for the files in this list.
4369         (CFLAGS-tst-unload): Removed.
4370         * tst-unload.c (do_test): Don't use complete path for
4371         LIBPHREAD_SO.
4373         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4374         tst-_res1mod2.
4376 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4378         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4379         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4380         operation per round is needed.
4381         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4382         (__lll_mutex_lock_wait): Likewise.
4384 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4386         * tst-cancel9.c (cleanup): Don't print to stderr.
4388 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4390         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4392 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4394         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4395         (__syscall_error_handler2): Call CDISABLE.
4396         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4397         (__syscall_error_handler2): Call CDISABLE.
4399         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4400         Release lock before the loop, don't reacquire it.
4402         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4404 2004-02-19  Andreas Schwab  <schwab@suse.de>
4406         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4407         Fix last change.
4409 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4411         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4412         (pthread_barrier_wait): After wakeup, release lock only when the
4413         last thread stopped using the barrier object.
4414         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4415         (pthread_barrier_wait): Likewise.
4416         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4417         Likewise.
4418         * Makefile (tests): Add tst-barrier4.
4419         * tst-barrier4.c: New file.
4421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4422         (__pthread_cond_timedwait): Perform timeout test while holding
4423         internal lock to prevent wakeup race.
4424         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4425         * sysdeps/pthread/pthread_cond_timedwait.c
4426         (__pthread_cond_timedwait): Likewise.
4427         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4428         (__pthread_cond_timedwait): Likewise.
4430 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4433         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4434         * Makefile (tests): Add tst-rwlock13.
4435         * tst-rwlock13.c: New test.
4437 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4440         (__condvar_tw_cleanup): Little optimization.
4441         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4443 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4445         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4446         libpthread as "lib" parameter to SHLIB_COMPAT.
4447         (__novmx_siglongjmp): Fix typo in function name.
4448         (__novmx_longjmp): Fix typo in function name.
4450 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4452         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4453         __builtin_expect.
4455         * sysdeps/generic/pt-longjmp.c: Moved to...
4456         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4458 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4460         * Makefile (libpthread-routines): Add pt-cleanup.
4461         * pt-longjmp.c: Removed.
4462         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4463         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4464         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4465         Version longjmp, siglongjmp for GLIBC_2.3.4.
4466         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4468 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4470         * sysdeps/pthread/pthread_cond_timedwait.c
4471         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4472         Reuse code.  Add __builtin_expects.
4474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4475         (__pthread_cond_timedwait): Get internal lock in case timeout has
4476         passed before the futex syscall.
4477         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4479 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4481         * allocatestack.c: Pretty printing.
4483         * sysdeps/pthread/createthread.c (create_thread): Don't add
4484         CLONE_DETACHED bit if it is not necessary.
4486 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4488         * pthread_getattr_np.c: Include ldsodefs.h.
4490 2004-01-16  Richard Henderson  <rth@redhat.com>
4492         * allocatestack.c: Don't declare __libc_stack_end.
4493         * init.c (__pthread_initialize_minimal_internal): Likewise.
4494         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4496 2004-01-15  Richard Henderson  <rth@redhat.com>
4498         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4499         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4500         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4501         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4502         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4503         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4504         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4505         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4507 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4509         * init.c (pthread_functions): Make array const.
4511 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4513         * allocatestack.c (__make_stacks_executable): Change interface.
4514         Check parameters.  Pass parameter on to libc counterpart.
4515         * pthreadP.h: Change declaration.
4517 2004-01-13  Richard Henderson  <rth@redhat.com>
4519         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4520         prototype form.
4521         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4522         Likewise.
4524         * sysdeps/alpha/Makefile: New file.
4525         * sysdeps/alpha/tcb-offsets.sym: New file.
4526         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4527         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4529         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4530         on powerpc version.
4532 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4534         * Makefile (tests): Add tst-backtrace1.
4535         * tst-backtrace1.c: New test.
4537 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4539         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4540         register as second parameter to the REGISTER macro.
4541         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4542         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4543         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4544         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4545         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4546         of thread register as second parameter to REGISTER macro in 64 case.
4548 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4550         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4551         (CFLAGS-getpid.o): Defined.
4552         (CFLAGS-getpid.os): Defined.
4554 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4556         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4557         returned for main thread does not overlap with any other VMA.
4558         Patch by Jakub Jelinek.
4560 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4562         * tst-raise1.c: Include stdio.h.
4564 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4566         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4567         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4568         If pid is 0, set it to selftid.
4569         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4570         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4571         != 0, return self->tid without doing a syscall.
4572         * descr.h (struct pthread): Move pid field after tid.
4574         * Makefile (tests): Add tst-raise1.
4575         * tst-raise1.c: New file.
4577 2003-12-23  Roland McGrath  <roland@redhat.com>
4579         * tst-oddstacklimit.c: New file.
4580         * Makefile (tests): Add it.
4581         (tst-oddstacklimit-ENV): New variable.
4583         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4584         value up to page size for __default_stacksize.
4586 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4588         * Makefile (tests): Add tst-eintr5.
4589         * tst-eintr5.c: New file.
4591         * eintr.c (eintr_source): Prevent sending signal to self.
4593         * tst-eintr2.c (tf1): Improve error message.
4595 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4597         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4598         * sysdeps/unix/sysv/linux/getpid.c: New file.
4599         * pthread_cancel.c: Add comment explaining use of PID field.
4600         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4601         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4602         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4603         temporarily to signal the field must not be relied on and updated
4604         by getpid().
4605         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4606         temporarily negative.
4607         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4609 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4611         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4612         (eintr_source): If ARG != NULL, use pthread_kill.
4613         * tst-eintr1.c: Adjust for this change.
4614         * tst-eintr2.c: Likewise.
4615         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4616         * tst-eintr3.c: New file.
4617         * tst-eintr4.c: New file.
4619 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4621         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4622         if CANCELSTATE_BITMASK is set.
4623         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4624         Likewise.
4626         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4627         (tests-reverse): Add tst-cancel23.
4628         * tst-cancel22.c: New test.
4629         * tst-cancel23.c: New test.
4631 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
4633         * tst-eintr1.c: Better error messages.
4635         * Makefile (tests): Add tst-eintr2.
4636         * tst-eintr2.c: New file.
4638 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
4640         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4641         (CFLAGS-tst-cancelx21.c): Set.
4642         * tst-cancel21.c: New test.
4643         * tst-cancelx21.c: New test.
4645         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
4646         comparison operand.
4647         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4648         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
4649         * pt-longjmp.c: Include jmpbuf-unwind.h.
4650         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4651         _JMPBUF_UNWINDS.  Adjust compared pointers.
4652         * init.c (__pthread_initialize_minimal_internal): Initialize
4653         pd->stackblock_size.
4654         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4655         * sysdeps/alpha/jmpbuf-unwind.h: New file.
4656         * sysdeps/i386/jmpbuf-unwind.h: New file.
4657         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4658         * sysdeps/s390/jmpbuf-unwind.h: New file.
4659         * sysdeps/sh/jmpbuf-unwind.h: New file.
4660         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4661         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4662         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4663         (_JMPBUF_CFA_UNWINDS): Remove.
4664         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4666 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
4668         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4669         (CFLAGS-tst-cancelx20.c): Set.
4670         * tst-cancel20.c: New test.
4671         * tst-cancelx20.c: New test.
4673 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
4675         * init.c (__pthread_initialize_minimal_internal): Don't treat
4676         architectures with separate register stack special here when
4677         computing default stack size.
4679 2003-12-17  Roland McGrath  <roland@redhat.com>
4681         * Makefile (tst-cancelx7-ARGS): New variable.
4682         Reportd by Greg Schafer <gschafer@zip.com.au>.
4684 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
4686         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
4687         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4688         (tst-stack3-ENV): Set.
4689         ($(objpfx)tst-stack3-mem): New.
4690         * tst-stack3.c: New test.
4692 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
4694         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4695         Add unwind directives.  Drop unused .regstk directive.
4696         (_fini_EPILOG_BEGINS): Add unwind directives.
4698 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
4700         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4701         Assume parameter is a pointer.
4702         (lll_futex_wake): Likewise.
4703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4704         Likewise.
4705         (lll_futex_wake): Likewise.
4706         Reported by Boris Hu.
4707         * sysdeps/unix/sysv/linux/unregister-atfork.c
4708         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4710         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4712 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
4714         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4715         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4716         __rtld_lock_initialize for ld.so lock.
4717         Patch in part by Adam Li <adam.li@intel.com>.
4719 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
4721         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4722         in $(gnulib).  Also, remove stale comment.
4724 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
4726         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4727         advantage of new syscall stub and optimize accordingly.
4729         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4730         from SYS_futex, to match expectations of
4731         sysdep.h:DO_INLINE_SYSCALL.
4732         (lll_futex_clobbers): Remove.
4733         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4734         (lll_futex_wake): Likewise.
4735         (lll_futex_requeue): Likewise.
4736         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4737         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4738         Jelinek).
4739         (__lll_mutex_lock): Likewise.
4740         (__lll_mutex_cond_lock): Likewise.
4741         (__lll_mutex_timed_lock): Likewise.
4742         (__lll_mutex_unlock): Likewise.
4743         (__lll_mutex_unlock_force): Likewise.
4745         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4746         comes before the include of <sysdep.h>.
4747         (THREAD_SELF_SYSINFO): New macro.
4748         (THREAD_SYSINFO): Likewise.
4749         (INIT_SYSINFO): New macro.
4750         (TLS_INIT_TP): Call INIT_SYSINFO.
4752         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4754         * sysdeps/pthread/createthread.c (create_thread): Use
4755         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4756         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4757         THREAD_SELF_SYSINFO instead of open code.
4758         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4759         (THREAD_SYSINFO): Likewise.
4761         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4763         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4765 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
4767         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4768         instead of .init.  Patch by David Mosberger.
4770 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
4772         * sysdeps/pthread/configure.in: Remove broken declaration in C
4773         cleanup handling check.
4775 2003-11-30  Andreas Jaeger  <aj@suse.de>
4777         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4778         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4779         Likewise.
4781 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
4783         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4784         * pthread_attr_destroy.c: Include shlib-compat.h.
4785         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4786         is set in iattr->flags.
4787         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4789 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
4791         * Makefile (distribute): Add tst-cleanup4aux.c.
4793         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
4794         include.
4796 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
4798         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4799         pthread_cond_signal.
4801         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4802         store mutex address if the current value is ~0l.
4803         * sysdeps/pthread/pthread_cond_timedwait.c
4804         (__pthread_cond_timedwait): Likewise.
4805         * sysdeps/pthread/pthread_cond_broadcast.c
4806         (__pthread_cond_broadcast): Don't use requeue for pshared
4807         condvars.
4809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4810         (__pthread_cond_wait): Don't store mutex address if the current
4811         value is ~0l.
4812         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4813         (__pthread_cond_timedwait): Likewise.
4814         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4815         (__pthread_cond_broadcast): Don't use requeue for pshared
4816         condvars.
4818         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
4819         element with ~0l for pshared condvars, with NULL otherwise.
4821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4822         (__pthread_cond_wait): Don't store mutex address if the current
4823         value is ~0l.
4824         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4825         (__pthread_cond_timedwait): Likewise.
4826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4827         (__pthread_cond_broadcast): Don't use requeue for pshared
4828         condvars.
4830         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
4831         * tst-cond12.c: New file.
4832         * tst-cond13.c: New file.
4834 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
4836         * sysdeps/pthread/configure.in: Make missing forced unwind support
4837         fatal.
4839 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
4841         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
4843 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
4845         * Makefile: Add magic to clean up correctly.
4847 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
4849         * unwind.c (FRAME_LEFT): Define.
4850         (unwind_stop): Handle old style cleanups here.
4851         (__pthread_unwind): Handle old style cleanups only if
4852         !HAVE_FORCED_UNWIND.
4853         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
4854         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
4855         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
4856         ($(objpfx)tst-cleanupx4): Likewise.
4857         * tst-cleanup4.c: New test.
4858         * tst-cleanup4aux.c: New.
4859         * tst-cleanupx4.c: New test.
4861 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
4863         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
4864         lll_mutex_*lock macros to skip atomic operations on some archs.
4866 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
4868         * sysdeps/pthread/tst-timer.c (main): Initialize
4869         sigev2.sigev_value as well.
4871 2003-10-15  Roland McGrath  <roland@redhat.com>
4873         * sysdeps/pthread/configure.in: Barf if visibility attribute support
4874         is missing.
4875         * sysdeps/pthread/configure: Regenerated.
4877 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4879         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
4880         locking macros.  No distinction between normal and mutex locking
4881         anymore.
4882         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
4883         Merge bits from lowlevelmutex.S we still need.
4884         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
4885         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4886         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
4887         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
4888         new mutex implementation.
4889         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
4890         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4891         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4892         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4893         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4894         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4895         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4896         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4897         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4898         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
4899         symbol for entry point to avoid cancellation.
4901 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
4903         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
4904         changes.
4905         (SAVE_OLDTYPE_0): Fix a typo.
4907 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
4909         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4910         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
4912 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
4914         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
4915         correct offset.
4917 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
4919         * Makefile (tests): Add tst-cancel19.
4920         * tst-cancel19.c: New test.
4922 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
4924         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
4925         restoring of the old cancellation type.
4927 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
4929         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
4931 2003-09-27  Wolfram Gloger  <wg@malloc.de>
4933         * sysdeps/pthread/malloc-machine.h: New file
4935 2003-09-24  Roland McGrath  <roland@redhat.com>
4937         * allocatestack.c (__make_stacks_executable): Don't ignore return
4938         value from _dl_make_stack_executable.
4940 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
4942         * allocatestack.c (__make_stacks_executable): Also change
4943         permission of the currently unused stacks.
4945         * allocatestack.c (change_stack_perm): Split out from
4946         __make_stacks_executable.
4947         (allocate_stack): If the required permission changed between the time
4948         we started preparing the stack and queueing it, change the permission.
4949         (__make_stacks_executable): Call change_stack_perm.
4951         * Makefile: Build tst-execstack-mod locally.
4952         * tst-execstack-mod.c: New file.
4954 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
4956         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
4958 2003-09-23  Roland McGrath  <roland@redhat.com>
4960         * tst-execstack.c: New file.
4961         * Makefile (tests): Add it.
4962         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
4963         (LDFLAGS-tst-execstack): New variable.
4965         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
4966         whether to use PROT_EXEC for stack mmap.
4967         (__make_stacks_executable): New function.
4968         * pthreadP.h: Declare it.
4969         * init.c (__pthread_initialize_minimal_internal): Set
4970         GL(dl_make_stack_executable_hook) to that.
4972 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
4974         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
4975         recommendation from AMD re avoidance of lock prefix.
4977 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
4979         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
4980         lll_futex_timed_wait instead of lll_futex_wait.
4981         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
4982         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
4983         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
4984         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
4985         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
4986         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
4987         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
4988         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
4989         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
4990         Completely revamp the locking macros.  No distinction between
4991         normal and mutex locking anymore.
4992         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4993         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
4994         __lll_lock_timedwait): Fix prototypes.
4995         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
4996         __lll_lock_timedwait): Likewise.
4997         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
4998         macros, add __builtin_expect.
4999         (lll_mutex_timedlock): Likewise.  Fix return value.
5000         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5001         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5002         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5003         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5004         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5005         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5006         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5007         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5009 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5011         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5012         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5013         operation if possible.
5015         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5016         like jumping over the lock prefix.
5018 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5020         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5021         locking macros.  No distinction between normal and mutex locking
5022         anymore.
5023         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5024         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5025         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5026         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5027         locking.  Merge bits from lowlevelmutex.S we still need.
5028         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5029         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5030         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5031         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5032         * Makefile (routines): Remove libc-lowlevelmutex.
5033         (libpthread-rountines): Remove lowlevelmutex.
5034         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5035         for new mutex implementation.
5036         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5040         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5041         Likewise.
5042         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5043         Likewise.
5044         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5045         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5046         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5047         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5048         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5049         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5051         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5052         Likewise.
5053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5054         Likewise.
5055         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5056         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5058         Don't use requeue.
5059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5060         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5062 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5064         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5065         in parameters of asm with output parameters.
5067         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5068         type of DECR parameter to int.
5069         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5071 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5073         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5074         guardsize for each thread.
5076 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5078         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5079         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5080         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5082         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5083         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5084         NULL.
5085         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5086         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5087         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5088         (pthread_getaffinity_np): Add hidden_def.
5090         * Makefile (tests): Add tst-attr3.
5091         * tst-attr3.c: New test.
5093         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5095 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5097         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5098         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5100 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5102         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5103         * tst-align.c: Include tst-stack-align.h.
5104         (tf, do_test): Use TEST_STACK_ALIGN macro.
5106 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5108         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5109         variable.
5111 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5113         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5114         stack-related values for the initial thread.
5116 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5118         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5120 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5122         * pthread_mutex_lock.c: Minor code rearrangements.
5124 2003-09-05  Roland McGrath  <roland@redhat.com>
5126         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5127         Instead, include ../nptl_db/db_info.c to do its magic.
5128         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5129         (__pthread_pthread_key_2ndlevel_size): Likewise.
5130         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5131         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5132         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5133         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5134         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5135         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5136         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5137         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5138         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5139         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5140         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5141         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5142         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5143         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5144         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5145         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5146         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5148 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5150         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5151         of pthread_t to be compatible with LT.
5152         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5153         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5154         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5155         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5156         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5157         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5158         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5160 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5162         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5164 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5166         * unwind-forcedunwind.c: Move to...
5167         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5168         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5169         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5170         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5171         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5172         * unwind.c: Include jmpbuf-unwind.h.
5173         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5175 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5177         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5178         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5179         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5180         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5181         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5182         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5183         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5184         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5185         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5186         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5187         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5188         function.
5189         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5190         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5191         * Makefile (tests): Add tst-stack2.
5192         * tst-stack2.c: New test.
5193         * tst-stack1.c: Include limits.h and sys/param.h.
5194         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5196         * pthread_condattr_setpshared.c: Include errno.h.
5197         (pthread_condattr_setpshared): Return EINVAL if pshared
5198         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5200         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5201         defined symbol for entry point to avoid cancellation.
5202         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5203         Likewise.
5204         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5205         Likewise.
5206         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5207         Likewise.
5208         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5209         Likewise.
5210         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5211         Likewise.
5212         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5213         __close_nocancel, __read_nocancel, __write_nocancel,
5214         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5215         libpthread.so or librt.so, define to corresponding function
5216         without _nocancel suffix.
5217         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5218         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5219         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5221         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5223 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5225         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5226         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5228         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5229         in subsections has a symbol associated with it.
5231         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5232         defined symbol for entry point to avoid cancellation.
5233         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5235 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5237         * Makefile (tests): Add tst-tls5.
5238         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5239         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5240         ($(objpfx)tst-tls5): New.
5241         ($(objpfx)tst-tls6.out): Likewise.
5242         (tests): Depend on $(objpfx)tst-tls6.out.
5243         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5244         (do_test): Check pthread_self () return value alignment.
5245         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5246         (tf): Check pthread_self () return value alignment.
5247         * tst-tls5.c: New test.
5248         * tst-tls5.h: New.
5249         * tst-tls5mod.c: New.
5250         * tst-tls5moda.c: New.
5251         * tst-tls5modb.c: New.
5252         * tst-tls5modc.c: New.
5253         * tst-tls5modd.c: New.
5254         * tst-tls5mode.c: New.
5255         * tst-tls5modf.c: New.
5256         * tst-tls6.sh: New test.
5258         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5259         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5260         * init.c (pthread_functions): Initialize them.
5261         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5262         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5263         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5264         pthread_cond_timedwait@@GLIBC_2.3.2.
5266 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5268         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5269         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5270         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5271         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5272         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5273         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5275         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5277         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5278         _POSIX_THREAD_PRIORITY_SCHEDULING.
5279         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5281 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5283         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5284         nested function, use static inline function from libio.h.
5285         Code by Richard Henderson.
5287         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5288         weak.
5290 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5292         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5293         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5294         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5295         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5296         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5297         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5298         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5299         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5300         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5301         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5302         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5303         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5304         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5305         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5306         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5307         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5308         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5309         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5310         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5311         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5312         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5313         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5314         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5315         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5316         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5317         * sysdeps/sparc/tls.h: New file.
5318         * sysdeps/sparc/tcb-offsets.sym: New file.
5319         * sysdeps/sparc/Makefile: New file.
5320         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5321         * init.c [__sparc__] (__NR_set_tid_address): Define.
5323 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5325         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5326         _IO_release_lock): Define.
5328 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5330         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5331         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5333 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5335         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5336         (__pthread_cleanup_class): Add missing return types of member
5337         functions.
5339 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5341         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5342         (lll_mutex_unlock_force): Add memory barrier between store and futex
5343         syscall.
5345 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5347         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5348         tempmsg in first loop.
5350 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5352         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5353         _POSIX_THREAD_PRIORITY_SCHEDULING.
5354         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5356 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5358         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5359         (__rtld_lock_default_lock_recursive,
5360         __rtld_lock_default_unlock_recursive): Define.
5361         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5362         __rtld_lock_unlock_recursive): Define using
5363         GL(_dl_rtld_*lock_recursive).
5364         * init.c (__pthread_initialize_minimal_internal): Initialize
5365         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5366         Lock GL(_dl_load_lock) the same number of times as
5367         GL(_dl_load_lock) using non-mt implementation was nested.
5369         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5370         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5372 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5374         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5375         PIPE_BUF.
5377 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5379         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5381 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5383         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5384         to first syscall error check.  Move syscall error check for tkill
5385         into __ASSUME_CLONE_STOPPED #ifdef.
5387 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5389         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5390         is not defined, do explicit synchronization.
5391         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5392         is not defined also unlock pd->lock for non-debugging case in case
5393         it is necessary.
5394         * pthread_create.c (start_thread): Always get and release pd->lock
5395         if __ASSUME_CLONE_STOPPED is not defined.
5396         (start_thread_debug): Removed.  Adjust users.
5397         * allocatestack.c (allocate_stack): Always initialize lock if
5398         __ASSUME_CLONE_STOPPED is not defined.
5399         * Makefile (tests): Add tst-sched1.
5400         * tst-sched1.c: New file.
5402         * sysdeps/pthread/createthread.c (do_clone): Only use
5403         sched_setschduler and pass correct parameters.
5405 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5407         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5408         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5409         PTHREAD_STACK_MIN in comments.
5411 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5413         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5414         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5415         argument.
5416         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5417         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5418         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5419         (__pthread_cleanup_upto): Fix prototype.
5420         (_longjmp_unwind): Adjust caller.
5421         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5422         Change second argument to const struct pointer.
5423         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5424         * tst-sem9.c (main): Likewise.
5425         * unwind.c: Include string.h for strlen prototype.
5427 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5430         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5431         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5432         Define HAVE_CMOV.
5433         Patch by Nicholas Miell <nmiell@attbi.com>.
5435 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5437         * init.c (__pthread_initialize_minimal_internal): Initialize
5438         GL(dl_init_static_tls).
5439         * pthreadP.h (__pthread_init_static_tls): New prototype.
5440         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5441         New functions.
5442         * Makefile (tests): Add tst-tls4.
5443         (modules-names): Add tst-tls4moda and tst-tls4modb.
5444         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5445         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5446         tst-tls4modb.so.
5447         * tst-tls4.c: New file.
5448         * tst-tls4moda.c: New file.
5449         * tst-tls4modb.c: New file.
5451 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5453         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5454         before __timer_dealloc.
5455         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5456         Don't call list_unlink.
5458 2003-07-29  Roland McGrath  <roland@redhat.com>
5460         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5462 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5464         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
5465         if __need_struct_pthread_size, instead define lll_lock_t.
5467 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5469         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5470         Don't reuse struct aiocb A if it failed.
5471         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5472         not just one byte, as that does not block.
5474 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5476         * sysdeps/pthread/unwind-resume.c: New file.
5477         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5478         unwind-resume in csu subdir.
5479         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5480         exceptions.
5481         (librt-sysdep_routines, librt-shared-only-routines): Add
5482         rt-unwind-resume.
5483         * sysdeps/pthread/rt-unwind-resume.c: New file.
5484         * unwind-forcedunwind.c: New file.
5485         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5486         (libpthread-shared-only-routines): Likewise.
5487         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5488         * pthreadP.h (pthread_cancel_init): New prototype.
5489         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5491         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5492         attr argument const struct pthread_attr *.
5494         * res.c (__res_state): Return __resp.
5495         * descr.h: Include resolv.h.
5496         (struct pthread): Add res field.
5497         * pthread_create.c: Include resolv.h.
5498         (start_thread): Initialize __resp.
5499         * Makefile (tests): Add tst-_res1.
5500         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5501         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5502         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5503         libpthread.
5504         * tst-_res1.c: New file.
5505         * tst-_res1mod1.c: New file.
5506         * tst-_res1mod2.c: New file.
5508 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5510         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5512         * Makefile: Define various *-no-z-defs variables for test DSOs
5513         which has undefined symbols.
5515 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5517         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5518         Retry if the stwcx fails to store once_control.
5520 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5522         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5523         pthread_attr_setaffinity.
5524         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5525         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5526         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5527         * pthread_attr_destroy.c: Free cpuset element if allocated.
5528         * pthread_create.c: Pass iattr as additional parameter to
5529         create_thread.
5530         * sysdeps/pthread/createthread.c: If attribute is provided and
5531         a new thread is created with affinity set or scheduling parameters,
5532         start thread with CLONE_STOPPED.
5533         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5534         pthread_attr_setaffinity.
5535         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5536         cpuset element.
5538 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5540         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5542 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5544         * sysdeps/pthread/configure.in: Require CFI directives also for
5545         ppc and s390.
5547 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5549         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5550         Add cfi directives.
5552 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5554         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5555         CLEANUP_JMP_BUF.
5556         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5557         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5558         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5559         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5560         not self pointer in __writer.  Compare with TID to determine
5561         deadlocks.
5562         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5564         Likewise.
5565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5566         Likewise.
5567         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5568         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5569         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5570         macros also when compiling librt.
5572 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5574         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5575         -fasynchronous-unwind-tables.
5576         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5577         (PSEUDO): Add cfi directives.
5578         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5579         Likewise.
5580         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5581         Likewise.
5583 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5585         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5586         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5587         * unwind.c (__pthread_unwind_next): Add hidden_def.
5588         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5589         Likewise.
5590         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5591         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5592         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5593         Likewise.
5594         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5595         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5596         Likewise.
5597         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5598         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5599         __pthread_unregister_cancel and __pthread_unwind_next.
5601 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5603         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5604         different symbol for the cancellation syscall wrapper and
5605         non-cancellation syscall wrapper.
5606         (PSEUDO_END): Define.
5608 2003-07-05  Richard Henderson  <rth@redhat.com>
5610         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5611         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5612         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5613         return actual return value from the syscall, not 0.
5615 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5617         * descr.h (struct pthread): Add pid field.
5618         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5619         (__reclaim_stacks): Likewise.
5620         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5621         also check for PID of the signal source.
5622         (__pthread_initialize_minimal_internal): Also initialize pid field
5623         of initial thread's descriptor.
5624         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5625         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5626         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5627         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5628         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5630 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
5632         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5633         Fix use of parameter.
5634         (__libc_cleanup_pop): Likewise.
5636 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
5638         * init.c (sigcancel_handler): Change parameters to match handler
5639         for SA_SIGACTION.  Check signal number and code to recognize
5640         invalid invocations.
5642 2003-07-03  Roland McGrath  <roland@redhat.com>
5644         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5645         Apply sizeof (struct pthread) bias to r13 value.
5647 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
5649         * sysdeps/pthread/configure.in: Require CFI directives.
5651         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5652         definition.
5653         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5654         libpthread compilation.
5655         * unwind.c (__pthread_unwind): Add hidden_def.
5656         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5658 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5660         * libc-cancellation.c (__libc_cleanup_routine): Define.
5661         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5662         (__pthread_cleanup_pop): Define.
5664 2003-07-01  Richard Henderson  <rth@redhat.com>
5666         * sysdeps/alpha/elf/pt-initfini.c: New file.
5667         * sysdeps/alpha/pthread_spin_lock.S: New file.
5668         * sysdeps/alpha/pthread_spin_trylock.S: New file.
5669         * sysdeps/alpha/pthreaddef.h: New file.
5670         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5671         * sysdeps/alpha/tls.h: New file.
5672         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5673         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5674         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5675         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5676         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5677         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5678         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5679         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5680         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5681         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5683 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5685         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5686         cleanup support and unwind info.
5688 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
5690         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5691         Use correct cleanup handler registration.  Add unwind info.
5692         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5693         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5694         * tst-once3.c: Add cleanup handler and check it is called.
5695         * tst-once4.c: Likewise.
5696         * tst-oncex3.c: New file.
5697         * tst-oncex4.c: New file.
5698         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5700 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
5702         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5704 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
5706         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5707         (tf_msgsnd): Likewise.
5709         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5710         premature returns a bit more.
5712 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
5714         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5715         definition to the front.
5717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5718         the cleanup functions to make the names unique.  Fix dwarf opcode
5719         un unwind table.
5720         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5721         functions to make the names unique.  Fix CFA offset for two blocks.
5723 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
5725         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5726         missing closing braces.
5727         Patch by Christophe Saout <christophe@saout.de>.
5729 2003-06-24  Roland McGrath  <roland@redhat.com>
5731         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5733 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
5735         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5736         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5738         * pthreadP.h: Declare __find_thread_by_id.
5739         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5740         * pthread_clock_gettime.c: Allow using other thread's clock.
5741         * pthread_clock_settime.c: Likewise.
5742         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5743         * Makefile: Add rules to build and run tst-clock2.
5744         * tst-clock2.c: New file.
5746 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
5748         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5749         to use exception-based cleanup handler.
5750         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5752         * tst-cond8.c (ch): Announce that we are done.
5754         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5756         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5757         Also test aio_suspend with timeout value.
5759 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
5761         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5762         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5763         attribute_hidden.
5765         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5766         (__pthread_mutex_lock_internal): Likewise.
5767         (__pthread_mutex_unlock_internal): Likewise.
5768         (__pthread_mutex_unlock_usercnt): Declare.
5769         * pthread_mutex_destroy.c: Always fail if used in any way.
5770         * pthread_mutex_init.c: Update comment.
5771         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5772         * pthread_mutex_timedlock.c: Adjust __nusers.
5773         * pthread_mutex_trylock.c: Adjust __nusers.
5774         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5775         and public interfaces are wrapper with pass additional parameter.
5776         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5777         parameter zero.
5778         * tst-mutex8.c: New file.
5779         * Makefile (tests): Add tst-mutex8.
5780         * sysdeps/pthread/pthread_cond_timedwait.c: Call
5781         __pthread_mutex_unlock_usercnt.
5782         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5784         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5785         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5787         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5788         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5789         Add __nusers.
5790         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5791         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5792         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5793         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5794         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5796         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5797         * pthread_mutex_timedlock.c: Likewise.
5798         * pthread_mutex_trylock.c: Adjust __nusers.
5799         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5800         * tst-mutex9.c: New file.
5801         * Makefile (tests): Add tst-mutex9.
5802         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5803         * sysdeps/ia64/tls.h: Likewise.
5804         * sysdeps/powerpc/tls.h: Likewise.
5805         * sysdeps/s390/tls.h: Likewise.
5806         * sysdeps/sh/tls.h: Likewise.
5807         * sysdeps/x86_64/tls.h: Likewise.
5808         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5809         Change type of __owner.
5810         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5811         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5812         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5813         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5816 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
5818         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
5819         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
5821         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
5822         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
5823         instead of nr to lll_futex_wake.  Only set errno and return -1
5824         if err < 0.
5826         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
5827         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5828         return actual return value from the syscall, not 0.
5830 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
5832         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
5833         find a random value.
5834         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
5835         errno==EIDRM.
5837         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
5838         compat_timer_settime.
5839         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
5840         compat_timer_gettime.
5841         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
5842         compat_timer_getoverrun.
5843         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
5844         compat_timer_delete.
5846         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
5847         error-checking mutex detect busy mutexes.
5849 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
5851         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
5852         Add ax to clobber list.
5853         (lll_mutex_cond_lock): Likewise.
5854         (lll_mutex_unlock): Likewise.
5855         (lll_lock): Likewise.
5856         (lll_unlock): Likewise.
5858         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
5859         * tst-cancel18.c: New file.
5860         * tst-cancelx18.c: New file.
5862         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
5863         and tcdrain.
5865         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
5866         * tst-cancel17.c: New file.
5867         * tst-cancelx17.c: New file.
5869         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5870         * sysdeps/unix/sysv/linux/sigwait.c: New file.
5871         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5873         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
5875 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
5877         * sysdeps/pthread/createthread.c (create_thread): Set
5878         header.multiple_threads unconditionally.
5879         * allocatestack.c (allocate_stack): Likewise.
5880         * descr.h (struct pthread): Add header.multiple_threads
5881         unconditionally.
5882         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
5883         Define for librt.  #error if neither libpthread, libc nor librt.
5884         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
5885         Likewise.
5886         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
5887         CDISABLE): Likewise.
5888         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
5889         CDISABLE): Likewise.
5890         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
5891         CDISABLE): Likewise.
5892         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
5893         CDISABLE): Likewise.  Access header.multiple_threads outside of
5894         libc and libpthread.
5895         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
5896         Likewise.
5897         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
5898         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
5900 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
5902         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
5903         Also test early cancellation before the thread reaches the cancellation
5904         point.
5906         * Makefile: Compile forward.c with exceptions.
5908         * sysdeps/unix/sysv/linux/sleep.c: New file.
5910 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
5912         * Makefile: Add CFLAGS definition to compile function wrappers
5913         duplicated from libc with exceptions.
5914         * tst-cancel4.c: Also check cancellation handlers.
5916         * Makefile: Add rules to build and run tst-cancel16 and
5917         tst-cancelx16.  Add missing CFLAGS definitions.
5918         * tst-cancel16.c: New file.
5919         * tst-cancelx16.c: New file.
5921 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
5923         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5924         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
5925         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5926         (DL_SYSINFO_IMPLEMENTATION): Likewise.
5928         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
5929         (LIBC_CANCEL_RESET): Likewise.
5930         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
5931         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
5932         librt-cancellation.
5933         (CFLAGS-libcrt-cancellation.c): Define.
5934         * sysdeps/pthread/librt-cancellation.c: New file.
5935         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
5936         macros also when compiling librt.
5937         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5938         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5939         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5940         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5941         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5942         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5943         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5945         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
5946         compat_timer_create.
5948 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
5950         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
5952         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5953         __register_atfork.
5954         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
5955         Add libc_hidden_def.
5957 2003-06-13  Roland McGrath  <roland@redhat.com>
5959         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
5960         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
5962 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
5964         * allocatestack.c (queue_stack): Always inline.
5965         * ptreadhP.h (__do_cancel): Likewise.
5967 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
5969         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
5970         a typo.
5972 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
5974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5975         (__pthread_cond_signal): Remove incorrect second addition for
5976         cond_lock!=0.
5978 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
5980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5981         (__pthread_cond_signal): Use correct futex pointer in
5982         __lll_mutex_lock_wait call.
5984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5985         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
5987 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
5989         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
5990         cancelable.
5991         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
5992         Likewise.
5994         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
5995         hand-written CFI generation code.  Since ENTRY/END also initiated
5996         CFI frames this caused two CFI sets to be generated.
5998 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6000         * cleanup_routine.c: New file.
6001         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6002         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6003         cleanup handling.
6004         * Makefile (libpthread-routines): Add cleanup_routine.
6005         Add more CFLAGS variables to compile with exceptions.  Add comments
6006         why which file needs unwind tables.
6007         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6008         tests.
6009         * tst-cancelx1.c: New file.
6010         * tst-cancelx2.c: New file.
6011         * tst-cancelx3.c: New file.
6012         * tst-cancelx4.c: New file.
6013         * tst-cancelx5.c: New file.
6014         * tst-cancelx6.c: New file.
6015         * tst-cancelx7.c: New file.
6016         * tst-cancelx8.c: New file.
6017         * tst-cancelx9.c: New file.
6018         * tst-cancelx10.c: New file.
6019         * tst-cancelx11.c: New file.
6020         * tst-cancelx12.c: New file.
6021         * tst-cancelx13.c: New file.
6022         * tst-cancelx14.c: New file.
6023         * tst-cancelx15.c: New file.
6024         * tst-cleanupx0.c: New file.
6025         * tst-cleanupx0.expect: New file.
6026         * tst-cleanupx1.c: New file.
6027         * tst-cleanupx2.c: New file.
6028         * tst-cleanupx3.c: New file.
6030         * tst-cleanup0.c: Make standard compliant.
6031         * tst-cleanup1.c: Likewise.
6033         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6034         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6035         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6036         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6037         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6038         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6039         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6040         CLEANUP_JMP_BUF.
6041         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6042         * tst-cancel12.c: New file.
6043         * tst-cancel13.c: New file.
6044         * tst-cancel14.c: New file.
6045         * tst-cancel15.c: New file.
6046         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6047         and tst-cancel15.
6049         * tst-cancel1.c: Add some comments.
6051         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6052         timeout correctly.
6054 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6056         * Makefile (CFLAGS-pthread_cancel.c): Define.
6058 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6060         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6061         Change type of __writer element to int.
6062         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6063         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6064         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6065         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6066         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6067         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6068         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6069         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6070         Compare with TID to determine deadlocks.
6071         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6072         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6073         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6074         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6075         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6076         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6077         Likewise.
6078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6079         Likewise.
6080         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6081         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6082         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6083         Likewise.
6084         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6085         Likewise.
6086         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6087         * Makefile (tests): Add tst-rwlock12.
6088         * tst-rwlock12.c: New file.
6090 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6092         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6093         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6094         Remove bogus hidden_proto.
6095         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6096         Likewise.
6097         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6098         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6099         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6100         ___lll_mutex_timedlock): Likewise.
6102 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6105         (__pthread_cond_signal): Add some code to eventually handle
6106         cond_lock!=0.
6108 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6110         * Makefile (tests): Add tst-exec4.
6111         (tst-exec4-ARGS): Define.
6112         * tst-exec4.c: New file.
6114 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6116         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6117         Also fail if tv_nsec < 0.
6118         (__lll_timedwait_tid): Likewise.
6119         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6121         Likewise.
6122         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6123         Likewise.
6124         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6125         Likewise.
6126         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6127         Likewise.
6128         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6129         Likewise.
6130         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6131         Likewise.
6133         * Makefile (tests): Add tst-sem8 and tst-sem9.
6134         * tst-sem8.c: New file.
6135         * tst-sem9.c: New file.
6136         * sem_open.c: Fix creation of in_use record if the file exists but
6137         no internal record.
6139         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6140         definitions.
6142         * sysdeps/pthread/timer_create.c (timer_create): In case
6143         evp==NULL, assign timer ID to sival_ptr.
6145         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6146         struct pthread_unwind_buf *.
6147         (struct pthread): Likewise for cleanup_jmp_buf element.
6149         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6150         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6151         * unwind.c (__pthread_unwind_next): Likewise.
6153 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6155         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6156         (lll_futex_timed_wait): Use int for futex value parameter.
6157         (lll_futex_wake): Likewise.
6158         (lll_futex_requeue): Likewise.
6160         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6161         Replace one memory operation with one register operation.
6163         * tst-join4.c (do_test): Fix error message.
6165         * tst-rwlock6.c (do_test): Use correct format specifier.
6167         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6168         (__lll_mutex_lock_wait): Replace one memory operation with one
6169         register operation.
6170         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6171         (__lll_mutex_lock_wait): Likewise.
6173         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6174         (__lll_mutex_cond_lock): Add one to value parameter of
6175         __lll_lock_wait to reflect reality in the futex syscall.
6176         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6177         (lll_mutex_cond_lock): Likewise.
6179 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6181         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6182         New function.
6183         (lll_mutex_cond_lock): Define.
6185 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6187         * Makefile (tests): Add tst-signal6.
6188         * tst-signal6.c: New file.
6190         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6191         (__lll_mutex_unlock_force): New function
6192         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6194         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6195         (__lll_mutex_unlock_force): New function.
6196         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6198         * tst-rwlock7.c (do_test): Use correct format specifier.
6200         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6201         Find break parameter in correct asm argument.
6203 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6205         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6206         Remove out4.
6207         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6208         error occured.
6209         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6210         Add __mutex.
6211         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6212         lll_futex_requeue, lll_mutex_unlock_force): Define.
6214 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6216         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6217         (pthread_cond_t): Add __mutex.
6218         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6219         lll_futex_requeue, lll_mutex_unlock_force): Define.
6221 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6223         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6224         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6225         Add __mutex field.
6226         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6227         Define.
6228         (lll_futex_wait, lll_futex_wake): Define.
6229         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6230         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6231         FUTEX_REQUEUE instead of FUTEX_WAIT.
6232         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6233         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6234         mutex which was used in condvar structure.  Call
6235         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6236         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6238         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6239         include tcb-offsets.h.  Read wakeup value in locked region.
6240         Use the value of gbr register as THREAD_ID.
6241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6243         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6245         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6246         macros.
6248 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6250         * sysdeps/pthread/pthread_cond_broadcast.c
6251         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6253 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6256         typo in register name.
6257         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6258         correctly.  Actually use requeue.  Little optimization.
6259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6260         mutex address early.  Handle cancellation state as 32-bit value.
6261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6262         Remove unnecessary label.
6264 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6266         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6267         instead of FUTEX_WAIT.
6268         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6270         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6273         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6274         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6275         of __pthread_mutex_lock_internal.
6276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6277         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6278         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6279         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6282         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6283         Add pthread_mutex_cond_lock.
6284         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6285         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6286         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6287         lll_mutex_cond_lock.
6288         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6289         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6290         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6291         Add __mutex field.
6292         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6293         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6295         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6296         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6298         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6299         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6300         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6301         macro don't define aliases.
6303         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6304         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6305         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6306         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6307         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6308         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6309         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6313 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6315         * sem_open.c: Fix one endless loop.  Implement correct semantics
6316         wrt opening the same semaphore more then once.
6317         * sem_close.c: Adjust for sem_open change.
6318         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6319         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6320         * Makefile (tests): Add tst-sem7.
6321         * tst-sem7.c: New file.
6323 2003-05-16  Roland McGrath  <roland@redhat.com>
6325         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6326         uninitialized variable braino.
6328 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6330         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6331         test for syscall availability.
6333         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6334         __no_posix_timers to -1 if the syscalls don't exist.
6336         * pthread_join.c (pthread_join): Set tid field of the joined
6337         thread to -1.  This isn't necessary but helps to recognize some
6338         error conditions with almost no cost.
6340         * allocatestack.c (FREE_P): Also negative values indicate an
6341         unused stack.
6343         * unwind.c: Include <unistd.h>.
6345 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6347         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6349 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6351         * Makefile (crti-objs, crtn-objs): New variables.
6352         (omit-deps, extra-objs): Add crtn.
6353         ($(objpfx)libpthread.so): Depend on both crti and crtn
6354         and links to them in multidir.
6355         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6357 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6359         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6360         (lll_mutex_unlock): Use atomic_exchange_rel.
6362 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6364         * cond-perf.c (cons): Add missing locking around setting of alldone.
6366 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6368         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6369         related macros.
6370         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6372 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6374         * tst-sem6.c: New file.
6375         * Makefile (tests): Add tst-sem6.
6377         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6378         Use atomic_exchange_rel instead of atomic_exchange.
6379         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6380         Likewise.
6382         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6383         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6384         vsyscall is possible.
6386         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6387         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6388         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6389         pthread_setaffinity_np.
6390         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6391         and pthread_setaffinity_np.
6392         * Makefile (libpthread-routines): Add pthread_getaffinity and
6393         pthread_setaffinity.
6395         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6396         use it in case mmap to allocate the stack fails.
6397         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6398         ARCH_MAP_FLAGS here.
6399         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6400         ARCH_RETRY_MMAP.
6402 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6404         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6405         handler implementation.  It is now lockless in fork().
6406         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6407         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6408         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6409         declare the __fork_*_lists.
6410         (struct fork_handler): Include pointers to all three functions.
6411         Add next, refcntr and need_signal elements.
6412         (__fork_handlers): New declaration.
6413         (__register_atfork_malloc): Remove declaration.
6414         (HAVE_register_atfork_malloc): Remove definition.
6415         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6416         __pthread_child_handler variable.
6417         (__libc_pthread_init): Use __register_atfork instead of explicitly
6418         adding to the list.
6419         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6420         and lll_futex_wake.
6421         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6423         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6424         function must never be reached.
6426         * cond-perf.c: New file.
6428 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6430         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6432 2003-05-04  Roland McGrath  <roland@redhat.com>
6434         * Makefile ($(objpfx)../libc.so): New target.
6436 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6438         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6439         (pthread_condattr_t): Size is only an int, don't use long for
6440         alignment.
6441         (pthread_mutexattr_t): Likewise.
6442         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6443         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6444         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6446 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6448         * sysdeps/i386/tls.h: Define THREAD_ID.
6449         * sysdeps/ia64/tls.h: Likewise.
6450         * sysdeps/powerpc/tls.h: Likewise.
6451         * sysdeps/s390/tls.h: Likewise.
6452         * sysdeps/sh/tls.h: Likewise.
6453         * sysdeps/x86_64/tls.h: Likewise.
6454         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6455         record ownership.
6456         * pthread_mutex_timedlock.c: Likewise.
6457         * pthread_mutex_trylock.c: Likewise.
6458         * pthread_mutex_unlock.c: Likewise.
6459         * pthread_rwlock_trywrlock.c: Likewise.
6460         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6461         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6462         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6463         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6465         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6466         flag.
6468 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6470         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6471         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6472         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6473         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6474         Make __align long long instead of long.
6475         (pthread_rwlock_t): Formatting.
6476         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6477         (pthread_rwlock_t): Formatting.
6478         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6479         (pthread_cond_t): Make __align long long instead of long.
6480         (pthread_rwlock_t): Move __flags field to the same position as in
6481         linuxthreads.
6483 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6485         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6486         * tst-rwlock7.c (do_test): Likewise.
6488 2003-04-26  Roland McGrath  <roland@redhat.com>
6490         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6492 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6494         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6495         sizeof (struct pthread).
6496         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6497         1 struct pthread.
6498         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6499         to 0.
6500         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6501         struct pthread.
6502         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6503         to 32-bit bytes.
6504         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6505         tcbp.
6506         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6507         unneccessarily.
6508         (NO_TLS_OFFSET): Define.
6509         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6510         add TLS_TCB_SIZE unnecessarily.
6512 2003-04-22  Roland McGrath  <roland@redhat.com>
6514         * Makeconfig (shared-thread-library): Reverse link order to work
6515         around linker bug.
6517 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6519         * semaphore.h: Fix typo in comment.
6521 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6523         * sysdeps/pthread/sigfillset.c: New file.
6525         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6526         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6527         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6528         * sysdeps/pthread/sigaction.c: Likewise.
6529         * sysdeps/pthread/sigprocmask.c: New file.
6530         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6531         __SIGRTMIN+1.
6532         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6533         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6534         in this case.
6536 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6538         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6539         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6541         * sysdeps/unix/sysv/linux/unregister-atfork.c
6542         (__unregister_atfork): Don't free memory not allocated dynamically.
6544         * semaphore.h: Remove __THROW marker from cancellation points.
6545         * nptl/sysdeps/pthread/pthread.h: Likewise.
6547 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6549         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6550         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6551         __THROW.
6553 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6555         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6557 2003-04-15  Roland McGrath  <roland@redhat.com>
6559         * forward.c (__pthread_unwind): Tweak to avoid warning.
6561 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6563         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6565 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6567         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6568         overflow CFA advance instructions.
6569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6571 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6573         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6574         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6575         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6576         defined.
6578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6579         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6580         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6581         DW_CFA_advance_loc for .Laddl-.Lsubl.
6583 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6585         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6586         position-independent unwind data for static libraries.
6587         Add missing unwind info.  Add comments.
6589         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6590         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6594 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6596         * Makefile: Make sure all cancellation points are compiled with
6597         exception and asynchronous unwind tables.
6599         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6600         which mishandles loading of global object addresses in PIC.
6601         (THREAD_SETMEM_NC): Likewise.
6603 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6605         * pthread.h: Define new data structure for cleanup buffer.  Declare
6606         new cleanup handler interfaces.
6607         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6608         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6609         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6610         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6611         it.  Declare old cleanup handler installation functions.
6612         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6613         handling.
6614         * cleanup_defer.c: Likewise.
6615         * cleanup_compat.c: New file.  Old cleanup code.
6616         * cleanup_def_compat.c: New file.  Old cleanup code.
6617         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6618         if own thread descriptor.
6619         * unwind.c: New file.
6620         * forward.c: Add __pthread_unwind.
6621         * init.c (pthread_functions): Add __pthread_unwind.
6622         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6623         Add ptr___pthread_unwind.
6624         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6625         and unwind function.
6626         * Makefile (libpthread-routines): Add cleanup_compat,
6627         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6628         table generation if necessary.
6629         * version.c: Record whether unwind support is compiled in.
6630         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6631         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6632         handler interfaces.
6633         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6634         complication to generate unwind information for syscall wrappers.
6635         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6636         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6637         __cleanup_fct_attribute.
6639         * Makefile: Add rules to build and run tst-cleanup0.
6640         * tst-cleanup0.c: New file.
6641         * tst-cleanup0.expect: New file.
6643         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
6644         caller.  Optimize to avoid often unecessary local variable.
6646 2003-04-11  Roland McGrath  <roland@redhat.com>
6648         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6649         sets variable `multidir'; include that.
6650         (generated): Add it.
6651         ($(objpfx)$(multidir)/crti.o): New target.
6652         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6654 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6656         * tst-attr2.c (do_test): Add cast to avoid warning.
6657         * tst-mutex4.c (do_test): Likewise.
6659 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
6661         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6662         in child.
6664 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
6666         * Makefile (tests): Add tst-detach1.
6667         * tst-detach1.c: New file.
6669 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
6671         * sysdeps/pthread/pthread.h: Remove duplicate
6672         pthread_cleanup_{push,pop} definitions.
6674         * tst-barrier2.c: Eliminate warnings.
6675         * tst-cancel4.c: Likewise.
6676         * tst-cond4.c: Likewise.
6677         * tst-cond6.c: Likewise.
6678         * tst-detach1.c: Likewise.
6679         * tst-rwlock4.c: Likewise.
6680         * tst-rwlock6.c: Likewise.
6681         * tst-rwlock7.c: Likewise.
6682         * tst-sem3.c: Likewise.
6683         * tst-spin2.c: Likewise.
6684         * tst-umask1.c: Likewise.
6686 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
6688         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6690 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
6692         * descr.h (struct pthread): Move cancelhandling member to the front.
6694 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
6696         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6697         malloc_parent, and malloc_child statically.
6698         (__register_atfork_malloc): New function.
6699         (free_mem): Don't free any of the malloc_* variables on the list.
6700         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6701         Define HAVE_register_atfork_malloc.
6703 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
6705         * sysdeps/pthread/createthread.c (create_thread): Add some more
6706         comments explaining when to set multiple_threads and when not.
6708         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6709         THREAD_ATOMIC_BIT_SET if not already defined.
6710         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6711         THREAD_ATOMIC_BIT_SET:
6712         * sysdeps/x86_64/tls.h: Likewise.
6713         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6714         THREAD_ATOMIC_CMPXCHG_VAL.
6715         (_pthread_cleanup_pop_restore): Likewise.
6716         * cancellation.c (__pthread_enable_asynccancel): Likewise.
6717         (__pthread_enable_asynccancel_2): Likewise.
6718         (__pthread_disable_asynccancel): Likewise.
6719         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6720         (__libc_disable_asynccancel): Likewise.
6721         * init.c (sigcancel_handler): Likewise.
6722         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6723         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6725 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
6727         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6728         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6729         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6730         * Makefile (tests): Add tst-cancel11.
6731         * tst-cancel11.c: New file.
6733 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
6735         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6736         round, not the first.  Use specific_used flag instead of local
6737         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
6738         (__free_tcb): Don't call deallocate_tsd here.
6739         (start_thread): Call deallocate_tsd here.
6740         * pthread_setspecific.c: Set specific_used flag really only when
6741         needed.
6742         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6743         * tst-tsd3.c: New file.
6744         * tst-tsd4.c: New file.
6746 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6748         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6749         Use atomic_exchange_and_add instead of __lll_add.
6750         (__lll_mutex_timedlock): Likewise.
6751         Patch by Ian Wienand.
6753 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
6755         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6756         (SINGLE_THREAD_P): Fix typo.
6757         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6759 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6761         * Makefile (tests): Add tst-align.
6762         * tst-align.c: New file.
6763         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6765         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6766         function correctly.
6768         * tst-tsd2.c: Add casts to avoid warnings.
6770 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
6772         * descr.h (struct pthread): Move most often used elements to the front.
6774 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
6776         * Makefile (libpthread-routines): Add pthread_atfork.
6777         (libpthread-static-only-routines): Add pthread_atfork.
6779 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6781         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6782         of TLS_DTV_AT_TP.
6783         (INSTALL_DTV): Add parens.
6784         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6785         Use passed descr instead of THREAD_SELF.
6786         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6787         (__lll_mutex_timedlock_wait): Correct expected value after
6788         spurious wakeup.
6789         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6790         Release lock before waking up the waiters.
6791         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6792         criteria.  Reorderstruct passed to cleanup handler.  Fix
6793         handling of cancellation and failung pthread_mutex_unlock call.
6794         Use __pthread_enable_asynccancel_2 instead of
6795         __pthread_enable_asynccancel.
6796         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6797         Return result of lock re-get if it fails.
6798         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6799         for __pthread_cleanup_push.
6800         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6801         completely broken rwlock implementation.
6802         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6803         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6804         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6805         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6806         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6807         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
6808         versioned_symbol macro.
6809         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6810         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6812 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
6814         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
6815         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
6816         and __helper_tid.
6817         (struct timer): Remove th and bar field.
6818         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
6819         debugging code.  Create only one helper thread.
6820         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
6821         helper thread.
6822         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6823         Renamed.  Define statically.  Use thread info from siginfo.
6824         (__helper_once): New variable.
6825         (__helper_tid): New variable.
6826         (__reset_helper_control): New function.
6827         (__start_helper_thread): New function.
6829         * pthread_create.c (start_thread): Don't use setjmp inside
6830         __builtin_expect to work around gcc bug.
6832         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
6833         timer_delete syscall fails, but not with ENOSYS, set
6834         __no_posix_timers.
6836         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
6837         (timer_settime): Fix typo.
6838         * sysdeps/unix/sysv/linux/timer_getoverr.c
6839         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
6841 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
6843         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
6844         offset of cleanupbuf.__prev.
6846 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
6848         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
6849         of included file.
6851 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
6853         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
6854         NULL provide default definition to syscall.
6856 2003-03-25  Roland McGrath  <roland@redhat.com>
6858         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
6859         (timer_id2ptr): Fix typo.
6861 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
6863         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
6864         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
6865         * sysdeps/ia64/pthreaddef.h: Likewise.
6866         * sysdeps/powerpc/pthreaddef.h: Likewise.
6867         * sysdeps/s390/pthreaddef.h: Likewise.
6868         * sysdeps/sh/pthreaddef.h: Likewise.
6869         * sysdeps/x86_64/pthreaddef.h: Likewise.
6870         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
6871         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
6872         being changed.
6873         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6874         SIGTIMER is not unblocked.
6875         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
6876         RT signal taken.
6877         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
6878         be send.
6879         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
6880         pass pointer through as ID.
6881         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
6882         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
6883         * sysdeps/unix/sysv/linux/timer_create.c: New file.
6884         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
6885         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
6886         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
6887         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
6888         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
6889         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
6890         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
6891         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
6892         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
6893         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
6894         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
6895         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
6896         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
6897         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
6898         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
6899         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
6900         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
6901         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
6902         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
6903         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
6904         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
6905         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
6906         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
6907         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
6908         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
6909         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
6910         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
6911         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
6912         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
6913         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
6915         * pthreadP.h: Remove FRAME_LEFT definition.
6916         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
6917         already left frame.  Programs which have this problem are not POSIX
6918         compliant.
6919         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
6921 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
6923         * sysdeps/pthread/tst-timer.c: Check return values of the
6924         functions we test.
6926 2003-03-23  Roland McGrath  <roland@redhat.com>
6928         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
6929         * tst-tls3mod.c: Likewise.
6930         * tst-tls1.c: Likewise.
6931         * tst-tls2.c: Likewise.
6933         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
6934         undefined behavior.
6936         * tst-join5.c (tf1, tf2): Add a cast.
6938         * Makeconfig (includes): Append -I$(..)nptl to this variable.
6940         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
6941         Don't test anything.
6942         * tst-cond4.c: Likewise.
6943         * tst-cond6.c: Likewise.
6944         * tst-flock2.c: Likewise.
6945         * tst-mutex4.c: Likewise.
6946         * tst-rwlock4.c: Likewise.
6947         * tst-signal1.c: Likewise.
6948         * tst-spin2.c: Likewise.
6949         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
6951         * tst-mutex4.c: Use test-skeleton.c.
6952         * tst-spin2.c: Likewise.
6953         * tst-sysconf.c: Likewise.
6954         * tst-barrier2.c: Likewise.
6955         * tst-cond4.c: Likewise.
6956         * tst-cond6.c: Likewise.
6957         * tst-rwlock4.c: Likewise.
6958         * tst-unload.c: Likewise.
6959         * tst-flock2.c (do_test): Use return instead of exit.
6961 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
6963         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
6965 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
6967         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6968         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
6969         instead of __lll_compare_and_swap.
6970         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6971         Likewise.
6972         Removed definition if __lll_compare_and_swap.
6974         * cancellation.c: Adjust for new form of compare&exchange macros.
6975         * cleanup_defer.c: Likewise.
6976         * init.c: Likewise.
6977         * libc-cancellation.c: Likewise.
6978         * old_pthread_cond_broadcast.c: Likewise.
6979         * old_pthread_cond_signal.c: Likewise.
6980         * old_pthread_cond_timedwait.c: Likewise.
6981         * old_pthread_cond_wait.c: Likewise.
6982         * pthread_cancel.c: Likewise.
6983         * pthread_create.c: Likewise.
6984         * pthread_detach.c: Likewise.
6985         * pthread_join.c: Likewise.
6986         * pthread_key_delete.c: Likewise.
6987         * pthread_setcancelstate.c: Likewise.
6988         * pthread_setcanceltype.c: Likewise.
6989         * pthread_timedjoin.c: Likewise.
6990         * pthread_tryjoin.c: Likewise.
6991         * sysdeps/pthread/createthread.c: Likewise.
6993 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
6995         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
6996         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
6997         definitions.  Replace uses with calls to atomic_* functions.
6998         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6999         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7000         __lll_test_and_set calls with atomic_exchange_and_add and
7001         atomic_exchange calls respectively.
7002         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7003         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7004         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7005         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7006         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7007         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7008         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7010         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7011         returns the old value.
7013 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7015         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7016         int for variable OLDVAL and correct inline assembler contraint.
7017         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7018         type int for variable OLD.
7020         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7021         only for s390-32.
7022         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7023         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7024         instead of multiple_threads field in the TCB.
7026 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7028         * sysdeps/i386/i686/bits/atomic.h: Removed.
7029         * sysdeps/i386/i586/bits/atomic.h: Removed.
7030         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7031         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7032         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7033         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7034         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7035         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7036         * atomic.h: Removed.  Moved to glibc.
7038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7039         support for clock selection.
7041         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7042         signalling waiters.
7044 2003-03-18  Roland McGrath  <roland@redhat.com>
7046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7047         Add __lll_rel_instr first.  Add memory clobber.
7048         (lll_mutex_unlock): Use __lll_test_and_set.
7049         From Paul Mackerras <paulus@samba.org>.
7051         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7052         unconditionally.
7053         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7054         (SINGLE_THREAD_P):  Add `header.' prefix.
7055         From Paul Mackerras <paulus@samba.org>.
7057         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7058         pthread_timedjoin_np to ...
7059         (libpthread: GLIBC_2.3.3): ... here.
7060         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7062         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7063         Avoid shadowing VAL variable.
7065         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7066         New macro.
7068 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7070         * Makefile (tests): Add tst-cond11.
7071         * tst-cond11.c: New file.
7073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7074         struct passed to cleanup handler to eliminate one more
7075         instruction.
7076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7078         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7079         (pthrad_cond_t): Replace __unused field with __clock.
7081         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7082         waken all waiters in cleanup handler.
7083         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7086         * pthread_condattr_getclock.c: New file.
7087         * pthread_condattr_setclock.c: New file.
7088         * sysdeps/pthread/pthread.h: Declare these new functions.
7089         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7090         * Makefile (libpthread-routines): Add the new functions.
7091         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7092         Renamed field to value.  Document use of the bits.
7093         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7094         change.
7095         * pthread_condattr_setpshared.c: Likewise.
7096         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7097         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7098         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7099         Add __clock field.
7100         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7101         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7102         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7103         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7105         Implement clock selection.
7106         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7107         * pthread-errnos.sym: Add ENOSYS.
7108         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7109         _POSIX_CLOCK_SELECTION.
7110         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7113         invalid .size directive.
7115 2003-03-17  Roland McGrath  <roland@redhat.com>
7117         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7118         Formatting tweaks.
7120 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7122         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7123         Use __lll_add instead of spelling it out.  Use protected symbol names.
7124         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7125         Use __lll_add.
7126         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7127         Renamed from lll_compare_and_swap.  Use new name where necessary.
7128         (__lll_add): Defined.
7129         (__lll_dec_if_positive): Defined.
7130         (__lll_test_and_set): Defined.
7131         * sysdeps/ia64/pthread_spin_init.c: Removed.
7132         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7133         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7134         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7135         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7136         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7137         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7138         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7139         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7140         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7141         __sync_lock_release_si.
7142         Patch by Jakub Jelinek.
7144         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7145         Fix timeout handling.
7146         (__lll_timedwait_tid): Likewise.
7147         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7148         Patch by Jakub Jelinek.
7150         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7152 2003-03-17  Roland McGrath  <roland@redhat.com>
7154         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7155         * sysdeps/pthread/pthread_spin_init.c: New file.
7156         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7157         * sysdeps/powerpc/Makefile: New file.
7158         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7159         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7160         * sysdeps/powerpc/pthreaddef.h: New file.
7161         * sysdeps/powerpc/tcb-offsets.sym: New file.
7162         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7163         * sysdeps/powerpc/tls.h: New file.
7164         * sysdeps/powerpc/bits/atomic.h: New file.
7165         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7166         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7167         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7169         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7170         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7171         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7172         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7173         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7174         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7175         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7176         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7177         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7178         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7179         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7180         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7181         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7182         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7183         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7185         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7186         not gettimeofday.
7187         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7188         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7189         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7190         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7191         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7193 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7195         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7196         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7199         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7201 2003-03-16  Roland McGrath  <roland@redhat.com>
7203         * tst-fork4.c: Include <string.h>.
7204         * tst-signal2.c: Likewise.
7205         * tst-mutex5.c (do_test): exit -> return.
7206         * tst-mutex2.c: Include <stdlib.h>.
7208 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7210         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7211         (__lll_mutex_timedlock_wait): Correct expected value after
7212         spurious wakeup.  Otherwise we would never wait again.
7214         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7215         zone versus inline asm stupidity.  Use correct instructions.
7217         * tst-rwlock6.c: Add some more status output.
7219 2003-03-15  Roland McGrath  <roland@redhat.com>
7221         * sysdeps/pthread/configure.in: New file.
7222         * sysdeps/pthread/configure: New file (generated).
7224 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7226         * allocatestack.c (allocate_stack): Store the exact stack size of
7227         user allocated stacks.
7229 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7231         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7232         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7233         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7234         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7235         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7236         Use `header.' prefix.
7237         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7239 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7241         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7242         __builtin_frame_address, use stack pointer.
7244         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7245         instead of __builtin_frame_pointer.
7247 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7249         * tst-basic1.c (do_test): Add cast to avoid warning.
7250         * tst-basic2.c (do_test): Likewise.
7252         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7253         amount of stack correction.
7255         * tst-fork4.c: Use test-skeleton.c.
7257 2003-03-14  Roland McGrath  <roland@redhat.com>
7259         * init.c: Fix typo "#eli" for "#else".
7261 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7263         * allocatestack.c (__stack_user): Use hidden_data_def.
7264         * pthread_create.c (__pthread_keys): Likewise.
7266         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7268 2003-03-14  Roland McGrath  <roland@redhat.com>
7270         * tst-fork4.c: New file.
7271         * Makefile (tests): Add it.
7273         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7274         we always define the padding space.
7275         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7276         stopped supporting its own extensions fully.
7277         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7278         struct also called `header', so `header.multiple_threads' is the field
7279         name to use on all machines.
7280         * allocatestack.c (allocate_stack): Use `header.' prefix.
7281         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7282         * pthread_create.c (__pthread_create_2_1): Likewise.
7283         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7284         (THREAD_SELF): Likewise.
7285         * sysdeps/x86_64/tls.h: Likewise.
7286         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7287         (SINGLE_THREAD_P): Likewise.
7288         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7289         (SINGLE_THREAD_P): Likewise.
7290         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7291         (SINGLE_THREAD_P): Likewise.
7293         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7294         value directly.
7296 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7298         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7299         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7301         * pthread_create.c (start_thread): setjmp is expected to return 0.
7303         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7304         (THREAD_GETMEM_NC): Likewise.
7306 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7308         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7309         and the size of the stack which must be allocated is a multiple,
7310         allocate one more page.
7311         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7312         MULTI_PAGE_ALIASING.
7314 2003-03-13  Roland McGrath  <roland@redhat.com>
7316         * pthread_create.c (start_thread): Set EXITING_BIT after the
7317         event-reporting (and destructors), not before.
7319 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7321         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7322         lll_futex_wake): Declare register variables as long int instead of
7323         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7324         Make syscall arguments clobbered by the syscall.
7325         (lll_futex_wait): Define using lll_futex_timed_wait.
7327         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7328         to void *.
7330         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7331         PPID if [! NDEBUG].
7333         * allocatestack.c (nptl_ncreated): Only declare if
7334         COLORING_INCREMENT != 0.
7336         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7337         (__libc_enable_asynccancel_2): Remove prototype.
7339         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7340         ctid to match kernel.
7342 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7344         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7345         libc_multiple_threads.
7346         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7347         __libc_multiple_threads to...
7348         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7350         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7351         versioning.
7352         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7353         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7355         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7356         (__pthread_once_internal): Define.
7358         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7359         macros instead of .symver directly.
7360         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7361         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7363         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7364         * sysdeps/x86_64/tcb-offsets.sym: New file.
7365         * sysdeps/x86_64/Makefile: New file.
7367         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7368         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7369         to access own pthread_t in TCB.
7370         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7371         Likewise.
7372         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7373         Likewise.
7374         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7376 2003-03-12  Roland McGrath  <roland@redhat.com>
7378         * pthread-errnos.sym: New file.
7379         * Makefile (gen-as-const-headers): New variable, list that file.
7380         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7381         header <pthread-errnos.h> instead of defining errno values here.
7382         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7383         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7384         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7385         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7387         Likewise.
7388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7389         Likewise.
7390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7392         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7393         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7394         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7395         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7396         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7397         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7399         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7400         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7401         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7402         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7403         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7404         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7405         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7406         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7407         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7408         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7409         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7410         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7411         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7412         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7413         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7414         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7415         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7418         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7419         CLONE_CHILD_SETTID worked.
7421 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7423         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7424         file.
7425         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7426         file.
7428         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7429         (pthread_cond_t): Add padding.
7431         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7433         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7435         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7436         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7438         (__pthread_rwlock_timedrdlock): Likewise.
7439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7440         (__pthread_rwlock_wrlock): Likewise.
7441         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7442         (__pthread_rwlock_rdlock): Likewise.
7444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7447         result of lock re-get if it fails.
7449 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7451         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7452         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7453         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7456         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7457         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7458         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7459         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7460         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7462         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7463         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7465         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7466         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7467         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7468         (create_thread): Likewise.
7469         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7470         * init.c (__pthread_initialize_minimal_internal): Initialize
7471         __libc_multiple_threads_ptr if necessary.
7472         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7473         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7474         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7475         __libc_multiple_threads.
7476         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7477         necessary.
7479         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7480         (THREAD_SETMEM_NC): Likewise.
7482         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7483         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7484         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7485         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7487         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7488         Eliminate one entire instruction.
7490         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7491         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7493         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7494         instead of __pthread_enable_asynccancel.
7495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7496         (__pthread_cond_wait): Likewise.
7497         * sysdeps/pthread/pthread_cond_timedwait.c
7498         (__pthread_cond_timedwait): Likewise.
7499         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7501         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7502         (__condvar_cleanup): Wake up all waiters in case we got signaled
7503         after being woken up but before disabling asynchronous
7504         cancellation.
7505         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7506         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7507         (__condvar_cleanup): Likewise.
7509         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7510         Make it an error if architecture has no #if case.  Add x86-64.
7512         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7513         pt-initfini.s generation.
7515         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7516         (TLS_INIT_TP): Fix typo.
7518 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7520         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7521         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7523         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7524         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7525         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7526         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7527         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7528         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7529         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7530         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7532 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7534         * sysdeps/pthread/pthread_cond_timedwait.c
7535         (__pthread_cond_timedwait): Return the result of the final
7536         locking.  If it succeeds, the regular function return value.
7538         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7539         Return result of the final locking.
7540         * version.c (__nptl_main): Work around problems with the strange
7541         INTERNAL_SYSCALL macro on ppc32.
7542         * init.c (__pthread_initialize_minimal_internal): Unblock
7543         SIGCANCEL in case the parent blocked it.
7544         Reported by Paul Mackerras <paulus@samba.org>.
7546         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7547         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7548         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7550 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7552         * sysdeps/pthread/pthread_cond_timedwait.c
7553         (__pthread_cond_timedwait): Unlock and fail if
7554         __pthread_mutex_unlock_internal failed.
7556         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7557         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7558         Use ARCH_CLONE.
7559         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7560         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7561         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7562         ALLOCATE_STACK): New macros.
7563         (TLS_TPADJ): New macro.
7564         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7565         (allocate_stack): Handle TLS_DTV_AT_TP and
7566         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7567         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7568         Don't set PD->self.
7569         * init.c [__ia64__] (__NR_set_tid_address): Define.
7571         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7572         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7573         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7574         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7575         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7576         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7577         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7578         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7579         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7580         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7581         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7582         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7583         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7584         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7585         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7586         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7587         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7588         * sysdeps/ia64/bits/atomic.h: New file.
7589         * sysdeps/ia64/Makefile: New file.
7590         * sysdeps/ia64/pthread_spin_init.c: New file.
7591         * sysdeps/ia64/pthread_spin_lock.c: New file.
7592         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7593         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7594         * sysdeps/ia64/pthreaddef.h: New file.
7595         * sysdeps/ia64/tcb-offsets.sym: New file.
7596         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7597         * sysdeps/ia64/tls.h: New file.
7599         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7600         to syscall instead of no arguments.
7602 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7604         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7605         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7606         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7607         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7609         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7610         unused code.
7612         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7614         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7615         lowlevelbarrier.sym.
7616         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7617         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7618         Include lowlevelbarrier.h and don't define offsets locally.
7619         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7621         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7622         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7623         (__lll_mutex_timedlock_wait): Likewise.
7624         (lll_mutex_lock): Adjust asm for that.
7625         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7626         (lll_lock): Adjust asm for operand order change.
7627         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7628         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7631         Reverse order of parameters.
7632         (__lll_timedwait_tid): Remove regparms attribute.
7633         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7634         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7636         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7637         (__lll_timedwait_tid): Remove one unnecessary instruction.
7639         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7640         __lll_mutex_timedlock_wait only for NOT_IN_libc.
7641         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7642         lowlevelmutex.S.
7644         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7645         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7646         for NOT_IN_libc.
7647         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7648         lowlevellock.S.
7650         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7651         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
7652         for libc.so.
7653         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7654         define LOCK here (if UP is not defined).  The actual code is in
7655         lowlevelmutex.S.
7657         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7658         LOCK is already defined.  Don't define lll_unlock_wake_cb and
7659         __lll_timedwait_tid for libc.so.
7660         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7661         define LOCK here (if UP is not defined).  The actual code is in
7662         lowlevellock.S.
7664         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7665         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7666         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7667         instead of lowlevelsem.h.
7668         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7669         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7670         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7672         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7673         lowlevelrwlock.sym.
7674         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7675         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7676         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7678         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7679         register loading.
7680         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7681         last changed.  D'oh.
7683         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7685         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7686         of __libc_locking_needed.
7687         (lll_trylock): Initialize %eax to zero.
7689         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7690         pthread_cond_t definition.
7692 2003-03-10  Roland McGrath  <roland@redhat.com>
7694         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7695         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7696         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7697         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7698         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7700         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7701         Instead of setting PD->multiple_threads, set globals
7702         __pthread_multiple_threads and __libc_multiple_threads.
7703         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7704         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7705         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7707         * descr.h (struct pthread): Conditionalize first member on
7708         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
7709         containing an anonymous tcbhead_t.  Move `list' member out.
7710         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7711         * allocatestack.c: Remove use of `header.data.' prefix.
7712         * pthread_create.c: Likewise.
7713         * init.c (__pthread_initialize_minimal_internal): Likewise.
7714         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7715         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7716         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7717         * sysdeps/x86_64/tls.h: Likewise.
7718         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7719         (SINGLE_THREAD_P): Likewise.
7720         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7721         (SINGLE_THREAD_P): Likewise.
7722         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7723         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7725 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
7727         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7729         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7730         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7732         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7733         leftovers from the ia32 code.
7735         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7736         memory load.
7737         (clear_once_control): Don't load %esi.
7739         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7740         handling.
7742         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7744         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7745         * sysdeps/unix/sysv/linux/createthread.c: ...here.
7747         * Makefile (tests): Add tst-cond10.
7748         * tst-cond10.c: New file.
7750 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
7752         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7753         * tst-signal3.c (do_test): Likewise.
7754         * tst-sem5.c (do_test): Likewise.
7755         * tst-kill6.c (do_test): Likewise.
7756         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
7758         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7759         of inc/dec.
7760         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7761         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7762         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7763         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7764         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7767         Likewise.
7768         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7769         Likewise.
7770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7774         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7775         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7776         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7777         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7779         * allocatestack.c (allocate_stack): If mprotect() fails free the
7780         TLS memory.
7782 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
7784         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7786         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7787         lll_wake_tid.  This was used only to work around kernel limits in
7788         the early days.
7789         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7790         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7791         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7792         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7794         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7795         (__pthread_initialize_minimal_internal): Change initialization of
7796         __static_tls_align_m1 appropriately.
7797         * pthreadP.h (__static_tls_align_m1): Renamed from
7798         __static_tls_align.
7799         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7800         instead of __static_tls_align-1.
7802 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
7804         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7806         * pthread_create.c: Define __pthread_keys using nocommon
7807         attribute, not by placing it explicitly in bss.
7808         Remove DEFINE_DEALLOC definition.  Not needed anymore.
7810         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7811         Use it in mmap call to allocate stacks.
7813         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
7815         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
7816         result of the thread function.
7818 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
7820         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
7821         version is just fine.
7823         * sysdeps/unix/sysv/linux/libc_pthread_init.c
7824         (__pthread_child_handler): Renamed from pthread_child_handler,
7825         exported, and marked hidden.  Change all users.
7826         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
7827         free __pthread_child_handler from child list.
7829 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7831         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
7833         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7834         Fix handling of cancellation and failing pthread_mutex_unlock call.
7835         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7836         (__pthread_cond_wait): Likewise.
7838         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
7839         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
7840         lll_futex_timed_wait call.
7841         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7842         (pthread_rwlock_timedwrlock): Likewise.
7844         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7845         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
7846         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
7848         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
7849         check of lll_futex_wake return value.
7851 2003-03-03  Roland McGrath  <roland@redhat.com>
7853         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
7855         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7856         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
7857         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
7859 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
7861         * sysdeps/pthread/timer_create.c (timer_create): Return correct
7862         error for CPU clocks.
7864         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7865         _POSIX_MONOTONIC_CLOCK.
7866         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7868         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
7869         recent kernels.
7871 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
7873         * descr.h (struct pthread): Move cleanup field to the front.
7875 2003-03-01  Roland McGrath  <roland@redhat.com>
7877         * sem_open.c (sem_open): Braino fix.
7879 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
7881         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
7882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
7883         __pthread_cleanup_pop functionality.
7884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7886         * descr.h (struct pthread): Move tid field to the front now that
7887         it is often used.
7889         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
7890         (__lll_mutex_timedlock_wait): Remove.
7891         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7892         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7893         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7894         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7895         (lll_unlock_wake_cb): Don't save and restore %esi.
7896         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
7897         %esi.
7898         (__lll_timedwait_tid): Add alignment.
7899         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7900         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
7901         %esi.
7902         (__lll_timedwait_tid): Removed.
7903         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7904         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
7905         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7906         (pthread_barrier_wait): Don't save, load, and restore %esi for
7907         last thread.
7908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7909         (__pthread_cond_signal): Don't save, load, and restore %esi.
7910         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
7911         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
7912         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
7913         Don't save, load, and restore %esi.
7915 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
7917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
7918         Release lock before waking up the waiters.
7920         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
7922         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
7923         (reader_thread): Likewise.
7925         * sysdeps/pthread/pthread_rwlock_unlock.c
7926         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
7927         to wake up readers if there are none.
7929         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
7930         Release internal lock before wake threads.
7932 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
7934         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
7935         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
7936         predefined.
7937         * tst-rwlock9.c: Likewise.
7938         * tst-rwlock10.c: New file.
7939         * tst-rwlock11.c: New file.
7941         * Makefile (tests): Add tst-dlsym1.
7942         * tst-dlsym1.c: New file.
7944         * init.c (__pthread_initialize_minimal_internal): Set
7945         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
7946         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
7948 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
7950         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
7952         * tst-cond2.c: Fix sychronization with child.
7954         * tst-rwlock8.c (reader_thread): Remove unused variable.
7956         * Makefile: Add rules to build and run tst-tls3.
7957         * tst-tls3.c: New file.
7958         * tst-tls3mod.c: New file.
7960         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
7961         * tst-rwlock8.c: New file.
7962         * tst-rwlock9.c: New file.
7963         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
7964         complete broken rwlock implementation.
7965         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7966         Likewise.
7967         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7968         Likewise.
7969         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7970         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7971         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7972         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7973         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7974         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
7975         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7977 2003-02-23  Roland McGrath  <roland@redhat.com>
7979         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
7981 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
7983         * Makefile (tests): Add tst-context1.
7984         * tst-context1.c: New file.
7986         * Makefile (tests): Add tst-tls1 and tst-tls2.
7987         * tst-tls1.c: New file.
7988         * tst-tls2.c: New file.
7990         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
7991         for failed cmpxchg.
7993         * pthread_create.c (start_thread): Set EXITING_BIT early.
7995         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
7996         (THREAD_GETMEM_NC): Likewise.
7998 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8000         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8001         off 3 more bytes by using offset-less instructions when possible.
8003         * Makefile: Add dependency for $(objpfx)version.d.
8005         * eintr.c (eintr_source): Add unnecessary return but the compiler
8006         insists.
8008         * tst-kill3.c: Include <unistd.h>.
8010 2003-02-21  Roland McGrath  <roland@redhat.com>
8012         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8014 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8016         * Makefile (tests): Add tst-eintr1.
8017         (distribute): Add eintr.c.
8018         * tst-eintr1.c: New file.
8019         * eintr.c: New file.
8021         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8023         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8024         Disallow sending SIGCANCEL.
8026         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8027         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8028         * tst-kill1.c: New file.
8029         * tst-kill2.c: New file.
8030         * tst-kill3.c: New file.
8031         * tst-kill5.c: New file.
8032         * tst-kill6.c: New file.
8033         * tst-basic7.c: Renamed to...
8034         * tst-kill4.c: ...this.
8036 2003-02-21  Roland McGrath  <roland@redhat.com>
8038         * Makefile (install-lib-ldscripts): New variable.
8040 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8042         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8043         * pthread_cancel.c: Use INVALID_TD_P.
8044         * pthread_detach.c: Likewise.
8045         * pthread_getschedparam.c: Likewise.
8046         * pthread_setschedparam.c: Likewise.
8047         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8048         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8049         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8050         * pthread_timedjoin.c: Likewise.
8052         * tst-basic7.c: Include <signal.h>.
8054         * pthread_join.c (pthread_join): Limited checking for invalid
8055         descriptors.
8056         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8058 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8060         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8061         beginning of the loop.  Clear the entire first block of TSD.
8062         * Makefile (tests): Add tst-key4.
8063         * tst-key4.c: New file.
8065 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8067         * Makefile (tests): Add tst-basic7.
8068         * tst-basic7.c: New file.
8070         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8071         Add some more __builtin_expect.
8073         * pthreadP.h: Define dummy version of DEBUGGING_P.
8075 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8077         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8078         _POSIX_THREAD_PRIORITY_SCHEDULING.
8079         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8080         _XOPEN_REALTIME_THREADS.
8081         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8083         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8084         kernel returns EINVAL for PID <= 0, work around it.
8086         * Makefile (tests): Add tst-signal5.
8087         * tst-signal5.c: New file.
8089         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8090         and LOGIN_NAME_MAX.
8092         * tst-cancel1.c (tf): Block all signals.
8094         * Makefile (tests): Add tst-basic6.
8095         * tst-basic6.c: New file.
8097         * tst-basic1.c: Add test for process ID.
8099         * Makefile (tests): Add tst-cancel10.
8100         * tst-cancel10.c: New file.
8102         * Makefile (tests): Add tst-signal4.
8103         * tst-signal4.c: New file.
8105         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8106         __sigismember instead of sigismember.  Add __builtin_expect.
8108 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8110         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8111         pthread_setcancelstate, and pthread_rwlock_setpshared.
8113         * tst-cancel7.c (do_test): Make sure the pid file exists before
8114         canceling the thread.
8116         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8117         pthread_rwlock_timedrdlock tests.
8118         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8119         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8120         Check for invalid tv_nsec field.
8121         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8122         Likewise.
8124         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8125         recursive mutex of overflow.
8127         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8129         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8130         going into an endless loop.
8131         * Makefile (tests): Add tst-cancel9.
8132         * tst-cancel9.c: New file.
8134         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8136 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8138         * tst-mutex5.c (do_test): Add more timedlock tests.
8140         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8141         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8143         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8144         use INLINE_SYSCALL.  Error number is returned, not -1.
8146         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8147         and __deallocate_stack with internal_function.
8148         * pthread_create.c: Adjust definitions appropriately.
8149         * allocatestack.c: Likewise.
8151         * pthread_join.c: Add one more __builtin_expect.
8152         * pthread_timedjoin.c: Likewise.
8154         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8155         not data of sequence number does not match.
8156         Add one __builtin_expect.
8158         * Makefile (tests): Add tst-clock1.
8159         * tst-clock1.c: New file.
8161         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8162         negative arguments.
8163         * Makefile (tests): Add tst-basic5.
8164         * tst-basic5.c: New file.
8166 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8168         * Makefile (tests): Add tst-basic4.
8169         * tst-basic4.c: New file.
8171         * pthreadP.h: Add declaraction for __nptl_nthreads.
8172         * pthread_create.c: Define __nptl_nthreads
8173         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8174         after thread is done.  If then zero, call exit(0).
8175         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8176         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8177         * init.c (pthread_functions): Initialize ptr_nthreads.
8178         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8179         (__reclaim_stacks): Decrement __nptl_nthreads.
8180         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8181         Define.
8182         * Makefile (tests): Add tst-basic3.
8183         * tst-basic3.c: New file.
8185         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8186         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8187         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8188         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8189         if asynchronous canceling is enabled.
8190         * pthread_join.c (pthread_join): When recognizing circular joins,
8191         take into account the other thread might be already canceled.
8192         * Makefile (tests): Add tst-join5.
8193         * tst-join5.c: New file.
8195         * Makefile (tests): Add tst-join4.
8196         * tst-join4.c: New file.
8198 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8200         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8202 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8204         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8205         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8206         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8207         warning.
8208         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8209         to avoid warning.
8210         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8211         error if lll_futex_wake failed.
8213 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8215         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8216         handling of cancellation and failung pthread_mutex_unlock call.
8217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8218         * Makefile (tests): Add tst-cond8 and tst-cond9.
8219         * tst-cond8.c: New file.
8220         * tst-cond9.c: New file.
8222         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8224         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8225         non-standard initializers with __USE_GNU.
8227         * Makefile (tests): Add tst-cleanup3.
8228         * tst-cleanup3.c: New file.
8230 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8232         * Makefile (tests): Add tst-attr1 and tst-attr2.
8233         * tst-attr1.c: New file.
8234         * tst-attr2.c: New file.
8236         * Makefile: Add rules to build and run tst-atfork2 test.
8237         * tst-atfork2.c: New file.
8238         * tst-atfork2mod.c: New file.
8240         * sysdeps/unix/sysv/linux/unregister-atfork.c
8241         (__unregister_atfork): Free the memory allocated for the handlers
8242         after removing them from the lists.
8244         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8245         cleanup function.
8247         * tst-atfork1.c (do_test): Wait for the child we forked.
8248         Report error in child.
8250         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8252         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8254 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8256         * Makefile (tests): Add tst-cancel8.
8257         * tst-cancel8.c: New file.
8259         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8260         clearing of control variable.
8261         * Makefile (tests): Add tst-once3 and tst-once4.
8262         * tst-once3.c: New file.
8263         * tst-once4.c: New file.
8265 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8267         * sysdeps/sh/Makefile: New file.
8268         * sysdeps/sh/bits/atomic.h: New file.
8269         * sysdeps/sh/pthread_spin_init.c: New file.
8270         * sysdeps/sh/pthread_spin_lock.c: New file.
8271         * sysdeps/sh/pthread_spin_trylock.S: New file.
8272         * sysdeps/sh/pthread_spin_unlock.S: New file.
8273         * sysdeps/sh/pthreaddef.h: New file.
8274         * sysdeps/sh/tcb-offsets.sym: New file.
8275         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8276         * sysdeps/sh/tls.h: New file.
8277         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8278         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8279         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8280         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8281         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8282         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8283         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8284         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8285         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8286         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8287         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8288         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8289         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8290         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8291         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8292         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8293         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8294         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8295         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8296         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8297         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8299         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8300         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8302         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8303         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8304         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8305         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8306         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8308 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8310         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8311         according to POSIX.
8313         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8315 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8317         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8318         (TLS_GET_FS): New #define.
8319         (TLS_SET_FS): New #define.
8320         Correct value of __NR_set_thread_area.
8322         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8324 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8326         * Makefile (tests): Add tst-popen1.
8327         * tst-popen1.c: New file.
8329         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8330         but inactive generalization.
8331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8333         Minor optimization, remove one instruction.
8334         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8336 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8338         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8340 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8342         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8343         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8344         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8345         * sysdeps/pthread/pthread_cond_signal.c: New file.
8346         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8347         * sysdeps/pthread/pthread_cond_wait.c: New file.
8348         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8349         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8350         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8351         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8352         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8353         * sysdeps/s390/Makefile: New file.
8354         * sysdeps/s390/bits/atomic.h: New file.
8355         * sysdeps/s390/pthread_spin_init.c: New file.
8356         * sysdeps/s390/pthread_spin_lock.c: New file.
8357         * sysdeps/s390/pthread_spin_trylock.c: New file.
8358         * sysdeps/s390/pthread_spin_unlock.c: New file.
8359         * sysdeps/s390/pthreaddef.h: New file.
8360         * sysdeps/s390/tcb-offsets.sym: New file.
8361         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8362         * sysdeps/s390/tls.h: New file.
8363         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8364         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8365         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8366         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8367         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8368         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8369         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8370         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8371         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8372         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8373         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8374         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8375         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8376         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8377         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8378         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8379         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8380         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8381         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8382         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8383         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8384         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8385         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8387 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8389         * atomic.h: Add a couple more default implementations.
8390         (atomic_compare_and_exchange_acq): Use
8391         __arch_compare_and_exchange_32_acq in return value definition.  It
8392         always exists.
8393         (atomic_bit_set): Renamed from atomic_set_bit.
8394         Add missing atomic_ prefixes.
8396         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8397         thread library is available, use correct value to mark initialized
8398         once variable.
8400 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8402         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8403         __sysconf to determine pagesize.
8405         * pthread_create.c: Include <atomic.h>.
8406         * allocatestack.c (allocate_stack): Implement coloring of the
8407         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8408         size minus one.  Adjust users.
8409         * sysdeps/i386/i686/Makefile: New file.
8411 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8413         * allocatestack.c: Improve comment throughout the file.
8415         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8416         (__lll_lock_wait): Add branch prediction.
8417         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8418         (__lll_lock_wait): Likewise.
8419         (lll_unlock_wake_cb): Removed.
8421 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8423         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8424         _POSIX_THREAD_PRIORITY_SCHEDULING.
8426 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8428         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8429         Fix return type of ptr___pthread_getspecific.
8431 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8433         * Makefile (tests): Add tst-umask1.
8434         (tst-umask1-ARGS): Define.
8435         * tst-umask1.c: New file.
8437 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8439         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8440         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8441         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8442         pthread_rwlock_unlock.
8443         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8444         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8445         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8448         New file.
8449         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8450         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8451         New file.
8452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8453         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8454         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8455         New file.
8456         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8457         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8458         New file.
8459         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8460         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8461         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8462         New file.
8463         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8464         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8465         New file.
8466         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8468         * Makefile (libpthread-routines): Remove lowlevelcond and
8469         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8470         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8471         and pthread_cond_broadcast.
8472         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8473         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8474         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8475         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8476         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8477         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8478         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8479         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8480         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8481         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8486         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8487         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8488         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8489         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8490         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8491         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8492         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8493         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8494         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8495         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8496         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8497         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8498         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8499         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8500         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8501         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8502         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8504         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8505         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8506         of the code is moved to ...
8507         * sysdeps/pthread/createthread.c: ...here.  New file.
8509 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8511         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8512         (__new_sem_post): Clear %eax before returning.
8513         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8515         * Makefile (tests): Add tst-cleanup2.
8516         * tst-cleanup2.c: New file.
8518         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8519         Interpret first parameter correctly.
8521 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8523         * Makefile (headers): Add bits/semaphore.h.
8525 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8527         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8528         if not SHARED.
8530 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8532         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8533         must be used and mapping failed.
8534         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8536         * Makefile (CFLAGS-pthread_self.os): Define this, not
8537         CFLAGS-pthread_self.c.
8539 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8541         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8542         lll_unlock_wake_cb.
8544         * Makefile (libpthread-routines): Add version.  Add rules to build
8545         version.os and banner.h.
8546         * version.c: New file.
8548 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8550         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8551         the alias unconditional.
8552         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8554 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8556         * Makefile (CFLAGS-pthread_self.c): New definition.
8558 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8560         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8561         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8562         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8563         * init.c (__pthread_initialize_minimal_internal): Likewise.
8565 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8567         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8569         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8570         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8571         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8572         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8573         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8574         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8576 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8578         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8579         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8580         * tst-cancel-wrappers.sh: Remove all exceptions.
8582 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8584         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8585         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8587         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8588         Use __libc_pthread_functions array if SHARED.
8590         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8591         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8593         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8594         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8595         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8596         __libc_ptf_call instead of __libc_maybe_call.
8597         (PTF): New #define.
8598         (__libc_cleanup_region_start): Wrap function name with PTF call.
8599         (__libc_cleanup_region_end): Likewise.
8600         (__libc_cleanup_end): Likewise.
8602         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8603         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8604         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8605         * pthreadP.h: Add prototypes.
8607         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8608         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8609         __pthread_rwlock_unlock aliases.
8610         * pthreadP.h: Add prototypes for new aliases.
8612         * pthreadP.h (struct pthead_functions): Moved to...
8613         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8614         * init.c (pthread_functions): Add initializers for new elements.
8616         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8617         __pthread_cleanup_pop_restore aliases.
8618         * pthreadP.h: Add prototypes.
8620         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8621         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8622         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8623         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8624         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8625         * pthreadP.h: Adjust prototypes and callers.
8627 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
8629         * Makefile (tests): Add tst-cancel7.
8630         (tst-cancel7-ARGS): New variable.
8631         * tst-cancel7.c: New file.
8633         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8634         around gcc defficiencies.
8635         * old_pthread_cond_signal.c: Likewise.
8636         * old_pthread_cond_timedwait.c: Likewise.
8637         * old_pthread_cond_wait.c: Likewise.
8639         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8641 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8643         * Makefile (tests): Add tst-cond7.
8644         * tst-cond7.c: New file.
8646         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8647         (condvar_cleanup): Get condvar address from the right place.
8649         * atomic.h: Correct definitions of atomic_full_barrier,
8650         atomic_read_barrier, atomic_write_barrier.
8652         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8653         race-free.
8654         * old_pthread_cond_signal.c: Likewise.
8655         * old_pthread_cond_timedwait.c: Likewise.
8656         * old_pthread_cond_wait.c: Likewise.
8658 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
8660         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8662 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8664         * pthreadP.h (pthread_cond_2_0_t): New type.
8665         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8666         Use new type for the 2.0 condvar function prototypes.
8667         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8668         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8669         parameter.
8670         * old_pthread_cond_destroy.c: Likewise.
8671         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
8672         * old_pthread_cond_signal.c: Likewise.
8673         * old_pthread_cond_timedwait.c: Likewise.
8674         * old_pthread_cond_wait.c: Likewise.
8676         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8677         (__pthread_cond_wait): Don't save cancellation mode and seq value
8678         in same location.
8680         * herrno.c (__h_errno_location): Don't define as weak.
8682 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8684         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8685         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8686         and pthread_cond_wait.
8687         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8688         Renamed to...
8689         (__pthread_cond_broadcast_2_0): ... this.
8690         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8691         Renamed to...
8692         (__pthread_cond_destroy_2_0): ... this.
8693         * old_pthread_cond_init.c (__old_pthread_cond_init):
8694         Renamed to...
8695         (__pthread_cond_init_2_0): ... this.
8696         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8697         Renamed to...
8698         (__pthread_cond_signal_2_0): ... this.
8699         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8700         Renamed to...
8701         (__pthread_cond_wait_2_0): ... this.
8702         * pthread_cond_destroy.c: Include shlib-compat.h.
8703         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8704         * pthread_cond_init.c: Include shlib-compat.h.
8705         (pthread_cond_init): Change strong_alias into versioned_symbol.
8706         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8707         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8708         fields.
8709         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8710         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8711         __pthread_cond_wait_2_0): New prototypes.
8712         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8713         __old_pthread_cond_init, __old_pthread_cond_signal,
8714         __old_pthread_cond_wait): Removed.
8715         * init.c: Include shlib-compat.h.
8716         (pthread_functions): Guard ptr___pthread_attr_init_2_0
8717         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8718         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8719         ptr___pthread_cond_*_2_0 fields.
8720         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8721         pthread_cond_*@GLIBC_2.0 compatibility symbols.
8723         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8724         LIBC_SIGACTION was not yet defined.
8725         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8726         [!defined LIBC_SIGACTION] (__sigaction): New function and
8727         libc_hidden_weak.
8728         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8729         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8731 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8733         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8735 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
8737         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8738         New, larger type definition.
8739         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8740         implementation.
8741         * Versions [libpthread]: Add definitions for new pthread_cond_*
8742         interfaces for version GLIBC_2.3.2.
8743         * pthread_cond_init.c: Update initialization for new type definition.
8744         * Makefile (libpthread-routines): Remove pthread_cond_wait,
8745         pthread_cond_timedwait, pthread_cond_signal, and
8746         pthread_cond_broadcast.  Add old_pthread_cond_init,
8747         old_pthread_cond_destroy, old_pthread_cond_wait,
8748         old_pthread_cond_timedwait, old_pthread_cond_signal, and
8749         old_pthread_cond_broadcast.
8750         * old_pthread_cond_broadcast.c: New file.
8751         * old_pthread_cond_destroy.c: New file.
8752         * old_pthread_cond_init.c: New file.
8753         * old_pthread_cond_signal.c: New file.
8754         * old_pthread_cond_timedwait.c: New file.
8755         * old_pthread_cond_wait.c: New file.
8756         * pthreadP.h: Add prototypes for the compatibility interfaces.
8758         * pthread_cond_destroy.c: Don't include <errno.h>.
8760 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
8762         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8763         unnecessary zero offset when addressing MUTEX.
8765 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8767         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8768         __register_atfork.
8769         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8770         for __register_atfork.
8772 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8774         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8775         instead of ASSEMBLER test macro.
8777         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8778         __libc_current_sigrtmax): Add libc_hidden_def.
8780         * sysdeps/pthread/list.h: Remove assert.h include.
8782 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8784         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8785         __pthread_initialize_minimal_internal not
8786         __pthread_initialize_minimal.
8788 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
8790         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8791         __pthread_initialize_minimal as hidden.
8793         * init.c (__pthread_initialize_minimal_internal): Don't mark as
8794         constructor.
8796 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8798         * Makefile ($(inst_libdir)/libpthread.so): Depend on
8799         $(common-objpfx)format.lds, include that into the output script.
8800         Fix comment.
8801         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8803 2002-12-28  Andreas Jaeger  <aj@suse.de>
8805         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8806         nsec resolution changes.
8807         (xstat64_conv): Likewise.
8808         (xstat32_conv): Likewise.
8809         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8810         struct kernel_stat.
8811         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
8812         structs stat and stat64.
8813         * time/time.h (__timespec_defined): Define for __USE_MISC.
8814         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8816 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
8818         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
8819         argument.
8820         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
8821         (pthread_exit): Use strong_alias to avoid warnings.
8822         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
8823         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
8824         ptr___pthread_attr_init_2_*.
8825         * init.c (pthread_functions): Adjust.
8827 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
8829         * forward.c: Make all functions available by default again.  It
8830         caused too much trouble.
8832         * pt-siglongjmp.c: Removed.
8834 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
8836         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
8837         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
8838         * sysdeps/i386/Makefile: New file.
8839         * sysdeps/i386/tcb-offsets.sym: New file.
8840         * sysdeps/pthread/tcb-offsets.h: New file.
8841         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8842         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
8844         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
8845         __register_atfork...
8846         (GLIBC_2.3.2): ...here.
8848 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
8850         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
8851         pthread_attr_setstackaddr with __attribute_deprecated__.
8853 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
8855         * pt-system.c (system): Remove cancellation handling.
8856         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
8857         cancellation routines.
8859 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
8861         * descr.h: Include <dl-sysdep.h>.
8862         (struct pthread): Move header.data.list to the back of the struct.
8863         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
8864         (MULTIPLE_THREADS_OFFSET): Adjust offset.
8865         (SYSINFO_OFFSEET): Likewise.
8867 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
8869         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
8870         Define.
8871         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
8872         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
8873         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
8874         (USE_DL_SYSINFO): Undef.
8876 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
8878         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
8879         $(common-objpfx)libc.so.
8880         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
8881         it is bigger than pipe buffer size even on arches with bigger
8882         page size.
8883         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
8885 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
8887         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
8888         correct errno access for case that USE___THREAD is not defined.
8890 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
8892         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
8893         Patch by Marijn Ros <marijn@mad.scientist.com>.
8895 2002-12-22  Roland McGrath  <roland@redhat.com>
8897         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
8899 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
8901         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
8903 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
8905         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
8906         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
8907         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
8909         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
8910         of int $0x80.
8911         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8912         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
8913         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
8914         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8915         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8916         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
8917         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
8918         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8920         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
8921         sysenter.
8922         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8924         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
8926         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
8927         in new TCB.
8928         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
8929         that sysinfo is properly initialized.
8930         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
8931         to 1 only for ld.so.
8933         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
8934         RTLD_CORRECT_DYNAMIC_WEAK.
8936 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
8938         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
8939         Use return 0 as 6th argument to FORWARD4.
8940         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
8942 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
8944         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
8945         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
8946         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
8947         (INIT_SYSINFO): New #define.
8948         (TLS_TP_INIT): Use INIT_SYSINFO.
8949         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8950         At test to make sure SYSINFO_OFFSET value is correct.
8951         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
8953 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
8955         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
8956         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
8957         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
8958         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
8959         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
8960         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
8961         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
8963 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
8965         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
8966         macro instead of using int $0x80 directly.
8968         * sysdeps/pthread/bits/stdio-lock.h: New file.
8969         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
8970         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
8971         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
8972         * Makefile (routines): Add libc-lowlevelmutex.
8974         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
8975         __i686.get_pc_thunk.dx.
8977 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
8979         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
8980         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
8981         ($(objpfx)tst-cancel-wrappers.out): New rule.
8982         * tst-cancel-wrappers.sh: New test.
8983         * tst-locale1.c: Include signal.h.
8984         (uselocale): Test static linking of __libc_current_sigrt*.
8986 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
8988         * Makefile (tests): Add tst-cancel6.
8989         * tst-cancel6.c: New file
8991 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
8993         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
8994         Define meaningfully for assembler as well.
8995         * pthreadP.h (struct pthread_functions): Remove
8996         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
8997         and ptr_pthread_attr_init_2_1 fields.
8998         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
8999         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9000         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9001         (FORWARD3): Define using FORWARD4.
9002         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9003         versions.
9004         * pt-system.c: Remove duplicate stdlib.h include.
9006 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9008         * sem_init.c: Define sem_init@GLIBC_2.0.
9009         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9010         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9012         * flockfile.c: Moved to...
9013         * sysdeps/pthread/flockfile.c: ...here.  New file.
9014         * funlockfile.c: Moved to...
9015         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9016         * ftrylockfile.c: Moved to...
9017         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9019 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9021         * libc-cancellation.c: Guard both function with
9022         #if !defined NOT_IN_libc.
9023         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9024         automatically provided pthread wrappers.
9025         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9026         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9027         nor in libpthread.
9028         * pt-open.c: Removed.
9029         * pt-fcntl.c: Removed.
9030         * pt-fsync.c: Removed.
9031         * pt-lseek.c: Removed.
9032         * pt-msgrcv.c: Removed.
9033         * pt-msgsnd.c: Removed.
9034         * pt-msync.c: Removed.
9035         * pt-nanosleep.c: Removed.
9036         * pt-open64.c: Removed.
9037         * pt-pause.c: Removed.
9038         * pt-pread.c: Removed.
9039         * pt-pread64.c: Removed.
9040         * pt-pwrite.c: Removed.
9041         * pt-pwrite64.c: Removed.
9042         * pt-read.c: Removed.
9043         * pt-recv.c: Removed.
9044         * pt-recvfrom.c: Removed.
9045         * pt-recvmsg.c: Removed.
9046         * pt-send.c: Removed.
9047         * pt-sendto.c: Removed.
9048         * pt-sigtimedwait.c: Removed.
9049         * pt-sigwait.c: Removed.
9050         * pt-wait.c: Removed.
9051         * pt-waitpid.c: Removed.
9052         * pt-write.c: Removed.
9053         * pt-accept.c: Removed.
9054         * pt-close.c: Removed.
9055         * pt-connect.c: Removed.
9056         * pt-lseek64.c: Removed.
9057         * pt-sendmsg.c: Removed.
9058         * pt-tcdrain.c: Removed.
9060 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9062         * init.c (__pthread_initialize_minimal_internal): Renamed from
9063         __pthread_initialize_minimal.  Make old name an alias.  This
9064         converts a normal relocation into a relative relocation.
9066         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9068         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9069         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9070         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9071         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9072         pt-sigwaitinfo, pt-waitid, and pt-writev.
9073         * pt-creat.c: Removed.
9074         * pt-poll.c: Removed.
9075         * pt-pselect.c: Removed.
9076         * pt-readv.c: Removed.
9077         * pt-select.c: Removed.
9078         * pt-sigpause.c: Removed.
9079         * pt-sigsuspend.c: Removed.
9080         * pt-sigwaitinfo.c: Removed.
9081         * pt-waitid.c: Removed.
9082         * pt-writev.c: Removed.
9084         * init.c (pthread_functions): New variable.
9085         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9086         (or NULL) to __libc_pthread_init.
9087         * forward.c: Rewrite to use __libc:pthread_functions array to get
9088         function addresses.
9089         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9090         prototype.
9091         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9092         Take new parameter.  Copy content of variable pointed to by it
9093         to __libc_pthread_init.
9095         * pthreadP.h (struct pthread_functions): New type.
9096         (__libc_pthread_init): Declare.
9098         * pthread_attr_destroy.c: Add namespace protected alias.
9099         * pthread_attr_getdetachstate.c: Likewise.
9100         * pthread_attr_getinheritsched.c: Likewise.
9101         * pthread_attr_getschedparam.c: Likewise.
9102         * pthread_attr_getschedpolicy.c: Likewise.
9103         * pthread_attr_getscope.c: Likewise.
9104         * pthread_attr_setdetachstate.c: Likewise.
9105         * pthread_attr_setinheritsched.c: Likewise.
9106         * pthread_attr_setschedparam.c: Likewise.
9107         * pthread_attr_setschedpolicy.c: Likewise.
9108         * pthread_attr_setscope.c: Likewise.
9109         * pthread_cond_broadcast.c: Likewise.
9110         * pthread_cond_destroy.c: Likewise.
9111         * pthread_cond_init.c: Likewise.
9112         * pthread_cond_signal.c: Likewise.
9113         * pthread_cond_wait.c: Likewise.
9114         * pthread_condattr_destroy.c: Likewise.
9115         * pthread_condattr_init.c: Likewise.
9116         * pthread_equal.c: Likewise.
9117         * pthread_exit.c: Likewise.
9118         * pthread_getschedparam.c: Likewise.
9119         * pthread_self.c: Likewise.
9120         * pthread_setcancelstate.c: Likewise.
9121         * pthread_setschedparam.c: Likewise.
9122         * pthread_mutex_destroy.c: Likewise.
9123         * pthread_mutex_init.c: Likewise.
9124         * pthreadP.h: Add prototypes for the aliases.
9126         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9127         multiple_threads member in correct TCB to 1.
9129         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9130         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9131         member of thread decriptor, otherwise return unconditionally 1.
9133 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9135         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9136         regular Linux version.  Remove file.
9137         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9138         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9139         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9140         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9141         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9142         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9143         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9144         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9145         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9146         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9147         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9148         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9149         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9150         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9151         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9152         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9153         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9154         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9155         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9156         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9157         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9158         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9159         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9160         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9161         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9162         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9163         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9164         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9165         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9166         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9168 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9170         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9171         * sysdeps/unix/sysv/linux/open.c: Removed.
9172         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9173         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9174         * sysdeps/unix/sysv/linux/msync.c: Removed.
9175         * sysdeps/unix/sysv/linux/read.c: Removed.
9176         * sysdeps/unix/sysv/linux/close.c: Removed.
9177         * sysdeps/unix/sysv/linux/creat.c: Removed.
9178         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9179         * sysdeps/unix/sysv/linux/pause.c: Removed.
9180         * sysdeps/unix/sysv/linux/select.c: Removed.
9181         * sysdeps/unix/sysv/linux/write.c: Removed.
9183 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9185         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9186         element in TCB to see whether locking is needed.
9188         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9189         MULTIPLE_THREADS_OFFSET value is correct.
9191         * sysdeps/unix/sysv/linux/close.c: New file.
9192         * sysdeps/unix/sysv/linux/connect.S: New file.
9193         * sysdeps/unix/sysv/linux/creat.c: New file.
9194         * sysdeps/unix/sysv/linux/fsync.c: New file.
9195         * sysdeps/unix/sysv/linux/llseek.c: New file.
9196         * sysdeps/unix/sysv/linux/lseek.c: New file.
9197         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9198         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9199         * sysdeps/unix/sysv/linux/msync.c: New file.
9200         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9201         * sysdeps/unix/sysv/linux/open.c: New file.
9202         * sysdeps/unix/sysv/linux/open64.c: New file.
9203         * sysdeps/unix/sysv/linux/pause.c: New file.
9204         * sysdeps/unix/sysv/linux/poll.c: New file.
9205         * sysdeps/unix/sysv/linux/pread.c: New file.
9206         * sysdeps/unix/sysv/linux/pread64.c: New file.
9207         * sysdeps/unix/sysv/linux/pselect.c: New file.
9208         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9209         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9210         * sysdeps/unix/sysv/linux/readv.c: New file.
9211         * sysdeps/unix/sysv/linux/recv.S: New file.
9212         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9213         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9214         * sysdeps/unix/sysv/linux/select.c: New file.
9215         * sysdeps/unix/sysv/linux/send.S: New file.
9216         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9217         * sysdeps/unix/sysv/linux/sendto.S: New file.
9218         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9219         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9220         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9221         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9222         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9223         * sysdeps/unix/sysv/linux/system.c: New file.
9224         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9225         * sysdeps/unix/sysv/linux/wait.c: New file.
9226         * sysdeps/unix/sysv/linux/waitid.c: New file.
9227         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9228         * sysdeps/unix/sysv/linux/writev.c: New file.
9229         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9231         * pt-readv.c: Fix comment.
9233 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9235         * tst-cleanup1.c: Include stdlib.h.
9237         * tst-cancel5.c: New test.
9238         * Makefile (tests): Add tst-cancel5.
9239         (tst-cancel5): Link against libc.so libpthread.so in that order.
9241 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9243         * forward.c (test_loaded): Prevent recursive calls.
9245         * Makefile (routines): Add libc-cancellation.
9246         * libc-cancellation.c: New file.
9247         * descr.h (struct pthread): Add multiple_threads field.
9248         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9249         new thread descriptor to 1.
9250         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9251         Initialize multiple_thread field after successful thread creation.
9252         * cancellation.c (__do_cancel): Move to pthreadP.h.
9253         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9254         (__pthread_disable_asynccancel): Add internal_function attribute.
9255         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9256         * pthread_setcancelstate.c: Likewise.
9257         * pthread_setcanceltype.c: Likewise.
9258         * pthread_exit.c: Likewise.
9259         * pthreadP.h (CANCELLATION_P): Likewise.
9260         (__do_cancel): Define as static inline.
9261         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9262         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9263         declarations.
9264         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9265         fields.  Define MULTIPLE_THREADS_OFFSET.
9266         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9267         declaration.
9268         * sysdeps/unix/sysv/linux/accept.S: New file.
9269         * sysdeps/unix/sysv/linux/read.c: New file.
9270         * sysdeps/unix/sysv/linux/write.c: New file.
9271         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9272         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9273         initialization of __libc_locking_needed.
9274         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9275         __libc_locking_needed, use multiple_threads field in TCB.
9276         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9278 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9280         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9281         version.
9282         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9284         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9285         access to __libc_locking_needed for PIC.
9287 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9289         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9290         declare for libc.so.
9291         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9292         expression.
9293         (__libc_lock_lock): Put into statement expression.
9294         (__libc_lock_unlock): Remove trailing semicolon.
9295         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9297 2002-12-12  Roland McGrath  <roland@redhat.com>
9299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9300         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9302 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9304         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9305         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9306         Initialize __libc_locking_needed.
9307         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9308         instead of __register_pthread_fork_handler.
9309         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9310         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9311         fork-gen with libc_pthread_init.
9312         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9313         of __register_pthread_fork_handler.
9314         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9315         of __register_pthread_fork_handler.
9316         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9317         __libc_locking_needed to determine whether lock prefix can be avoided.
9318         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9320 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9322         * Makefile (tests): Add tst-cleanup1.
9323         * tst-cleanup1.c: New file.
9324         * cancellation.c (__cleanup_thread): Removed.
9325         (__do_cancel): Remove call to __cleanup_thread.
9326         * pthreadP.h: Remove __cleanup_thread prorotype.
9328         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9329         Remember function and argument even if cancellation handler
9330         function is not available.
9331         (__libc_cleanup_region_end): Execute registered function directly if
9332         pthread functions are not available.
9333         (__libc_cleanup_end): Likewise.
9335         * init.c (__pthread_initialize_minimal): Fix initialization in
9336         static lib by preventing gcc from being too clever.
9338 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9340         * init.c (__pthread_initialize_minimal): Remove unneccesary
9341         sigaddset call.
9343         * Makefile (tests): We can run tst-locale2 now.
9345 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9347         * Versions: Remove duplicated sigwait entry.
9349 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9351         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9352         inside libpthread.
9354         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9356         * pthreadP.h: Declare __pthread_enable_asynccancel and
9357         __pthread_disable_asynccancel.
9358         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9359         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9360         * cancellation.c (__pthread_enable_asynccancel): New function.
9361         (__pthread_disable_asynccancel): New function.
9362         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9363         * pt-close.c: Likewise.
9364         * pt-connect.c: Likewise.
9365         * pt-creat.c: Likewise.
9366         * pt-fcntl.c: Likewise.
9367         * pt-fsync.c: Likewise.
9368         * pt-lseek.c: Likewise.
9369         * pt-lseek64.c: Likewise.
9370         * pt-msgrcv.c: Likewise.
9371         * pt-msgsnd.c: Likewise.
9372         * pt-msync.c: Likewise.
9373         * pt-nanosleep.c: Likewise.
9374         * pt-open.c: Likewise.
9375         * pt-open64.c: Likewise.
9376         * pt-pause.c: Likewise.
9377         * pt-poll.c: Likewise.
9378         * pt-pread.c: Likewise.
9379         * pt-pread64.c: Likewise.
9380         * pt-pselect.c: Likewise.
9381         * pt-pwrite.c: Likewise.
9382         * pt-pwrite64.c: Likewise.
9383         * pt-read.c: Likewise.
9384         * pt-readv.c: Likewise.
9385         * pt-recv.c: Likewise.
9386         * pt-recvfrom.c: Likewise.
9387         * pt-recvmsg.c: Likewise.
9388         * pt-select.c: Likewise.
9389         * pt-send.c: Likewise.
9390         * pt-sendmsg.c: Likewise.
9391         * pt-sendto.c: Likewise.
9392         * pt-sigpause.c: Likewise.
9393         * pt-sigsuspend.c: Likewise.
9394         * pt-sigtimedwait.c: Likewise.
9395         * pt-sigwait.c: Likewise.
9396         * pt-sigwaitinfo.c: Likewise.
9397         * pt-system.c: Likewise.
9398         * pt-tcdrain.c: Likewise.
9399         * pt-wait.c: Likewise.
9400         * pt-waitid.c: Likewise.
9401         * pt-waitpid.c: Likewise.
9402         * pt-write.c: Likewise.
9403         * pt-writev.c: Likewise.
9404         * pthread_join.c: Likewise.
9405         * pthread_timedjoin.c: Likewise.
9407         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9408         (__xpg_sigpause): New function.
9409         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9411 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9413         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9415         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9416         _GI_pthread_cleanup_pop to pthreadP.h.
9418         * ftrylockfile.c: Use _IO_lock_trylock instead of
9419         pthread_mutex_trylock.
9421         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9422         (CANCEL_RESET): Likewise.
9423         (__pthread_setcanceltype_): Declare.
9424         (__pthread_mutex_lock_internal): Declare.
9425         (__pthread_mutex_unlock_internal): Declare.
9426         (__pthread_once_internal): Declare.
9427         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9428         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9430         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9431         and pthread_mutex_unlock.
9432         * pthread_cond_wait.c: Likewise.
9433         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9434         * pthread_mutex_unlock.c: Likewise.
9436         * pthread_setcanceltype.c: Add additional alias
9437         __pthread_setcanceltype.
9439         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9440         * sem_open.c (sem_open): Likewise.
9441         Use __libc_open, __libc_write, and __libc_close instead of
9442         open, write, and close respectively.
9444         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9445         Rewrite as statement expression since it must return a value.
9447         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9448         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9449         __pthread_kill.
9451         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9452         alias __pthread_once_internal.
9454         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9456 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9458         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9459         * tst-stdio1.c: New file.
9460         * tst-stdio2.c: New file.
9462         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9464         * Makefile (tests): Comment out tst-locale2 for now.
9465         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9467         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9468         -D_IO_MTSAFE_IO.
9469         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9470         Use _IO_lock_init instead of explicit assignment.
9472         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9473         Define __libc_lock_* and __libc_lock_recursive macros with
9474         lowlevellock macros, not pthread mutexes.
9476         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9477         of pthread_mutex_lock.
9478         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9479         instead of pthread_mutex_unlock.
9481 2002-12-06  Roland McGrath  <roland@redhat.com>
9483         * allocatestack.c (__stack_user): Use uninitialized defn.
9484         * init.c (__pthread_initialize_minimal): Initialize it here.
9486 2002-12-05  Roland McGrath  <roland@redhat.com>
9488         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9489         string.
9490         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9492         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9493         missing & here too.
9495 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9497         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9498         lowlevellock.
9499         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9500         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9501         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9502         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9503         for __libc_lock_* macros.
9504         * Makefile (routines): Add libc-lowlevellock.
9506 2002-10-09  Roland McGrath  <roland@redhat.com>
9508         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9509         Under [__PIC__], call the function via the pointer fetched for
9510         comparison rather than a call by name that uses the PLT.
9511         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9512         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9513         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9514         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9515         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9517 2002-12-04  Roland McGrath  <roland@redhat.com>
9519         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9521         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9522         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9524         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9526 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9528         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9529         a completely opaque, non-integer type.
9530         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9532 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9534         * sysdeps/i386/tls.h: Include stdlib.h.
9535         * sysdeps/x86_64/tls.h: Likewise.
9537 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9539         * Makefile (tests): Add tst-locale2.
9540         (tests-static): Likewise.
9541         * tst-locale2.c: New file.
9543         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9544         volatile and add memory clobbers to lock operations.
9546 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9548         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9549         * sysdeps/i386/i486/bits/atomic.h: New file.
9550         * sysdeps/i386/i586/bits/atomic.h: New file.
9551         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9552         include i486 version.
9553         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9554         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9555         Patch by Marijn Ros <marijn@mad.scientist.com>.
9557         * allocatestack.c (get_cached_stack): Don't crash if we first
9558         found a stack with a larger size then needed.
9559         Reported by Hui Huang <hui.huang@sun.com>.
9561         * Makefile (tests): Add tst-sysconf.
9562         * tst-sysconf.c: New file.
9564         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9565         PTHREAD_THREADS_MAX.
9567 2002-12-02  Roland McGrath  <roland@redhat.com>
9569         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9570         Declare using hidden_proto instead of attribute_hidden, so there are
9571         non-.hidden static symbols for gdb to find.
9572         (__pthread_keys): Likewise.
9573         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9574         * allocatestack.c (__stack_user): Likewise.
9575         * pthread_create.c (__pthread_keys): Likewise.
9576         (__nptl_threads_events, __nptl_last_event): Make these static instead
9577         of hidden.
9578         * pthread_key_create.c (__pthread_pthread_keys_max,
9579         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9581 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9583         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9584         statically.
9585         * tst-locale1.c: New file.
9587         * pthread_cond_timedwait.c: Include <stdlib.h>.
9589         * Makefile (tests): Add tst-fork2 and tst-fork3.
9590         * tst-fork2.c: New file.
9591         * tst-fork3.c: New file.
9593 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9595         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9597         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9598         require it to 200112L.
9600         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9601         instruction only if HAVE_CMOV is defined.
9602         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9604         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9606         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9608         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9610         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9612 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9614         * sysdeps/x86_64/bits/atomic.h: New file.
9616         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9617         16-bit operations.
9619         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9620         possible since gettid cannot fail.
9622         * sysdeps/x86_64/pthreaddef.h: New file.
9624         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9626         * sysdeps/x86_64/pthread_spin_init.c: New file.
9627         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9628         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9629         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9631         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9632         Add missing lock prefix.  Minute optimization.
9634         * tst-spin2.c (main): Also check successful trylock call.
9636         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9637         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
9639         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9640         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
9642         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
9643         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9644         value in case of an error.  Add support for INTERNAL_SYSCALL.
9646         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9647         value in case of an error.
9649         * sysdeps/x86_64/tls.h: New file.
9651 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9653         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
9654         takes the array member name and the index as parameters.
9655         (THREAD_SETMEM_NC): Likewise.
9656         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9657         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9658         interfaces.
9660         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9661         to decide which code to use.
9662         (THREAD_SETMEM_NC): Likewise.
9664         * allocatestack.c (queue_stack): Don't remove stack from list here.
9665         Do it in the caller.  Correct condition to prematurely terminate
9666         loop to free stacks.
9667         (__deallocate_stack): Remove stack from list here.
9669 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9671         * Makefile (tests): Add tst-stack1.
9672         * tst-stack1.c: New file.
9674         * allocatestack.c (allocate_stack): Initialize the TCB on a user
9675         provided stack.
9677         * pthread_attr_getstack.c: Return bottom of the thread area.
9679 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
9681         * Makefile (libpthread-routines): Add pt-allocrtsig and
9682         pthread_kill_other_threads.
9683         * pt-allocrtsig.c: New file.
9684         * pthread_kill_other_threads.c: New file.
9685         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9686         all three functions.
9687         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9688         allocrtsig.
9689         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9690         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9691         and __libc_allocate_rtsig_private.
9692         * Versions (libpthread): Export pthread_kill_other_threads_np,
9693         __libc_current_sigrtmin, and __libc_current_sigrtmax.
9695 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
9697         * allocatestack.c (allocate_stack): stackaddr in attribute points to
9698         the end of the stack.  Adjust computations.
9699         When mprotect call fails dequeue stack and free it.
9700         * pthread_attr_setstack.c: Store top of the stack in stackaddr
9701         attribute.
9702         * pthread_getattr_np.c: Likewise.
9704         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9705         surprises.
9707 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
9709         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9710         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9712 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
9714         * pthread_getspecific.c: Optimize access to first 2nd-level array.
9715         * pthread_setspecific.c: Likewise.
9717 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
9719         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9720         definitions.  Get them from the official place.
9721         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9723         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9724         Use new CLONE_ flags in clone() calls.
9726         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9727         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9729         * Versions: Add pthread_* functions for libc.
9730         * forward.c: New file.
9732         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9733         errno-loc.
9734         * herrno.c: New file.
9735         * res.c: New file.
9737         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9738         sem_trywait, and sem_timedwait.  Add herrno and res.
9739         * sem_init.c: Don't initialize lock and waiters members.
9740         * sem_open.c: Likewise.
9741         * sem_post.c: Removed.
9742         * sem_wait.c: Removed.
9743         * sem_trywait.c: Removed.
9744         * sem_timedwait.c: Removed.
9745         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9746         Includes full implementations of sem_post, sem_wait, sem_trywait,
9747         and sem_timedwait.
9748         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9749         for new implementation.
9750         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9751         and waiters fields.
9753         * tst-sem3.c: Improve error message.
9754         * tst-signal3.c: Likewise.
9756         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9757         to tell the kernel about the termination futex and to initialize tid
9758         member.  Don't initialize main_thread.
9759         * descr.h (struct pthread): Remove main_thread member.
9760         * cancelllation.c (__do_cancel): Remove code handling main thread.
9761         The main thread is not special anymore.
9763         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
9764         size of the stacks to stack_cache_actsize.
9766         * pt-readv.c: Add missing "defined".
9767         * pt-sigwait.c: Likewise.
9768         * pt-writev.c: Likewise.
9770 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
9772         * Versions: Export __connect from libpthread.
9773         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9775         * Makefile (libpthread-routines): Add pt-raise.
9776         * sysdeps/unix/sysv/linux/raise.c: New file.
9777         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9778         * sysdeps/generic/pt-raise.c: New file.
9780         * pthread_cond_init.c: Initialize all data elements of the condvar
9781         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9783         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9784         * pthread_create.c: Likewise.
9786         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9787         * tst-key1.c: New file.
9788         * tst-key2.c: New file.
9789         * tst-key3.c: New file.
9791         * Versions: Export pthread_detach for version GLIBC_2.0.
9792         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9794 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
9796         * pthread_key_create.c: Terminate search after an unused key was found.
9797         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9799         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9800         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9802 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
9804         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9805         dynamic lookup for errno in PIC.
9807         * allocatestack.c (get_cached_stack): Rearrange code slightly to
9808         release the stack lock as soon as possible.
9809         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9810         the static TLS block.
9811         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
9813         * cancellation.c: Renamed from cancelation.c.
9814         * Makefile: Adjust accordingly.
9815         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
9816         * cleanup_defer.c: Use CANCELLATION_P.
9817         * pthread_testcancel.c: Likewise.
9818         * descr.h: Fix spelling in comments.
9819         * init.c: Likewise.
9820         * pthread_getattr_np.c: Likewise.
9821         * pthread_getschedparam.c: Likewise.
9822         * pthread_setschedparam.c: Likewise.
9823         * Versions: Likewise.
9825         * pt-pselect.c: New file.
9826         * Makefile (libpthread-routines): Add pt-pselect.
9827         * Versions: Add pselect.
9829         * tst-cancel4.c: New file.
9830         * Makefile (tests): Add tst-cancel4.
9832 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
9834         * pthread_mutex_lock.c: Always record lock ownership.
9835         * pthread_mutex_timedlock.c: Likewise.
9836         * pthread_mutex_trylock.c: Likewise.
9838         * pt-readv.c: New file.
9839         * pt-writev.c: New file.
9840         * pt-creat.c: New file.
9841         * pt-msgrcv.c: New file.
9842         * pt-msgsnd.c: New file.
9843         * pt-poll.c: New file.
9844         * pt-select.c: New file.
9845         * pt-sigpause.c: New file.
9846         * pt-sigsuspend.c: New file.
9847         * pt-sigwait.c: New file.
9848         * pt-sigwaitinfo.c: New file.
9849         * pt-waitid.c: New file.
9850         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
9851         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
9852         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
9853         * Versions: Add all the new functions.
9855         * tst-exit1.c: New file.
9856         * Makefile (tests): Add tst-exit1.
9858         * sem_timedwait.c: Minor optimization for more optimal fastpath.
9860 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
9862         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
9864         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
9865         call.  pthread_join is an official cancellation point.
9866         * pthread_timedjoin.c: Likewise.
9868         * pthread_cond_wait.c: Revert order in which internal lock are dropped
9869         and the condvar's mutex are retrieved.
9870         * pthread_cond_timedwait.c: Likewise.
9871         Reported by dice@saros.East.Sun.COM.
9873 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
9875         * pthreadP.h: Cut out all type definitions and move them...
9876         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
9877         * pthreadP.h: Include <internaltypes.h>.
9879         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
9880         performance tweaks.
9882         * sem_trywait.c: Shuffle #includes around to get right order.
9883         * sem_timedwait.c: Likewise.
9884         * sem_post.c: Likewise.
9885         * sem_wait.c: Likewise.
9887         * nptl 0.3 released.
9889         * Makefile (tests): Add tst-signal3.
9890         * tst-signal3.c: New file.
9892 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
9894         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
9895         the asms modify the sem object.
9896         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
9898         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
9899         the actual members.
9900         * pthreadP.h (struct sem): New type.  Actual semaphore type.
9901         * semaphoreP.h: Include pthreadP.h.
9902         * sem_getvalue.c: Adjust to sem_t change.
9903         * sem_init.c: Likewise.
9904         * sem_open.c: Likewise.
9905         * sem_post.c: Likewise.
9906         * sem_timedwait.c: Likewise.
9907         * sem_trywait.c: Likewise.
9908         * sem_wait.c: Likewise.
9910 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
9912         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
9913         * tst-basic2.c: New file.
9914         * tst-exec1.c: New file.
9915         * tst-exec2.c: New file.
9916         * tst-exec3.c: New file.
9918         * tst-fork1.c: Remove extra */.
9920         * nptl 0.2 released.  The API for IA-32 is complete.