* sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
[glibc.git] / nptl / ChangeLog
blob345829cf499ca118641e6796b00bb5244056f197
1 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
5 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
7         * allocatestack.c: Include kernel-features.h.
8         * pthread_create.c: Likewise.
9         * pthread_mutex_init.c: Likewise.
10         * init.c: Likewise.
11         * pthread_cond_timedwait.c: Likewise.
12         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
13         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
14         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
15         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
16         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
17         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
18         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
19         Likewise.
20         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
21         Likewise.
22         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
23         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
24         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
25         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
27 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
29         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
30         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
31         byte elements.  One of them is the new __shared element.
32         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
33         adjust names of other padding elements.
34         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
35         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
36         byte elements.  One of them is the new __shared element.
37         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
38         adjust names of other padding elements.
39         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
40         Renamed __pad1 element to __shared, adjust names of other padding
41         elements.
42         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
43         (pthread_rwlock_t): Likewise.
44         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
45         typo.
47 2007-08-09  Anton Blanchard  <anton@samba.org>
49         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
51 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
53         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
54         <kernel-features.h>.
55         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
57 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
59         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
60         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
61         dealing with robust mutexes.
62         * pthread_mutex_timedlock.c: Likewise.
63         * pthread_mutex_trylock.c: Likewise.
64         * pthread_mutex_unlock.c: Likewise.
65         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
67 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
69         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
70         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
71         (PTHREAD_MUTEX_PSHARED): Define.
72         * pthread_mutex_init.c (__pthread_mutex_init): Set
73         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
74         mutexes.
75         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
76         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
77         as second argument to lll_lock.
78         (LLL_MUTEX_TRYLOCK): Take mutex as argument
79         instead of its __data.__lock field.
80         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
81         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
82         to lll_robust_lock.
83         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
84         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
85         instead of mutex->__data.__kind directly, pass
86         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
87         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
88         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
89         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
90         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
91         to lll_timedlock, lll_robust_timedlock, lll_unlock and
92         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
93         of mutex->__data.__kind directly.
94         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
95         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
96         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
97         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
98         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
99         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
100         and lll_futex_wake.
101         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
102         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
103         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
104         directly.
105         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
106         Take mutex as argument instead of its __data.__lock field, pass
107         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
108         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
109         __data.__lock field.
110         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
111         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
112         to lll_robust_cond_lock.
113         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
114         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
115         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
116         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
117         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
118         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
119         lll_futex_wait.
120         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
121         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
122         lll_futex_wake.
123         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
124         pshared variable, pass it to lll_lock, lll_unlock,
125         lll_futex_timedwait and lll_futex_wake.
126         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
127         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
128         and lll_futex_wake.
129         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
130         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
131         macro.
132         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
133         lll_futex_wake_unlock): Likewise.
134         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
135         Likewise.
136         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
137         lll_futex_wake_unlock): Likewise.
138         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
139         Likewise.
140         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
141         lll_futex_wake_unlock): Likewise.
142         (lll_futex_wake): Fix a typo.
143         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
145         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
146         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
147         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
148         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
149         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
150         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
152         (__pthread_cond_timedwait): Likewise.
153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
154         (__condvar_cleanup, __pthread_cond_wait): Likewise.
156 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
158         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
159         Don't use CGOTSETUP and CGOTRESTORE macros.
160         (CGOTSETUP, CGOTRESTORE): Remove.
161         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
162         @local symbol.
164 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
166         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
167         definitions for private futexes.
168         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
169         kernel-features.h and lowlevellock.h.  Use private futexes if
170         they are available.
171         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
172         (__lll_mutex_lock_wait): Rename to
173         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
174         (__lll_mutex_timedlock_wait): Rename to ...
175         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
176         Don't compile in for libc.so.
177         (__lll_mutex_unlock_wake): Rename to ...
178         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
179         (__lll_timedwait_tid): Use __NR_gettimeofday.
180         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
181         the header from assembler.  Renamed all lll_mutex_* resp.
182         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
183         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
184         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
185         Define.
186         (__lll_lock_wait_private): Add prototype.
187         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
188         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
189         __lll_unlock_wake): Likewise.
190         (lll_lock): Add private argument.  Call __lll_lock_wait_private
191         if private is constant LLL_PRIVATE.
192         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
193         lll_timedlock, lll_robust_timedlock): Add private argument.
194         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
195         if private is constant LLL_PRIVATE.
196         (lll_robust_unlock, lll_robust_dead): Add private argument.
197         (lll_lock_t): Remove.
198         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
199         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
200         lll_cond_wake, lll_cond_broadcast): Remove.
201         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
202         kernel-features.h and lowlevellock.h.
203         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
204         (LOAD_FUTEX_WAIT): Define.
205         (__lll_robust_mutex_lock_wait): Rename to ...
206         (__lll_robust_lock_wait): ... this.  Add private argument.
207         Use LOAD_FUTEX_WAIT macro.
208         (__lll_robust_mutex_timedlock_wait): Rename to ...
209         (__lll_robust_timedlock_wait): ... this.    Add private argument.
210         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
211         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
212         lowlevellock.h.
213         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
214         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
215         __lll_mutex_{lock,unlock}_*.
216         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
217         lowlevellock.h and pthread-errnos.h.
218         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
219         FUTEX_CMP_REQUEUE, EINVAL): Remove.
220         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
221         __lll_mutex_{lock,unlock}_*.
222         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
223         lowlevellock.h and pthread-errnos.h.
224         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
225         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
226         __lll_mutex_{lock,unlock}_*.
227         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
228         lowlevellock.h.
229         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
230         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
231         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
232         (__condvar_tw_cleanup): Likewise.
233         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
234         lowlevellock.h.
235         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
236         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
237         __lll_mutex_{lock,unlock}_*.
238         ( __condvar_w_cleanup): Likewise.
239         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
240         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
242         lowlevellock.h.
243         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
244         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
245         __lll_mutex_{lock,unlock}_*.
246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
247         lowlevellock.h.
248         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
249         FUTEX_PRIVATE_FLAG): Remove.
250         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
251         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
252         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
253         lowlevellock.h.
254         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
255         FUTEX_PRIVATE_FLAG): Remove.
256         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
257         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
258         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
259         lowlevellock.h.
260         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
261         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
262         __lll_mutex_{lock,unlock}_*.
263         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
264         lowlevellock.h.
265         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
266         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
267         __lll_mutex_{lock,unlock}_*.
268         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
269         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
270         (__new_sem_post): Use standard initial exec code sequences.
271         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
272         lowlevellock.h.
273         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
274         FUTEX_PRIVATE_FLAG): Remove.
275         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
276         exec code sequences.
277         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
278         (__new_sem_trywait): Use standard initial exec code sequences.
279         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
280         (__new_sem_wait): Use standard initial exec code sequences.
282 2007-07-31  Anton Blanchard  <anton@samba.org>
284         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
285         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
286         atomic_full_barrier.
288 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
290         * allocatestack.c (stack_cache_lock): Change type to int.
291         (get_cached_stack, allocate_stack, __deallocate_stack,
292         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
293         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
294         as second argument to lll_lock and lll_unlock macros on
295         stack_cache_lock.
296         * pthread_create.c (__find_in_stack_list): Likewise.
297         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
298         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
299         as second argument.
300         * descr.h (struct pthread): Change lock and setxid_futex field
301         type to int.
302         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
303         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
304         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
305         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
306         Likewise.
307         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
308         * pthread_cond_init.c (__pthread_cond_init): Likewise.
309         * pthreadP.h (__attr_list_lock): Change type to int.
310         * pthread_attr_init.c (__attr_list_lock): Likewise.
311         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
312         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
313         lll_{,un}lock.
314         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
315         also for lll_futex_{wake,wait}.
316         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
317         a pointer to const.
318         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
319         LLL_SHARED as second argument to lll_{,un}lock.
320         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
321         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
322         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
323         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
324         Likewise.
325         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
326         as second argument to lll_{,un}lock macros on pd->lock.
327         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
328         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
329         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
330         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
331         Likewise.
332         * sysdeps/pthread/createthread.c (do_clone, create_thread):
333         Likewise.
334         * pthread_once.c (once_lock): Change type to int.
335         (__pthread_once): Pass LLL_PRIVATE as second argument to
336         lll_{,un}lock macros on once_lock.
337         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
338         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
339         rwlock->__data.__shared as second argument to them and similarly
340         for lll_futex_w*.
341         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
342         Likewise.
343         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
344         Likewise.
345         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
346         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
347         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
348         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
349         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
350         to lll_{,un}lock macros on __sem_mappings_lock.
351         * sem_open.c (check_add_mapping): Likewise.
352         (__sem_mappings_lock): Change type to int.
353         * semaphoreP.h (__sem_mappings_lock): Likewise.
354         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
355         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
356         instead of lll_*mutex_*, pass LLL_SHARED as last
357         argument.
358         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
359         pass LLL_SHARED as last argument.
360         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
361         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
362         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
363         pass LLL_SHARED as last argument.
364         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
365         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
366         LLL_SHARED as last argument.
367         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
368         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
369         Similarly.
370         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
371         __libc_lock_lock_recursive, __libc_lock_unlock,
372         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
373         argument to lll_{,un}lock.
374         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
375         _IO_lock_unlock): Likewise.
376         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
377         compound literal.
378         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
379         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
380         __fork_lock.
381         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
382         free_mem): Likewise.
383         (__fork_lock): Change type to int.
384         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
385         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
386         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
387         lll_futex_wake.
388         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
389         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
390         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
391         New function.
392         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
393         pass it through to lll_futex_*wait, only compile in when
394         IS_IN_libpthread.
395         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
396         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
397         argument and pass it through to lll_futex_*wait.
398         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
399         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
400         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
401         inline functions to __lll_* resp. __lll_robust_*.
402         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
403         (lll_mutex_dead): Add private argument.
404         (__lll_lock_wait_private): New prototype.
405         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
406         __lll_robust_lock_timedwait): Add private argument to prototypes.
407         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
408         call __lll_lock_wait_private, otherwise pass private to
409         __lll_lock_wait.
410         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
411         __lll_robust_timedlock): Add private argument, pass it to
412         __lll_*wait functions.
413         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
414         call __lll_unlock_wake_private, otherwise pass private to
415         __lll_unlock_wake.
416         (__lll_robust_unlock): Add private argument, pass it to
417         __lll_robust_unlock_wake.
418         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
419         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
420         argument, pass it through to __lll_* inline function.
421         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
422         (lll_lock_t): Remove.
423         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
424         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
425         lll_cond_wake, lll_cond_broadcast): Remove.
426         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
427         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
428         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
429         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
430         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
431         the header from assembler.  Renamed all lll_mutex_* resp.
432         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
433         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
434         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
435         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
436         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
437         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
438         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
439         Remove prototype.
440         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
441         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
442         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
443         (lll_trylock): Likewise, use __lll_trylock_asm, pass
444         MULTIPLE_THREADS_OFFSET as another asm operand.
445         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
446         MULTIPLE_THREADS_OFFSET as last asm operand, call
447         __lll_lock_wait_private if private is constant LLL_PRIVATE,
448         otherwise pass private as another argument to __lll_lock_wait.
449         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
450         lll_timedlock, lll_robust_timedlock): Add private argument, pass
451         private as another argument to __lll_*lock_wait call.
452         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
453         MULTIPLE_THREADS_OFFSET as another asm operand, call
454         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
455         otherwise pass private as another argument to __lll_unlock_wake.
456         (lll_robust_unlock): Add private argument, pass private as another
457         argument to __lll_unlock_wake.
458         (lll_robust_dead): Add private argument, use __lll_private_flag
459         macro.
460         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
461         LLL_MUTEX_LOCK_INITIALIZER.
462         (lll_lock_t): Remove.
463         (LLL_LOCK_INITIALIZER_WAITERS): Define.
464         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
465         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
466         lll_cond_wake, lll_cond_broadcast): Remove.
467         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
468         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
469         2007-05-2{3,9} changes.
470         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
471         kernel-features.h and lowlevellock.h.
472         (LOAD_PRIVATE_FUTEX_WAIT): Define.
473         (LOAD_FUTEX_WAIT): Rewritten.
474         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
475         define.
476         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
477         (__lll_mutex_lock_wait): Rename to ...
478         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
479         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
480         (__lll_mutex_timedlock_wait): Rename to ...
481         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
482         contains private argument.  Don't compile in for libc.so.
483         (__lll_mutex_unlock_wake): Rename to ...
484         (__lll_unlock_wake): ... this.  %ecx contains private argument.
485         Don't compile in for libc.so.
486         (__lll_timedwait_tid): Use __NR_gettimeofday.
487         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
488         kernel-features.h and lowlevellock.h.
489         (LOAD_FUTEX_WAIT): Define.
490         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
491         define.
492         (__lll_robust_mutex_lock_wait): Rename to ...
493         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
494         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
495         macro.
496         (__lll_robust_mutex_timedlock_wait): Rename to ...
497         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
498         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
499         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
500         lowlevellock.h.
501         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
502         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
503         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
504         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
505         to __lll_lock_wait in %edx.
506         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
507         Include lowlevellock.h and pthread-errnos.h.
508         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
509         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
510         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
511         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
512         pass LLL_SHARED in %ecx to both __lll_lock_wait and
513         __lll_unlock_wake.
514         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
515         Include lowlevellock.h and pthread-errnos.h.
516         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
517         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
518         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
519         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
520         pass LLL_SHARED in %ecx to both __lll_lock_wait and
521         __lll_unlock_wake.
522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
523         Include lowlevellock.h.
524         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
525         Don't define.
526         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
527         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
528         pass LLL_SHARED in %ecx to both __lll_lock_wait and
529         __lll_unlock_wake.  Use __NR_gettimeofday.
530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
531         Include lowlevellock.h.
532         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
533         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
534         to __lll_*, pass cond_lock address in %edx rather than %ecx to
535         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
536         and __lll_unlock_wake.
537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
538         Include lowlevellock.h.
539         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
540         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
541         MUTEX(%ebx) address in %edx rather than %ecx to
542         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
543         and __lll_unlock_wake.  Move return value from %ecx to %edx
544         register.
545         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
546         Include lowlevellock.h.
547         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
548         Don't define.
549         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
550         MUTEX(%ebp) address in %edx rather than %ecx to
551         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
552         and __lll_unlock_wake.  Move return value from %ecx to %edx
553         register.  Use __NR_gettimeofday.
554         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
555         Include lowlevellock.h.
556         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
557         Don't define.
558         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
559         MUTEX(%ebp) address in %edx rather than %ecx to
560         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
561         and __lll_unlock_wake.  Move return value from %ecx to %edx
562         register.  Use __NR_gettimeofday.
563         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
564         Include lowlevellock.h.
565         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
566         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
567         MUTEX(%edi) address in %edx rather than %ecx to
568         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
569         and __lll_unlock_wake.
570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
571         Include lowlevellock.h.
572         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
573         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
574         MUTEX(%ebx) address in %edx rather than %ecx to
575         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
576         and __lll_unlock_wake.  Move return value from %ecx to %edx
577         register.
578         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
579         lowlevellock.h.
580         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
581         define.
582         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
583         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
584         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
585         lowlevellock.h.
586         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
587         (sem_timedwait): Use __NR_gettimeofday.
588         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
589         lowlevellock.h.
590         (LOCK): Don't define.
591         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
592         lowlevellock.h.
593         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
594         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
595         are waiters.
596         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
597         2007-05-2{3,9} changes.
598         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
599         kernel-features.h and lowlevellock.h.
600         (LOAD_PRIVATE_FUTEX_WAIT): Define.
601         (LOAD_FUTEX_WAIT): Rewritten.
602         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
603         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
604         (__lll_mutex_lock_wait): Rename to ...
605         (__lll_lock_wait): ... this.  %esi is now private argument.
606         Don't compile in for libc.so.
607         (__lll_mutex_timedlock_wait): Rename to ...
608         (__lll_timedlock_wait): ... this.  %esi contains private argument.
609         Don't compile in for libc.so.
610         (__lll_mutex_unlock_wake): Rename to ...
611         (__lll_unlock_wake): ... this.  %esi contains private argument.
612         Don't compile in for libc.so.
613         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
614         kernel-features.h and lowlevellock.h.
615         (LOAD_FUTEX_WAIT): Define.
616         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
617         (__lll_robust_mutex_lock_wait): Rename to ...
618         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
619         Use LOAD_FUTEX_WAIT macro.
620         (__lll_robust_mutex_timedlock_wait): Rename to ...
621         (__lll_robust_timedlock_wait): ... this. %esi argument contains
622         private, use LOAD_FUTEX_WAIT macro.
623         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
624         lowlevellock.h.
625         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
626         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
627         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
628         __lll_lock_wait and __lll_unlock_wake.
629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
630         Include lowlevellock.h and pthread-errnos.h.
631         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
632         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
633         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
634         pass LLL_SHARED in %esi to both __lll_lock_wait and
635         __lll_unlock_wake.
636         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
637         Include lowlevellock.h and pthread-errnos.h.
638         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
639         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
640         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
641         pass LLL_SHARED in %esi to both __lll_lock_wait and
642         __lll_unlock_wake.
643         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
644         Include lowlevellock.h.
645         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
646         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
647         pass LLL_SHARED in %esi to both __lll_lock_wait and
648         __lll_unlock_wake.
649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
650         Include lowlevellock.h.
651         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
652         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
653         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
654         and __lll_unlock_wake.
655         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
656         Include lowlevellock.h.
657         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
658         Don't define.
659         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
660         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
661         and __lll_unlock_wake.
662         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
663         Include lowlevellock.h.
664         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
665         Don't define.
666         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
667         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
668         and __lll_unlock_wake.
669         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
670         Include lowlevellock.h.
671         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
672         Don't define.
673         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
674         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
675         and __lll_unlock_wake.
676         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
677         Include lowlevellock.h.
678         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
679         Don't define.
680         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
681         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
682         and __lll_unlock_wake.
683         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
684         Include lowlevellock.h.
685         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
686         Don't define.
687         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
688         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
689         and __lll_unlock_wake.
690         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
691         lowlevellock.h.
692         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
693         define.
694         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
695         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
696         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
697         lowlevellock.h.
698         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
699         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
700         lowlevellock.h.
701         (LOCK): Don't define.
702         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
703         lowlevellock.h.
704         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
705         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
706         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
707         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
708         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
709         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
710         (__lll_lock_wait_private): New function.
711         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
712         it to lll_futex_*wait.  Don't compile in for libc.so.
713         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
714         Remove.
715         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
716         (struct sparc_pthread_barrier): Remove.
717         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
718         struct sparc_pthread_barrier.  Pass
719         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
720         and lll_futex_wait macros.
721         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
722         Remove.
723         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
724         Include sparc pthread_barrier_wait.c instead of generic one.
726 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
728         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
730         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
731         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
732         %ecx.
733         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
734         (pthread_rwlock_timedwrlock): Likewise.
735         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
736         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
738 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
740         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
742 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
744         * tst-locale2.c (useless): Add return statement.
746 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
748         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
749         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
750         * pthread_create.c (start_thread): Likewise.
751         * init.c (sighandler_setxid): Likewise.
752         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
753         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
754         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
755         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
756         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
757         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
758         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
759         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
760         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
761         Likewise.
762         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
763         Likewise.
764         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
765         Likewise.
766         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
767         __rtld_notify): Likewise.
768         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
769         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
770         __pthread_once): Likewise.
771         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
772         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
773         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
774         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
775         (lll_futex_wait): Add private argument, define as wrapper around
776         lll_futex_timed_wait.
777         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
778         use __lll_private_flag macro.
779         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
780         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
781         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
782         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
783         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
784         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
785         (lll_futex_wait): Add private argument, define as wrapper around
786         lll_futex_timed_wait.
787         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
788         use __lll_private_flag macro.
789         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
790         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
791         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
792         Define.
793         (lll_futex_timed_wait, lll_futex_wake): Use it.
794         (lll_private_futex_wait, lll_private_futex_timed_wait,
795         lll_private_futex_wake): Removed.
796         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
797         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
798         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
799         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
800         (lll_futex_wait): Add private argument, define as wrapper around
801         lll_futex_timed_wait.
802         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
803         use __lll_private_flag macro.
804         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
805         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
806         to lll_futex_*.
807         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
808         (lll_private_futex_wait, lll_private_futex_timed_wait,
809         lll_private_futex_wake): Removed.
810         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
811         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
812         (lll_private_futex_wait, lll_private_futex_timed_wait,
813         lll_private_futex_wake): Removed.
814         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
815         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
816         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
817         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
818         (lll_futex_wait): Add private argument, define as wrapper around
819         lll_futex_timed_wait.
820         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
821         use __lll_private_flag macro.
822         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
823         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
824         to lll_futex_*.
825         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
826         Define.
827         (lll_futex_timed_wait, lll_futex_wake): Use it.
828         (lll_private_futex_wait, lll_private_futex_timed_wait,
829         lll_private_futex_wake): Removed.
831 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
833         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
834         of the structure for sparc32.
836 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
838         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
840 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
842         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
843         code used when private futexes are assumed.
844         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
845         Likewise.
847 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
849         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
850         (__lll_private_flag): Define.
851         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
852         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
853         __lll_private_flag.
854         (lll_private_futex_wait, lll_private_futex_timedwait,
855         lll_private_futex_wake): Define as wrapper around non-_private
856         macros.
857         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
858         (__lll_private_flag): Define.
859         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
860         (lll_private_futex_wait, lll_private_futex_timedwait,
861         lll_private_futex_wake): Define as wrapper around non-_private
862         macros.
864 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
866         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
867         parameter to lll_futex_wait call.
868         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
870         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
871         Replace lll_futex_wait with lll_private_futex_wait.
872         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
873         Add LLL_SHARED parameter to lll_futex_wake().
875         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
876         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
877         lll_private_futex_wake.
878         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
879         bit from private parm before syscall.
880         (lll_futex_timed_wait): Likewise.
881         (lll_futex_wake): Likewise.
882         (lll_futex_wake_unlock): Likewise.
883         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
884         (lll_robust_mutex_unlock): Likewise.
885         (lll_mutex_unlock_force): Likewise.
886         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
888 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
890         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
891         compilation when unconditionally using private futexes.
892         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
893         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
894         Likewise.
895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
896         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
898 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
900         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
901         Define.
903 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
905         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
906         kernel-features.h.
908 2007-05-16  Roland McGrath  <roland@redhat.com>
910         * init.c (__nptl_initial_report_events): New variable.
911         (__pthread_initialize_minimal_internal): Initialize pd->report_events
912         to that.
914 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
916         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
917         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
919 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
921         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
922         implementation.
924 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
926         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
927         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
928         * pthread_mutex_timedlock.c: Likewise.
929         * pthread_mutex_trylock.c: Likewise.
930         * pthread_mutex_unlock.c: Likewise.
932 2007-06-17  Andreas Schwab  <schwab@suse.de>
934         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
935         sections.
937 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
939         * allocatestack.c (allocate_stack): Make code compile if
940         __ASSUME_PRIVATE_FUTEX is set.
942 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
945         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
946         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
947         (__pthread_rwlock_wrlock): Likewise.
948         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
949         (pthread_rwlock_timedrdlock): Likewise.
950         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
951         (pthread_rwlock_timedwrlock): Likewise.
952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
953         (__pthread_rwlock_unlock): Likewise.
955 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
957         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
958         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
959         Split __flags into __flags, __shared, __pad1 and __pad2.
960         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
961         futexes if they are available.
962         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
963         in libc-lowlevellock.S allow using private futexes.
964         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
965         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
966         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
967         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
968         lll_private_futex_timed_wait and lll_private_futex_wake.
969         (lll_robust_mutex_unlock): Fix typo.
970         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
971         field in futex command setup.
972         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
973         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
974         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
975         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
976         if they are available.  Remove clear_once_control.
977         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
978         futexes if they are available.
979         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
981         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
983         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
984         Wake only when there are waiters.
985         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
986         support.  Indicate that there are waiters.  Remove unnecessary
987         extra cancellation test.
988         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
989         left-over duplication of __sem_wait_cleanup.
991 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
993         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
994         parameter to lll_futex_wait, lll_futex_timed_wait, and
995         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
996         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
997         lll_private_futex_wake.
998         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
999         * allocatestack.c: Adjust use of lll_futex_* macros.
1000         * init.c: Likewise.
1001         * lowlevellock.h: Likewise.
1002         * pthread_barrier_wait.c: Likewise.
1003         * pthread_cond_broadcast.c: Likewise.
1004         * pthread_cond_destroy.c: Likewise.
1005         * pthread_cond_signal.c: Likewise.
1006         * pthread_cond_timedwait.c: Likewise.
1007         * pthread_cond_wait.c: Likewise.
1008         * pthread_create.c: Likewise.
1009         * pthread_mutex_lock.c: Likewise.
1010         * pthread_mutex_setprioceiling.c: Likewise.
1011         * pthread_mutex_timedlock.c: Likewise.
1012         * pthread_mutex_unlock.c: Likewise.
1013         * pthread_rwlock_timedrdlock.c: Likewise.
1014         * pthread_rwlock_timedwrlock.c: Likewise.
1015         * pthread_rwlock_unlock.c: Likewise.
1016         * sysdeps/alpha/tls.h: Likewise.
1017         * sysdeps/i386/tls.h: Likewise.
1018         * sysdeps/ia64/tls.h: Likewise.
1019         * sysdeps/powerpc/tls.h: Likewise.
1020         * sysdeps/pthread/aio_misc.h: Likewise.
1021         * sysdeps/pthread/gai_misc.h: Likewise.
1022         * sysdeps/s390/tls.h: Likewise.
1023         * sysdeps/sh/tls.h: Likewise.
1024         * sysdeps/sparc/tls.h: Likewise.
1025         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1026         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1027         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1028         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1029         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1030         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1031         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1032         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1033         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1034         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1035         Likewise.
1036         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1037         * sysdeps/x86_64/tls.h: Likewise.
1039 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1041         * pthread_getattr_np.c: No need to install a cancellation handler,
1042         this is no cancellation point.
1043         * pthread_getschedparam.c: Likewise.
1044         * pthread_setschedparam.c: Likewise.
1045         * pthread_setschedprio.c: Likewise.
1046         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1047         lll_unlock_wake_cb.
1048         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1049         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1050         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1051         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1052         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1053         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1054         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1055         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1056         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1057         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1058         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1061         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1062         whether there are more than one thread makes no sense here since
1063         we only call the slow path if the locks are taken.
1064         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1066         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1067         COND_NWAITERS_SHIFT.
1068         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1069         COND_CLOCK_BITS.
1070         * pthread_cond_init.c: Likewise.
1071         * pthread_cond_timedwait.c: Likewise.
1072         * pthread_cond_wait.c: Likewise.
1073         * pthread_condattr_getclock.c: Likewise.
1074         * pthread_condattr_setclock.c: Likewise.
1075         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1078         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1079         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1081 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1083         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1084         unistd.h.
1086         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1087         insn suffix.
1088         (THREAD_GSCOPE_GET_FLAG): Remove.
1089         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1090         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1091         changes.
1092         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1093         (THREAD_GSCOPE_GET_FLAG): Remove.
1094         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1095         instead of THREAD_GSCOPE_GET_FLAG.
1096         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1097         it.
1098         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1099         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1100         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1101         THREAD_GSCOPE_WAIT): Define.
1102         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1103         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1104         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1105         THREAD_GSCOPE_WAIT): Define.
1106         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1107         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1108         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1109         THREAD_GSCOPE_WAIT): Define.
1110         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1111         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1112         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1113         THREAD_GSCOPE_WAIT): Define.
1115 2007-05-24  Richard Henderson  <rth@redhat.com>
1117         * descr.h (struct pthread): Add header.gscope_flag.
1118         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1119         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1120         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1121         THREAD_GSCOPE_WAIT): Define.
1123 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1125         * init.c: Make it compile with older kernel headers.
1127         * tst-initializers1.c: Show through exit code which test failed.
1129         * pthread_rwlock_init.c: Also initialize __shared field.
1130         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1131         element in rwlock structure into four byte elements.  One of them is
1132         the new __shared element.
1133         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1134         Likewise.
1135         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1136         __shared, adjust names of other padding elements.
1137         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1138         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1139         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1140         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1141         FUTEX_PRIVATE_FLAG.
1142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1143         futex to use private operations if possible.
1144         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1145         Likewise.
1146         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1147         Likewise.
1148         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1149         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1150         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1152         Likewise.
1153         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1154         Likewise.
1155         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1158 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1160         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1161         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1162         * pthread_rwlock_timedrdlock.c: Likewise.
1163         * pthread_rwlock_tryrdlock.c: Likewise.
1165         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1166         optimization.
1168         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1169         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1170         duplication of __sem_wait_cleanup.
1172         * allocatestack.c: Revert last change.
1173         * init.c: Likewise.
1174         * sysdeps/i386/tls.h: Likewise.
1175         * sysdeps/x86_64/tls.h: Likewise.
1176         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1177         header structure.
1178         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1180         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1181         Add private field.
1182         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1183         * pthread_barrier_init.c: Set private flag if pshared and private
1184         futexes are supported.
1185         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1186         private field in futex command setup.
1187         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1189 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1191         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1192         support.
1193         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1194         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1195         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1196         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1197         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1199         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1200         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1201         fields in the structure.
1202         (__old_sem_init): New function.
1203         * sem_open.c: Initialize all fields of the structure.
1204         * sem_getvalue.c: Adjust for renamed element.
1205         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1206         (gen-as-const-headers): Add structsem.sym.
1207         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1208         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1209         struct new_sem.  Add struct old_sem.
1210         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1211         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1212         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1213         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1214         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1215         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1216         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1217         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1218         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1219         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1220         * tst-sem10.c: New file.
1221         * tst-sem11.c: New file.
1222         * tst-sem12.c: New file.
1223         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1224         of struct sem.
1226 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1227             Jakub Jelinek  <jakub@redhat.com>
1229         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1230         Move __pthread_enable_asynccancel right before futex syscall.
1231         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1232         Likewise.
1234 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1236         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1237         THREAD_COPY_PRIVATE_FUTEX): Define.
1238         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1239         THREAD_COPY_PRIVATE_FUTEX): Define.
1240         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1241         * init.c (__pthread_initialize_minimal_internal): Use
1242         THREAD_SET_PRIVATE_FUTEX.
1244         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1245         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1246         THREAD_GSCOPE_FLAG_WAIT): Define.
1247         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1248         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1249         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1250         PTR_DEMANGLE.
1251         (THREAD_GSCOPE_GET_FLAG): Define.
1252         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1253         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1254         instead of ->header.gscope_flag directly.
1256 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1258         * init.c (__pthread_initialize_minimal_internal): Check whether
1259         private futexes are available.
1260         * allocatestack.c (allocate_stack): Copy private_futex field from
1261         current thread into the new stack.
1262         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1263         futexes if they are available.
1264         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1265         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1266         in libc-lowlevellock.S allow using private futexes.
1267         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1268         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1269         FUTEX_PRIVATE_FLAG.
1270         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1271         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1272         if they are available.
1273         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1274         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1275         * sysdeps/i386/tcb-offsets.sym: Likewise.
1276         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1277         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1279 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1281         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1282         Remove ptr_wait_lookup_done again.
1283         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1284         (__pthread_initialize_minimal_internal): Initialize
1285         _dl_wait_lookup_done pointer in _rtld_global directly.
1286         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1287         Remove code to code _dl_wait_lookup_done.
1288         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1289         encrypted for now.
1291 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1293         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1294         pthread_mutex_init failed with ENOTSUP.
1296 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1298         * allocatestack.c (__wait_lookup_done): New function.
1299         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1300         Add ptr_wait_lookup_done.
1301         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1302         * pthreadP.h: Declare __wait_lookup_done.
1303         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1304         Define macros to implement reference handling of global scope.
1305         * sysdeps/x86_64/tls.h: Likewise.
1306         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1307         Initialize GL(dl_wait_lookup_done).
1309 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1311         [BZ #4512]
1312         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1313         is detected.
1314         * pthread_mutex_timedlock.c: Likewise.
1315         * pthread_mutex_trylock.c: Likewise.
1316         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1318         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1319         * tst-robust9.c: New file.
1320         * tst-robustpi9.c: New file.
1322         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1323         unnecessary extra cancellation test.
1325 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1327         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1328         extra cancellation test.
1329         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1331 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1333         * descr.h (struct pthread): Rearrange members to fill hole in
1334         64-bit layout.
1336         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1337         (__pthread_setaffinity_new): If syscall was successful and
1338         RESET_VGETCPU_CACHE is defined, use it before returning.
1339         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1341 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1343         [BZ #4455]
1344         * tst-align2.c: Include stackinfo.h.
1345         * tst-getpid1.c: Likewise.
1347 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1349         [BZ #4455]
1350         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1351         * tst-getpid1.c (do_test): Likewise.
1353         [BZ #4456]
1354         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1355         (allocate_stack): Likewise.
1357 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1359         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1360         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1361         (__lll_robust_timedlock_wait): Likewise.
1362         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1364 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1366         [BZ #4465]
1367         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1368         * tst-cancel4.c (tf_fdatasync): New test.
1370 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1372         [BZ #4392]
1373         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1374         check mutexes like normal mutexes.
1376         [BZ #4306]
1377         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1378         Initialize the whole sigevent structure to appease valgrind.
1380 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1382         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1383         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1385 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1387         * tst-locale1.c: Avoid warnings.
1388         * tst-locale2.c: Likewise.
1390 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1392         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1393         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1395 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1397         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1398         __extern_always_inline where appropriate.
1399         * sysdeps/pthread/pthread.h: Likewise.
1401 2007-03-13  Richard Henderson  <rth@redhat.com>
1403         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1404         separate cfi regions for the two subsections.
1406 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1408         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1409         new thread, don't just decrement it.
1410         Patch by Suzuki K P <suzuki@in.ibm.com>.
1412 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1414         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1415         PTHFCT_CALL definition.
1417 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1419         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1420         available, don't use it.
1422 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1424         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1425         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1426         call into the kernel to delay.
1428 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1430         * tst-initializers1.c: We want to test the initializers as seen
1431         outside of libc, so undefined _LIBC.
1433         * pthread_join.c (cleanup): Avoid warning.
1435 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1437         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1438         (__lll_timedwait_tid): Add unwind info.
1440         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1441         function table, mangle the pointers.
1442         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1443         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1444         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1445         demangle pointers before use.
1446         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1447         demangle pointer.
1448         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1449         * sysdeps/pthread/setxid.h: Likewise.
1451 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1453         * tst-rwlock7.c: Show some more information in case of correct
1454         behavior.
1456 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1458         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1459         (lll_futex_timed_wait): Undo part of last change, don't negate
1460         return value.
1462 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1464         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1465         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1467 2006-12-28  David S. Miller  <davem@davemloft.net>
1469         * shlib-versions: Fix sparc64 linux target specification.
1471 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1473         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1474         Adjust include path for pthread_barrier_wait.c move.
1476 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1478         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1479         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1481 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1483         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1484         6 argument cancellable syscalls.
1485         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1486         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1487         6 argument cancellable syscalls.
1488         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1490 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1492         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1493         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1495 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1497         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1498         __sync_lock_release instead of __sync_lock_release_si.
1500 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1502         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1503         Define.
1504         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1505         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1506         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1507         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1508         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1509         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1510         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1511         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1512         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1513         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1514         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1516 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1518         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1519         * pthread_barrier_wait.c: ...here.
1520         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1521         * pthread_cond_broadcast.c: ...here.
1522         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1523         * pthread_cond_signal.c: ...here.
1524         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1525         * pthread_cond_timedwait.c: ...here.
1526         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1527         * pthread_cond_wait.c: ...here.
1528         * sysdeps/pthread/pthread_once.c: Move to...
1529         * pthread_once.c: ...here.
1530         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1531         * pthread_rwlock_rdlock.c: ...here.
1532         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1533         * pthread_rwlock_timedrdlock.c: ...here.
1534         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1535         * pthread_rwlock_timedwrlock.c: ...here.
1536         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1537         * pthread_rwlock_unlock.c: ...here.
1538         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1539         * pthread_rwlock_wrlock.c: ...here.
1540         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1541         * pthread_spin_destroy.c: ...here.
1542         * sysdeps/pthread/pthread_spin_init.c: Move to...
1543         * pthread_spin_init.c: ...here.
1544         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1545         * pthread_spin_unlock.c: ...here.
1546         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1547         * pthread_getcpuclockid.c: ...here.
1549         * init.c: USE_TLS support is now always enabled.
1550         * tst-tls5.h: Likewise.
1551         * sysdeps/alpha/tls.h: Likewise.
1552         * sysdeps/i386/tls.h: Likewise.
1553         * sysdeps/ia64/tls.h: Likewise.
1554         * sysdeps/powerpc/tls.h: Likewise.
1555         * sysdeps/s390/tls.h: Likewise.
1556         * sysdeps/sh/tls.h: Likewise.
1557         * sysdeps/sparc/tls.h: Likewise.
1558         * sysdeps/x86_64/tls.h: Likewise.
1560 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1562         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1563         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1564         failed.
1566         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1567         Define to THREAD_SELF->header.multiple_threads.
1568         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1569         Likewise.
1570         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1571         Likewise.
1572         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1573         (SINGLE_THREAD_P): Likewise.
1574         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1575         (SINGLE_THREAD_P): Likewise.
1576         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1577         (SINGLE_THREAD_P): Likewise.
1578         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1579         (SINGLE_THREAD_P): Likewise.
1580         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1581         Likewise.
1582         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1583         (SINGLE_THREAD_P): Likewise.
1584         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1585         (SINGLE_THREAD_P): Likewise.
1586         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1587         Likewise.
1589 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1591         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1592         by default rather than 2_3_3.
1594 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1596         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1597         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1598         atomic_* instead of catomic_* macros.
1600 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1602         [BZ #3285]
1603         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1604         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1605         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1606         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1607         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1608         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1609         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1610         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1611         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1612         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1613         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1614         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1615         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1617 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1619         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1620         cancelable syscalls with six parameters.
1622         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1623         operations instead of atomic_*.
1625 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1627         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1629 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1631         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1632         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1633         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1634         New file.
1635         * pthread_attr_setstack.c: Allow overwriting the version number of the
1636         new symbol.
1637         * pthread_attr_setstacksize.c: Likewise.
1638         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1639         it.
1640         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1641         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1643 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1645         [BZ #3251]
1646         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1647         Patch by Petr Baudis.
1649 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1651         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1653         * tst-cancel2.c (tf): Loop as long as something was written.
1655 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1657         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1658         mutexes wake all mutexes.
1659         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1660         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1661         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1663 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1665         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1666         to guarantee the thread is always canceled.
1668 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1670         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1671         Include stdlib.h.
1672         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1673         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1674         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1675         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1676         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1678 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1680         [BZ #3123]
1681         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1682         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1686         * Makefile (tests): Add tst-cond22.
1687         * tst-cond22.c: New file.
1689 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1691         [BZ #3124]
1692         * descr.h (struct pthread): Add parent_cancelhandling.
1693         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1694         cancelhandling value to child.
1695         * pthread_create.c (start_thread): If parent thread was canceled
1696         reset the SIGCANCEL mask.
1697         * Makefile (tests): Add tst-cancel25.
1698         * tst-cancel25.c: New file.
1700 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1701             Ulrich Drepper  <drepper@redhat.com>
1703         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1704         counterp if it is already zero.
1705         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1707 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1708             Roland McGrath  <roland@redhat.com>
1710         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1711         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1712         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1713         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1714         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1715         lll_robust_mutex_timedlock, lll_mutex_unlock,
1716         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1717         Add _L_*_ symbols around the subsection.
1718         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1719         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1721 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1722             Roland McGrath  <roland@redhat.com>
1724         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1725         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1726         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1727         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1728         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1729         lll_robust_mutex_timedlock, lll_mutex_unlock,
1730         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1731         Add _L_*_ symbols around the subsection.
1732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1733         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1735 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1737         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1738         change because it can disturb too much existing code.  If real hard
1739         reader preference is needed we'll introduce another type.
1740         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1741         (pthread_rwlock_timedwrlock): Likewise.
1742         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1743         Likewise.
1745 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1747         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1748         reader preference.
1749         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1750         (pthread_rwlock_timedwrlock): Likewise.
1751         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1752         Likewise.
1754 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1756         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1757         Only define ifdef SHARED.
1759 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1761         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1762         (free_stacks): ...here.
1763         (__free_stack_cache): New function.
1764         * pthreadP.h: Declare __free_stack_cache.
1765         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1766         ptr_freeres.
1767         * init.c (pthread_functions): Initialize ptr_freeres.
1768         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1769         New freeres function.
1771 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
1773         [BZ #3018]
1774         * Makefile (extra-objs): Add modules to extra-test-objs instead.
1776 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
1778         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1779         _XOPEN_REALTIME_THREADS.
1781 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
1783         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1784         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1785         HAVE_CLOCK_GETTIME_VSYSCALL.
1786         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1788 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
1790         * sysdeps/unix/sysv/linux/bits/posix_opt.h
1791         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1792         * descr.h (struct priority_protection_data): New type.
1793         (struct pthread): Add tpp field.
1794         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1795         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1796         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1797         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1798         TPP mutexes.
1799         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1800         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1801         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1802         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1803         * tpp.c: New file.
1804         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1805         boosted by TPP.
1806         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1807         * pthread_mutexattr_getprioceiling.c
1808         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1809         in the SCHED_FIFO priority range.
1810         * pthread_mutexattr_setprioceiling.c
1811         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1812         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1813         if mutex is not TPP.  Ceiling is now in __data.__lock.
1814         * pthread_mutex_setprioceiling.c: Include stdbool.h.
1815         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
1816         is now in __data.__lock.  Add locking.
1817         * pthread_create.c (__free_tcb): Free pd->tpp structure.
1818         * Makefile (libpthread-routines): Add tpp.
1819         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1820         * tst-tpp.h: New file.
1821         * tst-mutexpp1.c: New file.
1822         * tst-mutexpp6.c: New file.
1823         * tst-mutexpp10.c: New file.
1824         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1825         * tst-mutex6.c (TEST_FUNCTION): Likewise.
1827 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
1829         [BZ #2843]
1830         * pthread_join.c (pthread_join): Account for self being canceled
1831         when checking for deadlocks.
1832         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
1833         (tf1): Don't print anything after pthread_join returns, this would be
1834         another cancellation point.
1835         (tf2): Likewise.
1836         * tst-join6.c: New file.
1837         * Makefile (tests): Add tst-join6.
1839 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
1841         [BZ #2892]
1842         * pthread_setspecific.c (__pthread_setspecific): Check
1843         out-of-range index before checking for unused key.
1845         * sysdeps/pthread/gai_misc.h: New file.
1847 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
1849         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
1850         file.  Don't use sysctl.
1851         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
1852         overwrite the file if this is likely not true.
1854 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
1856         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1857         * Makefile (tests): Add tst-getpid3.
1858         * tst-getpid3.c: New file.
1860 2006-07-30  Roland McGrath  <roland@redhat.com>
1862         * Makefile (libpthread-routines): Add ptw-sigsuspend.
1864         * sysdeps/unix/sysv/linux/i386/not-cancel.h
1865         (pause_not_cancel): New macro.
1866         (nanosleep_not_cancel): New macro.
1867         (sigsuspend_not_cancel): New macro.
1868         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1869         nanosleep_not_cancel macro from <not-cancel.h>.
1870         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1871         macro from <not-cancel.h>.
1873 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
1874             Jakub Jelinek  <jakub@redhat.com>
1876         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1877         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
1878         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1879         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1880         * pthread_mutex_init.c: Add support for priority inheritance mutex.
1881         * pthread_mutex_lock.c: Likewise.
1882         * pthread_mutex_timedlock.c: Likewise.
1883         * pthread_mutex_trylock.c: Likewise.
1884         * pthread_mutex_unlock.c: Likewise.
1885         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1886         all mutexes.
1887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1889         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1890         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1891         pthread-pi-defines.sym.
1892         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1893         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1894         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1895         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1896         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1897         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1898         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1899         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1900         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1901         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1902         _POSIX_THREAD_PRIO_INHERIT to 200112L.
1903         * tst-mutex1.c: Adjust to allow use in PI mutex test.
1904         * tst-mutex2.c: Likewise.
1905         * tst-mutex3.c: Likewise.
1906         * tst-mutex4.c: Likewise.
1907         * tst-mutex5.c: Likewise.
1908         * tst-mutex6.c: Likewise.
1909         * tst-mutex7.c: Likewise.
1910         * tst-mutex7a.c: Likewise.
1911         * tst-mutex8.c: Likewise.
1912         * tst-mutex9.c: Likewise.
1913         * tst-robust1.c: Likewise.
1914         * tst-robust7.c: Likewise.
1915         * tst-robust8.c: Likewise.
1916         * tst-mutexpi1.c: New file.
1917         * tst-mutexpi2.c: New file.
1918         * tst-mutexpi3.c: New file.
1919         * tst-mutexpi4.c: New file.
1920         * tst-mutexpi5.c: New file.
1921         * tst-mutexpi6.c: New file.
1922         * tst-mutexpi7.c: New file.
1923         * tst-mutexpi7a.c: New file.
1924         * tst-mutexpi8.c: New file.
1925         * tst-mutexpi9.c: New file.
1926         * tst-robust1.c: New file.
1927         * tst-robust2.c: New file.
1928         * tst-robust3.c: New file.
1929         * tst-robust4.c: New file.
1930         * tst-robust5.c: New file.
1931         * tst-robust6.c: New file.
1932         * tst-robust7.c: New file.
1933         * tst-robust8.c: New file.
1934         * Makefile (tests): Add the new tests.
1936         * pthread_create.c (start_thread): Add some casts to avoid warnings.
1937         * pthread_mutex_destroy.c: Remove unneeded label.
1939 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
1941         * pthread_mutex_init.c (__pthread_mutex_init): Move some
1942         computations to compile time.
1944 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
1946         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1948 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
1950         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
1952 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
1954         * pthread_key_create.c (__pthread_key_create): Do away with
1955         __pthread_keys_lock.
1957         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1958         (__kernel_cpumask_size): Mark as hidden.
1959         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1961         * sem_open.c (__sem_mappings_lock): Mark as hidden.
1962         * semaphoreP.h (__sem_mappings_lock): Likewise.
1964 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
1966         * pthread_atfork.c: Mark __dso_handle as hidden.
1968 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
1970         [BZ #2644]
1971         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
1972         the reload problem.  Change the one path in pthread_cancel_init
1973         which causes the problem.  Force gcc to reload.  Simplify callers.
1974         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
1975         (_Unwind_GetBSP): Undo last patch.
1977 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
1979         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
1980         function pointer is reloaded after pthread_cancel_init calls.
1982         [BZ #2644]
1983         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
1984         pointers are reloaded after pthread_cancel_init calls.
1986 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
1988         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
1989         __always_inline.
1991 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
1993         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1994         Allocate new object which is passed to timer_sigev_thread so that
1995         the timer can be deleted before the new thread is scheduled.
1997 2006-04-26  Roland McGrath  <roland@redhat.com>
1999         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2001 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2003         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2004         suffix for conditional jumps.
2005         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2006         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2007         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2008         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2009         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2010         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2012         * init.c (sigcancel_handler): Compare with correct PID even if the
2013         thread is in the middle of a fork call.
2014         (sighandler_setxid): Likewise.
2015         Reported by Suzuki K P <suzuki@in.ibm.com> .
2017 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2019         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2021 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2023         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2024         fails [Coverity CID 105].
2026 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2030 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2032         [BZ #2505]
2033         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2034         Define __lll_rel_instr using lwsync.
2036 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2038         * allocatestack.c (allocate_stack): Always initialize robust_head.
2039         * descr.h: Define struct robust_list_head.
2040         (struct pthread): Use robust_list_head in robust mutex list definition.
2041         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2042         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2043         (__pthread_initialize_minimal_internal): Register robust_list with
2044         the kernel.
2045         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2046         Declare __set_robust_list_avail.
2047         * pthread_create.c (start_thread): Register robust_list of new thread.
2048         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2049         waiters.
2050         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2051         number of users, it's unreliable.
2052         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2053         set_robust_list syscall is available.
2054         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2055         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2056         Set robust_head.list_op_pending before trying to lock a robust mutex.
2057         * pthread_mutex_timedlock.c: Likewise.
2058         * pthread_mutex_trylock.c: Likewise.
2059         * pthread_mutex_unlock.c: Likewise for unlocking.
2060         * Makefile (tests): Add tst-robust8.
2061         * tst-robust8.c: New file.
2063 2006-03-08  Andreas Schwab  <schwab@suse.de>
2065         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2066         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2068 2006-03-05  Roland McGrath  <roland@redhat.com>
2070         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2071         and $config_os doesn't match *linux*.
2073 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2075         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2076         Use __syscall_error.
2077         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2078         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2079         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2080         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2081         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2082         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2084 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2086         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2088 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2090         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2091         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2092         mutex.
2093         (__lll_robust_timedlock_wait): Likewise.
2094         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2095         (__lll_robust_lock_wait): Likewise.
2096         (__lll_robust_timedlock_wait): Likewise.
2097         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2098         (__lll_robust_lock_wait): Likewise.
2099         (__lll_robust_timedlock_wait): Likewise.
2101 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2103         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2104         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2105         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2106         lll_robust_mutex_unlock): Define.
2107         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2109 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2111         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2112         instead of <clone.S>.
2114 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2116         * Makefile (libpthread-routines): Add
2117         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2118         and pthread_mutex_[sg]etprioceiling.
2119         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2120         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2121         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2122         pthread_mutex_setprioceiling.
2123         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2124         PTHREAD_PRIO_PROTECT): New enum values.
2125         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2126         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2127         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2128         prototypes.
2129         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2130         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2131         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2132         Define.
2133         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2134         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2135         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2136         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2137         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2138         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2139         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2140         protocol mutexes.
2141         * pthread_mutex_getprioceiling.c: New file.
2142         * pthread_mutex_setprioceiling.c: New file.
2143         * pthread_mutexattr_getprioceiling.c: New file.
2144         * pthread_mutexattr_setprioceiling.c: New file.
2145         * pthread_mutexattr_getprotocol.c: New file.
2146         * pthread_mutexattr_setprotocol.c: New file.
2148 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2150         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2152 2006-02-27  Roland McGrath  <roland@redhat.com>
2154         * sysdeps/pthread/Subdirs: List nptl here too.
2155         * configure (libc_add_on_canonical): New variable.
2157         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2159         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2160         self to get main source tree's file.
2161         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2162         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2163         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2164         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2165         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2166         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2167         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2168         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2169         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2170         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2171         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2172         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2173         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2175         * Makefile: Use $(sysdirs) in vpath directive.
2177         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2178         (CPPFLAGS-timer_routines.c): Likewise.
2180         * Makeconfig (includes): Variable removed.
2182 2006-02-26  Roland McGrath  <roland@redhat.com>
2184         * sysdeps/generic/pt-raise.c: Moved to ...
2185         * pt-raise.c: ... here.
2186         * sysdeps/generic/lowlevellock.h: Moved to ...
2187         * lowlevellock.h: ... here.
2189 2006-02-23  Roland McGrath  <roland@redhat.com>
2191         * descr.h (struct pthread): Add final member `end_padding'.
2192         (PTHREAD_STRUCT_END_PADDING): Use it.
2194 2006-02-20  Roland McGrath  <roland@redhat.com>
2196         * sysdeps/mips: Directory removed, saved in ports repository.
2197         * sysdeps/unix/sysv/linux/mips: Likewise.
2199 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2201         * tst-robust1.c: Add second mutex to check that the mutex list is
2202         handled correctly.
2204 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2206         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2207         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2208         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2209         lll_robust_mutex_unlock): New macros.
2210         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2211         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2212         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2213         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2214         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2216 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2218         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2219         definitions.
2220         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2222 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2224         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2225         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2227         (lll_robust_mutex_unlock): Likewise.
2229 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2231         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2232         Set robust_list.__next rather than robust_list.
2233         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2234         (__pthread_list_t): New typedef.
2235         (pthread_mutex_t): Replace __next and __prev fields with __list.
2236         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2237         (__pthread_list_t): New typedef.
2238         (pthread_mutex_t): Replace __next and __prev fields with __list.
2239         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2240         (__pthread_list_t, __pthread_slist_t): New typedefs.
2241         (pthread_mutex_t): Replace __next and __prev fields with __list.
2242         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2243         (__pthread_list_t, __pthread_slist_t): New typedefs.
2244         (pthread_mutex_t): Replace __next and __prev fields with __list.
2245         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2246         (__pthread_list_t, __pthread_slist_t): New typedefs.
2247         (pthread_mutex_t): Replace __next and __prev fields with __list.
2248         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2249         (__pthread_slist_t): New typedef.
2250         (pthread_mutex_t): Replace __next field with __list.
2252 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2254         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2255         PTHREAD_MUTEX_OWNERDEAD.
2256         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2257         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2258         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2259         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2260         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2261         to PTHREAD_MUTEX_INCONSISTENT.
2262         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2263         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2264         * pthread_mutex_trylock.c: Likewise.
2265         * pthread_mutex_timedlock.c: Likewise.
2266         * pthread_mutex_unlock.c: Likewise.
2267         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2268         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2269         lowlevelrobustlock.sym.
2270         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2271         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2272         definitions.
2273         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2274         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2275         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2276         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2277         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2279 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2281         * allocatestack.c (allocate_stack): Initialize robust_list.
2282         * init.c (__pthread_initialize_minimal_internal): Likewise.
2283         * descr.h (struct xid_command): Pretty printing.
2284         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2285         robust_list.  Adjust macros.
2286         * pthread_create.c (start_thread): Adjust robust_list handling.
2287         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2288         but the owner for all robust mutex types.
2289         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2290         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2291         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2292         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2294         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2295         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2297 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2300         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2302 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2304         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2305         Return status.
2306         (lll_futex_timed_wait): Define.
2308 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2310         * tst-cancel4.c: Test ppoll.
2312 2006-01-18  Andreas Jaeger  <aj@suse.de>
2314         [BZ #2167]
2315         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2316         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2317         by Jim Gifford <patches@jg555.com>.
2319 2006-01-13  Richard Henderson  <rth@redhat.com>
2321         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2323 2006-01-10  Roland McGrath  <roland@redhat.com>
2325         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2326         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2327         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2328         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2329         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2330         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2331         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2332         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2333         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2334         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2336 2006-01-09  Roland McGrath  <roland@redhat.com>
2338         * tst-initializers1-c89.c: New file.
2339         * tst-initializers1-c99.c: New file.
2340         * tst-initializers1-gnu89.c: New file.
2341         * tst-initializers1-gnu99.c: New file.
2342         * Makefile (tests): Add them.
2343         (CFLAGS-tst-initializers1-c89.c): New variable.
2344         (CFLAGS-tst-initializers1-c99.c): New variable.
2345         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2346         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2348         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2349         Use __extension__ on anonymous union definition.
2350         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2351         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2352         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2353         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2354         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2356 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2358         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2359         Don't give the union a name because it changes the mangled name.
2360         Instead name the struct for __data.
2361         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2362         Likewise.
2363         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2364         Likewise.
2366 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2368         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2369         stack bias to mc_ftp field.
2371 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2373         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2374         being too clever and reloading the futex value where it shouldn't.
2376 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2378         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2379         correct type.
2381 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2383         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2384         Add cfi directives.
2386 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2388         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2389         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2390         rename in tcbhead_t.
2392         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2393         Don't give the union a name because it changes the mangled name.
2394         Instead name the struct for __data.
2395         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2396         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2397         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2398         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2399         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2400         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2402 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2404         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2405         Return status.
2406         (lll_futex_timed_wait): Define.
2407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2408         * sysdeps/pthread/aio_misc.h: New file.
2410 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2412         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2414 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2416         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2417         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2418         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2420 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2422         * tst-cancel24.cc: Use C headers instead of C++ headers.
2424 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2426         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2427         sparc-linux configured glibc.
2428         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2429         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2430         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2431         atomic_compare_and_exchange_val_24_acq instead of
2432         atomic_compare_and_exchange_val_acq.
2433         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2434         instead of atomic_exchange_rel.
2435         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2436         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2437         file.
2438         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2439         file.
2440         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2441         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2442         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2443         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2444         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2445         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2446         New file.
2447         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2448         New file.
2449         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2450         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2451         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2452         file.
2453         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2454         file.
2455         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2457 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2459         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2460         mutex initializers.
2462 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2464         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2465         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2466         THREAD_COPY_POINTER_GUARD): Define.
2467         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2468         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2470 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2472         * version.c: Update copyright year.
2474 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2476         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2477         .eh_frame section, use cfi_* directives.
2478         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2480 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2482         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2483         now.
2485 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2487         * sysdeps/pthread/sigaction.c: Removed.
2488         * sigaction.c: New file.
2489         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2491 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2493         * Makefile (tests): Add tst-signal7.
2494         * tst-signal7.c: New file.
2496 2005-12-27  Roland McGrath  <roland@redhat.com>
2498         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2499         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2500         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2501         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2502         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2503         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2504         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2505         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2506         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2507         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2508         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2510 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2512         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2513         and __prev field to pthread_mutex_t.
2514         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2515         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2516         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2517         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2518         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2519         to pthread_mutex_t.
2521 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2523         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2524         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2525         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2526         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2527         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2528         and PTHREAD_MUTEXATTR_FLAG_BITS.
2529         * descr.h (struct pthread): Add robust_list field and define
2530         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2531         * pthread_mutexattr_getrobust.c: New file.
2532         * pthread_mutexattr_setrobust.c: New file.
2533         * pthread_mutex_consistent.c: New file.
2534         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2535         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2536         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2537         Adjust pthread_mutex_t initializers.
2538         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2539         field to pthread_mutex_t.
2540         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2541         and __prev field to pthread_mutex_t.
2542         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2543         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2544         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2545         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2546         * pthread_mutexattr_gettype.c: Likewise.
2547         * pthread_mutexattr_setpshared.c: Likewise.
2548         * pthread_mutexattr_settype.c: Likewise.
2549         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2550         Initialize mutex kind according to robust flag.
2551         * pthread_mutex_lock.c: Implement local robust mutex.
2552         * pthread_mutex_timedlock.c: Likewise.
2553         * pthread_mutex_trylock.c: Likewise.
2554         * pthread_mutex_unlock.c: Likewise.
2555         * pthread_create.c (start_thread): Mark robust mutexes which remained
2556         locked as dead.
2557         * tst-robust1.c: New file.
2558         * tst-robust2.c: New file.
2559         * tst-robust3.c: New file.
2560         * tst-robust4.c: New file.
2561         * tst-robust5.c: New file.
2562         * tst-robust6.c: New file.
2563         * tst-robust7.c: New file.
2564         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2565         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2566         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2567         tst-robust5, tst-robust6, and tst-robust7.
2569         * tst-typesizes.c: New file.
2570         * Makefile (tests): Add tst-typesizes.
2572         * tst-once3.c: More debug output.
2574 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2576         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2577         missing after last change.
2579         * version.c: Update copyright year.
2581 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2583         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2584         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2585         * pthread_mutex_trylock.c: Likewise.
2586         * pthread_mutex_timedlock.c: Likewise.
2587         * pthread_mutex_unlock.c: Likewise.
2589 2005-12-22  Roland McGrath  <roland@redhat.com>
2591         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2592         so that #include_next's search location is not reset to the -I..
2593         directory where <nptl/...> can be found.
2595 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2597         [BZ #1913]
2598         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2599         Fix unwind info.  Remove useless branch prediction prefix.
2600         * tst-cancel24.cc: New file.
2601         * Makefile: Add rules to build and run tst-cancel24.
2603 2005-12-21  Roland McGrath  <roland@redhat.com>
2605         * libc-cancellation.c: Use <> rather than "" #includes.
2606         * pt-cleanup.c: Likewise.
2607         * pthread_create.c: Likewise.
2608         * pthread_join.c: Likewise.
2609         * pthread_timedjoin.c: Likewise.
2610         * pthread_tryjoin.c: Likewise.
2611         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2612         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2613         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2614         * unwind.c: Likewise.
2616 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2618         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2619         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2620         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2621         THREAD_COPY_POINTER_GUARD): Define.
2623 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2625         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2626         rather than one.
2627         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2628         THREAD_COPY_POINTER_GUARD): Define.
2629         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2630         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2631         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2632         THREAD_COPY_POINTER_GUARD): Define.
2633         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2634         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2635         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2636         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2637         Use PTR_DEMANGLE for B0 if defined.
2639 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2641         * pthread_create.c (__pthread_create_2_1): Use
2642         THREAD_COPY_POINTER_GUARD if available.
2643         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2644         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2645         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2646         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2647         * sysdeps/x86_64/tls.h: Likewise.
2649 2005-12-15  Roland McGrath  <roland@redhat.com>
2651         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2653 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2655         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2656         sysdeps/generic.
2657         * errno-loc.c: New file.
2659 2005-12-12  Roland McGrath  <roland@redhat.com>
2661         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2662         adjustments before choosing stack size.  Update minimum stack size
2663         calculation to match allocate_stack change.
2665 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2667         * allocatestack.c (allocate_stack): Don't demand that there is an
2668         additional full page available on the stack beside guard, TLS, the
2669         minimum stack.
2671 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2673         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2674         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2676         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2677         compiling 32-bit code we must define __cleanup_fct_attribute.
2679 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2681         [BZ #1920]
2682         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2683         __attribute__ instead of __attribute.
2684         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2685         (__cleanup_fct_attribute): Likewise.
2687 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2689         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2690         a write barrier before writing libgcc_s_getcfa.
2692 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2694         * sysdeps/unix/sysv/linux/configure: Removed.
2696 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2698         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2699         optional init_array/fini_array support.
2701 2005-10-24  Roland McGrath  <roland@redhat.com>
2703         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2704         versioned_symbol use.
2706 2005-10-16  Roland McGrath  <roland@redhat.com>
2708         * init.c (__pthread_initialize_minimal_internal): Even when using a
2709         compile-time default stack size, apply the minimum that allocate_stack
2710         will require, and round up to page size.
2712 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2714         * Makefile ($(test-modules)): Remove static pattern rule.
2716 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2717             Ulrich Drepper  <drepper@redhat.com>
2719         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2720         alignment in callback function.
2721         * Makefile: Add rules to build and run tst-align3.
2722         * tst-align3.c: New file.
2724 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2726         * allocatestack.c (setxid_signal_thread): Add
2727         INTERNAL_SYSCALL_DECL (err).
2729 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2731         * allocatestack.c (setxid_signal_thread): Need to use
2732         atomic_compare_and_exchange_bool_acq.
2734 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2735             Jakub Jelinek  <jakub@redhat.com>
2737         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2738         CANCEL_RESTMASK.
2739         (struct pthread): Move specific_used field to avoid padding.
2740         Add setxid_futex field.
2741         * init.c (sighandler_setxid): Reset setxid flag and release the
2742         setxid futex.
2743         * allocatestack.c (setxid_signal_thread): New function.  Broken
2744         out of the bodies of the two loops in __nptl_setxid.  For undetached
2745         threads check whether they are exiting and if yes, don't send a signal.
2746         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2747         * pthread_create.c (start_thread): For undetached threads, check
2748         whether setxid bit is set.  If yes, wait until signal has been
2749         processed.
2751         * allocatestack.c (STACK_VARIABLES): Initialize them.
2752         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2754 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2756         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2757         waiters, awake all waiters on the associated mutex.
2759 2005-09-22  Roland McGrath  <roland@redhat.com>
2761         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2762         ../sysdeps/x86_64/hp-timing.h).
2764 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2766         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2767         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2768         (lll_futex_wake_unlock): Define.
2769         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2770         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2771         (lll_futex_wake_unlock): Define.
2772         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2773         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2774         (lll_futex_wake_unlock): Define.
2775         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2776         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2777         (lll_futex_wake_unlock): Define.
2778         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2779         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2780         (lll_futex_wake_unlock): Define.
2781         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2782         lll_futex_wake_unlock.
2783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2784         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2785         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2787         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2788         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2790 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2792         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2793         Fix typo in register name.
2795 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
2797         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2798         Use __sigfillset.  Document that sigfillset does the right thing wrt
2799         to SIGSETXID.
2801 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2803         [BZ #1102]
2804         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2805         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2806         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2807         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2808         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2809         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2810         in the structure.
2811         * Makefile (tests): Add tst-initializers1.
2812         (CFLAGS-tst-initializers1.c): Set.
2813         * tst-initializers1.c: New test.
2815 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2817         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2818         Make sure __flags are located at offset 48 from the start of the
2819         structure.
2821 2005-07-02  Roland McGrath  <roland@redhat.com>
2823         * Makeconfig: Comment fix.
2825 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
2827         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2828         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2829         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2830         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2831         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2832         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2833         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2834         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2835         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2836         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2838 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
2840         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2841         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2842         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2843         fields.
2844         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2845         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2846         field.  Put in sysinfo field unconditionally.
2847         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2848         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2849         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2850         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2851         fields.
2852         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2853         * pthread_create.c (__pthread_create_2_1): Use
2854         THREAD_COPY_STACK_GUARD macro.
2855         * Makefile: Add rules to build and run tst-stackguard1{,-static}
2856         tests.
2857         * tst-stackguard1.c: New file.
2858         * tst-stackguard1-static.c: New file.
2860 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
2862         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2863         Invoke CGOTSETUP and CGOTRESTORE.
2864         (CGOTSETUP, CGOTRESTORE): Define.
2866 2005-05-29  Richard Henderson  <rth@redhat.com>
2868         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2869         (tf_write, tf_writev): Use it.
2870         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
2871         the system minimum.
2873 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
2875         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2876         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2877         __librt_*_asynccancel@local.
2879 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
2881         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2882         all occurrences of JUMPTARGET.  Instead append @local to labels.
2884 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
2886         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2887         size/alignment of struct pthread rather than tcbhead_t.
2888         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2889         Likewise.
2890         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2891         Likewise.
2892         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2893         Likewise.
2895 2005-05-19  Richard Henderson  <rth@redhat.com>
2897         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2898         __sync_val_compare_and_swap, not explicit _si variant.
2899         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2901 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
2903         [BZ #915]
2904         * sysdeps/pthread/pthread.h: Avoid empty initializers.
2906 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
2908         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2909         .eh_frame section, use cfi_* directives.
2911 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
2913         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2914         of "" includes.
2916 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
2918         [BZ #1075]
2919         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2920         aio_write blocks.
2922 2005-04-27  Roland McGrath  <roland@redhat.com>
2924         * Makefile (tests): Remove tst-clock2.
2926         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2927         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2928         translating to the kernel clockid_t for our own process/thread clock.
2930         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2932 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
2934         * old_pthread_cond_init.c: Include <errno.h>.
2935         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2936         process shared or uses clock other than CLOCK_REALTIME.
2937         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2939 2005-04-13  David S. Miller  <davem@davemloft.net>
2941         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2942         * sysdeps/sparc/sparc64/clone.S: New file.
2944 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2946         [BZ #1102]
2947         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2948         __inline instead of inline.
2949         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2951 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
2953         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2954         functionally equivalent, but shorter instructions.
2955         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2956         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2957         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2958         Likewise.
2959         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2960         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2961         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2962         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2964         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2965         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2966         Likewise.
2967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2968         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2969         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2970         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2971         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2973 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
2975         * sysdeps/mips/Makefile: New file.
2976         * sysdeps/mips/nptl-sysdep.S: New file.
2977         * sysdeps/mips/tcb-offsets.sym: New file.
2978         * sysdeps/mips/pthread_spin_lock.S: New file.
2979         * sysdeps/mips/pthread_spin_trylock.S: New file.
2980         * sysdeps/mips/pthreaddef.h: New file.
2981         * sysdeps/mips/tls.h: New file.
2982         * sysdeps/mips/jmpbuf-unwind.h: New file.
2983         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
2984         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
2985         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
2986         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
2987         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
2988         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
2989         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
2990         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
2991         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
2992         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
2994 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
2996         [BZ #1112]
2997         * pthread_create.c (__pthread_create_2_1): Rename syscall error
2998         variable to scerr.
3000 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3002         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3004 2005-02-25  Roland McGrath  <roland@redhat.com>
3006         * alloca_cutoff.c: Correct license text.
3007         * tst-unload.c: Likewise.
3008         * sysdeps/pthread/allocalim.h: Likewise.
3009         * sysdeps/pthread/pt-initfini.c: Likewise.
3010         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3011         * sysdeps/pthread/bits/sigthread.h: Likewise.
3012         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3013         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3015 2005-02-16  Roland McGrath  <roland@redhat.com>
3017         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3018         Use unsigned int * for ptr_nthreads.
3020 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3022         [BZ #721]
3023         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3024         gcc4.
3026 2005-02-07  Richard Henderson  <rth@redhat.com>
3028         [BZ #787]
3029         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3030         argument.
3032 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3034         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3035         order of arguments in invocation of atomic_add_zero.
3037 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3039         [BZ #737]
3040         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3041         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3042         at least gotntpoff relocation and addition.
3043         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3044         Likewise.
3045         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3046         Likewise.
3047         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3048         Likewise.
3050 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3052         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3053         entry for static tls deallocation fix.
3054         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3055         also contains information whether the memory pointed to is static
3056         TLS or not.
3057         * sysdeps/i386/tls.h: Likewise.
3058         * sysdeps/ia64/tls.h: Likewise.
3059         * sysdeps/powerpc/tls.h: Likewise.
3060         * sysdeps/s390/tls.h: Likewise.
3061         * sysdeps/sh/tls.h: Likewise.
3062         * sysdeps/sparc/tls.h: Likewise.
3063         * sysdeps/x86_64/tls.h: Likewise.
3065 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3067         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3069 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3071         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3072         %esp.
3073         * Makefile (tests): Add tst-align2.
3074         * tst-align2.c: New test.
3075         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3076         -mpreferred-stack-boundary=4.
3078 2004-12-18  Roland McGrath  <roland@redhat.com>
3080         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3081         New file removed withdrawn for the moment.
3083 2004-12-17  Richard Henderson  <rth@redhat.com>
3085         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3086         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3088 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3090         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3091         Increased PTHREAD_STACK_MIN.
3093         * tst-context1.c (stacks): Use bigger stack size.
3095 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3097         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3098         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3100 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3102         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3103         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3104         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3106 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3108         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3110 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3112         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3113         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3115         * tst-getpid1.c: If child crashes, report this first.  Print which
3116         signal.
3118 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3120         * init.c (__pthread_initialize_minimal_internal): Also unblock
3121         SIGSETXID.
3123 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3125         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3126         _POSIX_THREAD_CPUTIME): Define to 0.
3127         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3128         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3129         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3130         __timer_signal_thread_tclk): Remove.
3131         (init_module): Remove their initialization.
3132         (thread_cleanup): Remove their cleanup assertions.
3133         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3134         __timer_signal_thread_tclk): Remove.
3135         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3136         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3137         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3139 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3141         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3142         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3144         * Makefile (tests): Add tst-getpid2.
3145         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3146         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3147         * tst-getpid2.c: New test.
3149 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3151         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3153 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3155         * Makefile (tests): Add tst-getpid1.
3156         * tst-getpid1.c: New file.
3157         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3158         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3160 2004-12-02  Roland McGrath  <roland@redhat.com>
3162         * Makefile (libpthread-nonshared): Variable removed.
3163         ($(objpfx)libpthread_nonshared.a): Target removed.
3164         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3165         These are now handled by generic magic from
3166         libpthread-static-only-routines being set.
3168 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3170         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3171         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3172         _POSIX_THREAD_PRIO_PROTECT): Define.
3173         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3174         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3175         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3177 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3179         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3180         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3181         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3182         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3183         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3184         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3185         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3187 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3189         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3191         * Makefile (libpthread-routines): Add pthread_setschedprio.
3192         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3193         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3194         * pthread_setschedprio.c: New file.
3196 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3198         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3199         * pthread_cancel.c (pthread_create): Likewise.
3201         * Makefile (libpthread-routines): Add vars.
3202         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3203         * init.c (__default_stacksize, __is_smp): Remove.
3204         * vars.c: New file.
3205         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3206         and define a wrapper macro.
3207         (PTHREAD_STATIC_FN_REQUIRE): Define.
3208         * allocatestack.c (__find_thread_by_id): Undefine.
3209         * pthread_create (__pthread_keys): Remove.
3210         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3211         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3212         PTHREAD_STATIC_FN_REQUIRE.
3214 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3216         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3217         parameter to REGISTER macro.
3219 2004-11-17  Roland McGrath  <roland@redhat.com>
3221         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3222         Make sure SIGCANCEL is blocked as well.
3224 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3226         * sysdeps/pthread/setxid.h: New file.
3227         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3228         (struct xid_command): Add forward decl.
3229         (struct pthread_functions): Change return type of __nptl_setxid hook
3230         to int.
3231         * pthreadP.h (__nptl_setxid): Change return type to int.
3232         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3233         calling thread, return its return value and set errno on failure.
3234         * descr.h (struct xid_command): Change id type to long array.
3236         * Makefile: Add rules to build and test tst-setuid1 and
3237         tst-setuid1-static.
3238         * tst-setuid1.c: New test.
3239         * tst-setuid1-static.c: New test.
3241 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3243         * Makefile (tests): Add tst-exit3.
3244         * tst-exit3.c: New test.
3246 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3248         * Makefile (tests): Add tst-exit2.
3249         * tst-exit2.c: New file.
3251 2004-11-09  Roland McGrath  <roland@redhat.com>
3253         [BZ #530]
3254         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3255         here, before calling clone.
3256         * pthread_create.c (start_thread): Don't do it here.
3258 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3260         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3262 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3264         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3265         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3266         assembler warning.
3268 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3270         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3271         if sched_priority is not between minprio and maxprio.
3273 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3275         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3276         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3278         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3279         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3281 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3283         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3284         not-cancelable I/O functions.
3286 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3288         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3289         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3290         make sure 2 is stored in the futex and we looked at the old value.
3291         Fix a few other problems to return the correct value.
3293 2004-10-14  Richard Henderson  <rth@redhat.com>
3295         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3296         make gcc4 happy.
3298 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3300         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3301         of pthread-functions.h and pthreaddef.h.
3302         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3304         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3305         Change __data.__nwaiters from int to unsigned int.
3307         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3308         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3310         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3311         before return type.
3313         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3314         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3316 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3318         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3319         test fails, remove message queue.
3320         (tf_msgsnd): Likewise.
3322 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3324         * tst-clock1.c: Change #ifdef to #if defined.
3325         * tst-clock2.c: Likewise.
3326         * tst-cond11.c: Likewise.
3328         * sysdeps/pthread/timer_create.c (timer_create): Use
3329         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3330         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3331         THREAD_CPUTIME.
3333 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3335         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3336         _POSIX_THREAD_CPUTIME): Define to 0.
3338 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3340         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3341         and _POSIX_THREAD_CPUTIME to zero.
3342         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3343         * tst-barrier2.c: Fix testing for POSIX feature.
3344         * tst-clock1.c: Likewise.
3345         * tst-clock2.c: Likewise.
3346         * tst-cond11.c: Likewise.
3347         * tst-cond4.c: Likewise.
3348         * tst-cond6.c: Likewise.
3349         * tst-flock2.c: Likewise.
3350         * tst-mutex4.c: Likewise.
3351         * tst-mutex9.c: Likewise.
3352         * tst-rwlock12.c: Likewise.
3353         * tst-rwlock4.c: Likewise.
3354         * tst-signal1.c: Likewise.
3355         * tst-spin2.c: Likewise.
3356         * sysdeps/pthread/posix-timer.h: Likewise.
3357         * sysdeps/pthread/timer_create.c: Likewise.
3358         * sysdeps/pthread/timer_routines.c: Likewise.
3360 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3362         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3363         (__lll_mutex_timedlock_wait): Address futex correctly.
3365         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3366         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3367         make sure 2 is stored in the futex and we looked at the old value.
3368         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3369         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3370         which might very well made the code not working at all before.
3371         [BZ #417]
3373 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3375         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3376         allow SIGSETXID to be sent.
3377         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3378         for SIGSETXID to be defined.
3379         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3380         SIGSETXID cannot be blocked.
3382         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3383         Add __extension__ to long long types.
3384         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3385         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3386         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3387         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3388         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3389         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3390         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3392 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3394         * descr.h (struct pthread): Add stopped_start field.
3395         * sysdeps/pthread/createthread.c (create_thread): Set
3396         start_stopped flag in descriptor for new thread appropriately.
3397         * pthread_create.c (start_thread): Only take lock to be stopped on
3398         startup if stopped_start flag says so.
3400 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3402         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3403         is created detached and if yes, do not try to free the stack in case
3404         the thread creation failed.
3405         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3406         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3407         case there has been no error.  [BZ #405]
3409         * pthread_create.c (start_thread): Don't wait for scheduler data
3410         etc to be set at the beginning of the function.  The cancellation
3411         infrastructure must have been set up.  And enable async
3412         cancellation before potentially going to sleep.  [BZ #401]
3414 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3416         * Versions: Remove exports for pthread_set*id_np functions.
3417         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3418         for now.
3419         * Makefile: Don't build pthread_set*id code for now.
3421 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3423         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3424         internal use.
3425         * allocatestack.c (__nptl_setxid): New function.
3426         * descr.h (struct xid_command): Define type.
3427         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3428         (sighandler_setxid): New function.
3429         (__pthread_initialize_minimal): Register sighandler_setxid for
3430         SIGCANCEL.
3431         * pt-allocrtsig.c: Update comment.
3432         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3433         Declare __nptl_setxid.
3434         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3435         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3436         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3437         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3438         and pthread_setresuid_np.
3439         * pthread_setgid_np.c: New file.
3440         * pthread_setuid_np.c: New file.
3441         * pthread_setegid_np.c: New file.
3442         * pthread_seteuid_np.c: New file.
3443         * pthread_setregid_np.c: New file.
3444         * pthread_setreuid_np.c: New file.
3445         * pthread_setresgid_np.c: New file.
3446         * pthread_setresuid_np.c: New file.
3447         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3448         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3449         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3450         and pthread_setresuid_np.
3451         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3452         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3453         pthread_setregid, and pthread_setresgid.
3455 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3457         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3458         ENOMEM when out of memory.
3460 2004-09-10  Roland McGrath  <roland@redhat.com>
3462         [BZ #379]
3463         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3464         code, since we don't try to use the broken CLONE_STOPPED any more.
3465         * pthread_create.c (start_thread): Likewise.
3467 2004-09-15  Richard Henderson  <rth@redhat.com>
3469         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3471 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3473         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3474         (__libc_unwind_longjmp): Delete macro and declare as function.
3475         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3476         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3477         nptl directory.
3478         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3479         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3480         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3482 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3484         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3485         for __USE_XOPEN2K.
3486         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3487         types also for __USE_XOPEN2K.
3488         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3489         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3490         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3491         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3492         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3493         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3494         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3495         [BZ #320]
3497 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3499         * sysdeps/pthread/pthread.h
3500         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3501         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3502         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3503         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3504         [BZ #375]
3506 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3508         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3509         PSEUDO to be used with . prefix.
3511         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3512         Use atomic_increment instead of atomic_exchange_and_add.
3513         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3514         Likewise.
3515         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3516         Likewise.
3517         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3518         Likewise.
3520         * allocatestack.c (allocate_stack): Use atomic_increment_val
3521         instead of atomic_exchange_and_add.
3522         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3523         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3524         Likewise.
3525         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3526         Likewise.
3528         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3529         the initialization function might throw.
3531 2005-09-05  Richard Henderson  <rth@redhat.com>
3533         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3534         Move definition inside libpthread, libc, librt check.  Provide
3535         definition for rtld.
3537 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3539         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3540         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3541         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3542         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3543         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3544         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3545         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3546         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3547         * unwind.c: Use it.
3549         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3550         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3551         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3552         Likewise.
3553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3554         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3555         this is the last waiter, signal pthread_cond_destroy caller and
3556         avoid using the pthread_cond_t structure after unlock.
3557         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3558         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3559         Read clock type from the least significant bits of __nwaiters instead
3560         of __clock.
3561         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3562         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3564 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3566         [BZ #342]
3567         * Makefile (tests): Add tst-cond20 and tst-cond21.
3568         * tst-cond20.c: New test.
3569         * tst-cond21.c: New test.
3570         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3571         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3572         it unsigned int.
3573         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3574         Likewise.
3575         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3576         (pthread_cond_t): Likewise.
3577         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3578         Likewise.
3579         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3580         Likewise.
3581         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3582         Likewise.
3583         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3584         (cond_nwaiters): New.
3585         (clock_bits): New.
3586         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3587         if there are waiters not signalled yet.
3588         Wait until all already signalled waiters wake up.
3589         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3590         __nwaiters.  If pthread_cond_destroy has been called and this is the
3591         last waiter, signal pthread_cond_destroy caller and avoid using
3592         the pthread_cond_t structure after unlock.
3593         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3594         decrement it when leaving.  If pthread_cond_destroy has been called
3595         and this is the last waiter, signal pthread_cond_destroy caller.
3596         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3597         Likewise.  Read clock type from the least significant bits of
3598         __nwaiters instead of __clock.
3599         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3600         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3601         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3602         clock type just from the last COND_CLOCK_BITS bits of value.
3603         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3604         instead of __clock, just from second bit of condattr's value.
3606 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3608         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3609         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3610         != 64.
3611         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3613 2004-08-15  Roland McGrath  <roland@frob.com>
3615         * pthread_atfork.c: Update copyright terms including special exception
3616         for these trivial files, which are statically linked into executables
3617         that use dynamic linking for the significant library code.
3619 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3621         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3622         pthread_rwlock_rdlock.
3623         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3624         Decrease __nr_readers_queued after reacquiring lock.
3625         * sysdeps/pthread/pthread_rwlock_timedrdlock
3626         (pthread_rwlock_timedrdlock): Likewise.
3627         Reported by Bob Cook <bobcook47@hotmail.com>.
3629 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3631         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3632         before pthread_barrier_wait.
3634 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3637         Remove unnecessary exception handling data.
3639 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3641         [BZ #284]
3642         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3643         instead of clockid_t.
3645 2004-07-21  Roland McGrath  <roland@redhat.com>
3647         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3649 2004-07-19  Roland McGrath  <roland@redhat.com>
3651         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3653 2004-07-02  Roland McGrath  <roland@redhat.com>
3655         * configure: Don't exit.
3657 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3659         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3660         (__pthread_cond_timedwait): Check for invalid nanosecond in
3661         timeout value.
3663 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3665         * Makefile: Add rules to build and run tst-fini1.
3666         * tst-fini1.c: New file.
3667         * tst-fini1mod.c: New file.
3669 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3671         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3672         if no cancellation support is needed.
3673         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3674         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3675         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3677         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3678         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3679         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3680         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3681         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3683         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3684         only if not already defined.
3686 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3688         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3689         constraint "m" instead of "0" for futex.
3691         * shlib-versions: Add powerpc64-.*-linux.*.
3693 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3695         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3696         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3697         for valid tv_nsec.
3698         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3699         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3700         bits.
3702 2004-06-29  Roland McGrath  <roland@redhat.com>
3704         * Banner: NPTL no longer has its own version number.
3705         * Makefile (nptl-version): Variable removed.
3706         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3707         using $(version), the glibc version number.
3709 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3711         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3712         Fix branch offset for a PLT entry.
3713         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3714         Likewise.
3715         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3716         Likewise.
3717         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3718         Likewise.
3719         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3720         Likewise.
3722 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3724         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3725         unconditionally.
3727 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3729         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3730         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3731         instead of tv_sec.
3732         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3733         (pthread_rwlock_timedrdlock): Likewise.
3735 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3737         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3738         Set __r7 to val, not mutex.
3740 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3742         * Makefile: Add rules to build tst-rwlock14.
3743         * tst-rwlock14.c: New file.
3745 2004-06-24  Boris Hu  <boris.hu@intel.com>
3747         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3748         check.
3749         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3751 2004-06-19  Andreas Jaeger  <aj@suse.de>
3753         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3754         assembler in last patch.
3756 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3758         * sysdeps/pthread/pthread_cond_timedwait.c
3759         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3761         (__pthread_cond_timedwait): Check for invalid nanosecond in
3762         timeout value.
3763         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3764         * tst-cond19.c: New file.
3765         * Makefile: Add rules to build and run tst-cond19.
3767 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3769         * tst-context1.c (GUARD_PATTERN): Defined.
3770         (tst_context_t): Define struct containing ucontext_t & guard words.
3771         (ctx): Declare as an array of tst_context_t.
3772         (fct): Verify uc_link & guard words are still valid.
3773         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
3775 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3777         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3778         Add __data.__futex field, reshuffle __data.__clock.
3779         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3780         (__pthread_cond_signal): Increment __futex at the same time as
3781         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3782         address of low 32-bits of __wakeup_seq to futex syscall.
3783         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3784         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3785         releasing internal lock to FUTEX_WAIT.
3786         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3787         (__pthread_cond_timedwait): Likewise.
3788         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3789         (FUTEX_CMP_REQUEUE): Define.
3790         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3791         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3792         Pass __futex value from before the unlock and __futex address instead
3793         of address of low 32-bits of __wakeup_seq to futex syscall.
3794         Fallback to FUTEX_WAKE all on any errors.
3796 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
3798         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3799         comment typo.
3800         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3801         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3802         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3803         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3804         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
3806 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3808         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3809         Add memory clobber to inline assembly.
3810         (__lll_mutex_trylock): Likewise.
3811         (__lll_mutex_cond_trylock): Likewise.
3813 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3815         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3816         Pass val argument as 6th system call argument in %r7.
3818 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3820         * Makefile (tests): Add tst-cond16.
3821         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3822         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3823         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3824         Add __data.__futex field, reshuffle __data.__clock.
3825         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3826         (__pthread_cond_signal): Increment __futex at the same time as
3827         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3828         address of low 32-bits of __wakeup_seq to futex syscall.
3829         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3830         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3831         releasing internal lock to FUTEX_WAIT.
3832         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3833         (__pthread_cond_timedwait): Likewise.
3834         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3835         (FUTEX_CMP_REQUEUE): Define.
3836         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3837         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3838         Pass __futex value from before the unlock and __futex address instead
3839         of address of low 32-bits of __wakeup_seq to futex syscall.
3840         Fallback to FUTEX_WAKE all on any errors.
3841         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3842         Define.
3843         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3844         internally.  Return non-zero if error, zero if success.
3845         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3846         Add __data.__futex field, reshuffle __data.__clock.
3847         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3848         Define.
3849         (lll_futex_requeue): Add val argument, return 1 unconditionally
3850         for the time being.
3851         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3852         Add __data.__futex field, reshuffle __data.__clock.
3853         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3854         Define.
3855         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3856         internally.  Return non-zero if error, zero if success.
3857         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3858         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3859         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3860         Define.
3861         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3862         internally.  Return non-zero if error, zero if success.
3863         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3864         Add __data.__futex field, reshuffle __data.__clock.
3865         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3866         Define.
3867         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3868         internally.  Return non-zero if error, zero if success.
3869         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3870         Add __data.__futex field, reshuffle __data.__clock.
3871         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3872         Add __data.__futex field, reshuffle __data.__clock.
3873         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3874         Increment __futex at the same time as __wakeup_seq or __total_seq.
3875         Pass address of __futex instead of address of low 32-bits of
3876         __wakeup_seq to futex syscall.
3877         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3878         Pass __futex value from before releasing internal lock
3879         to FUTEX_WAIT.
3880         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3881         Likewise.  Avoid unnecessary shadowing of variables.
3882         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3883         Set __futex to 2 * __total_seq.  Pass __futex value from before the
3884         unlock and __futex address instead of address of low 32-bits of
3885         __wakeup_seq to futex_requeue macro, adjust for new return value
3886         meaning.
3887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3888         (__pthread_cond_signal): Increment __futex at the same time as
3889         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3890         address of low 32-bits of __wakeup_seq to futex syscall.
3891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3892         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3893         releasing internal lock to FUTEX_WAIT.
3894         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3895         (__pthread_cond_timedwait): Likewise.
3896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3897         (FUTEX_CMP_REQUEUE): Define.
3898         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3899         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3900         Pass __futex value from before the unlock and __futex address instead
3901         of address of low 32-bits of __wakeup_seq to futex syscall.
3902         Fallback to FUTEX_WAKE all on any errors.
3904 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3906         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3907         Add nop to align the end of critical section.
3908         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3910 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3912         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3913         Add __broadcast_seq field.
3914         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3915         all waiters as woken with woken_seq and bump broadcast counter.
3916         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3917         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
3918         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3919         Comment typo fixes.  Avoid returning -ETIMEDOUT.
3921 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
3923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3924         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3925         Reported by Kaz Kojima.
3927 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
3929         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3931 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3933         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3934         __broadcast_seq with bc_seq after acquiring internal lock instead of
3935         before it.
3937 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
3939         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3940         compilation.
3941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3942         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3943         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3944         (pthread_cond_t): Add __data.__broadcast_seq field.
3945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3946         (FRAME_SIZE): Define.
3947         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
3948         Comment typo fixes.
3949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3950         Define.
3951         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
3952         typo fixes.
3953         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3954         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
3955         fixes.
3957 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
3959         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
3960         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3961         Add __broadcast_seq field.
3962         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3963         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3964         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3965         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3966         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
3968         all waiters as woken with woken_seq and bump broadcast counter.
3969         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
3970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
3971         __broadcast_seq field.
3972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3973         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3974         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3975         * pthread_cond_init.c: Initialize __broadcast_seq field.
3976         * Makefile (tests): Add tst-cond17 and tst-cond18.
3977         Add .NOTPARALLEL goal.
3978         * tst-cond16.c: New file.  From Jakub.
3979         * tst-cond17.c: New file.  From Jakub.
3980         * tst-cond18.c: New file.  From Jakub.
3982 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
3984         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
3985         unwind info.
3987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3988         Parametrize frame size.  Correct some unwind info.
3989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3991 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3993         * tst-stack3.c: Note testing functionality beyond POSIX.
3995 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
3997         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
3998         Change conditional from ifdef to if.
4000 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4002         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4003         SYSDEP_CANCEL_ERROR): Define.
4004         (PSEUDO): Use it.
4006 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4008         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4010 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4012         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4014 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4016         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4017         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4018         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4019         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4021 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4023         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4024         thread has all signals blocked.
4026 2004-04-18  Andreas Jaeger  <aj@suse.de>
4028         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4029         (SEM_VALUE_MAX): Add missing brace.
4031 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4033         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4034         in rt subdir.
4035         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4036         * sysdeps/pthread/tst-mqueue8x.c: New test.
4037         * tst-cancel4.c: Update comment about message queues.
4039         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4040         return it_value { 0, 0 }.
4041         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4042         like SIGEV_SIGNAL.
4043         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4044         assertion for SIGEV_NONE.
4045         (thread_attr_compare): Compare all attributes, not just a partial
4046         subset.
4048 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4050         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4052 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4054         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4055         Just use a plain number.
4056         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4057         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4058         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4059         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4060         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4061         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4062         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4064 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4066         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4067         frame info.
4068         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4070 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4072         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4073         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4074         of calling sigwaitinfo.
4076 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4078         * allocatestack.c (allocate_stack): Set reported_guardsize
4079         unconditionally.
4080         * pthread_getattr_np.c (pthread_getattr_np): Use
4081         reported_guardsize instead of guardsize.
4082         * descr.h (struct pthread): Add reported_guardsize field.
4084 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4086         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4088 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4090         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4092 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4094         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4095         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4096         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4097         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4098         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4099         Define.
4100         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4101         (_POSIX_MESSAGE_PASSING): Define.
4102         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4103         (_POSIX_MESSAGE_PASSING): Define.
4104         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4105         (_POSIX_MESSAGE_PASSING): Define.
4107 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4109         * tst-context1.c (fct): Check whether correct stack is used.
4111 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4113         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4114         matching constraints for asm mem parameters.
4116         * tst-clock2.c (tf): Don't define unless needed.
4118 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4120         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4121         $(gnulib).
4123 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4125         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4126         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4127         * pthreadP.h: Declare __nptl_deallocate_tsd.
4128         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4129         Adjust caller.
4131         * Makefile (tests): Add tst-tsd5.
4132         * tst-tsd5.c: New file.
4134 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4136         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4137         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4138         is SHLIB_COMPAT check.
4139         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4140         (__pthread_attr_getaffinity_old): Likewise.
4141         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4142         (__pthread_getaffinity_old): Likewise.
4143         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4144         (__pthread_setaffinity_old): Likewise.
4146 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4148         * allocatestack.c (_make_stacks_executable): Call
4149         _dl_make_stack_executable first.
4151 2004-03-24  Roland McGrath  <roland@redhat.com>
4153         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4154         constraint instead of "0".
4156 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4158         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4159         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4161         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4162         code to avoid warning.
4164 2004-03-24  Andreas Jaeger  <aj@suse.de>
4166         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4167         (__pthread_attr_setaffinity_old): Remove const.
4169 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4171         * sysdeps/unix/sysv/linux/smp.h: New file.
4172         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4173         * init.c: Define __is_smp.
4174         (__pthread_initialize_minimal_internal): Call is_smp_system to
4175         initialize __is_smp.
4176         * pthreadP.h: Declare __is_smp.
4177         Define MAX_ADAPTIVE_COUNT is necessary.
4178         * pthread_mutex_init.c: Add comment regarding __spins field.
4179         * pthread_mutex_lock.c: Implement adaptive mutex type.
4180         * pthread_mutex_timedlock.c: Likewise.
4181         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4182         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4183         Add __spins field.
4184         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4185         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4186         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4187         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4188         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4189         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4190         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4191         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4192         lll_mutex_cond_trylock.
4193         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4194         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4195         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4196         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4197         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4198         Define BUSY_WAIT_NOP.
4199         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4200         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4202         * tst-mutex5.c: Add support for testing adaptive mutexes.
4203         * tst-mutex7.c: Likewise.
4204         * tst-mutex5a.c: New file.
4205         * tst-mutex7a.c: New file.
4206         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4209         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4210         vgettimeofday call might destroy the content.
4212         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4213         @pause in the loop.
4215         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4216         No need to restrict type of ret.  Make it int.  Add comment.
4218         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4219         Remove unnecessary setne instruction.
4221 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4223         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4224         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4225         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4226         If realloc fails, break out of the loop.
4228 2004-03-20  Andreas Jaeger  <aj@suse.de>
4230         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4231         (__pthread_setaffinity_old): Fix interface.
4232         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4233         (__pthread_getaffinity_old): Likewise.
4235         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4236         (__pthread_setaffinity_new): Remove duplicate declaration.
4238 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4240         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4241         the return value to a safe register.
4242         (CDISABLE): Set the function argument correctly.
4244 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4246         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4247         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4248         Rewrite so that only one locked memory operation per round is needed.
4249         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4250         (pthread_barrier_wait): After wakeup, release lock only when the
4251         last thread stopped using the barrier object.
4252         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4253         (__pthread_cond_wait): Don't store mutex address if the current
4254         value is ~0l.  Add correct cleanup support and unwind info.
4255         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4256         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4257         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4258         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4259         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4260         Add correct cleanup support and unwind info.
4261         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4262         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4263         information for syscall wrappers.
4265 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4267         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4268         cpusetsize field, remove next.
4269         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4270         parameter for size of the CPU set.
4271         (pthread_setaffinity_np): Likewise.
4272         (pthread_attr_getaffinity_np): Likewise.
4273         (pthread_attr_setaffinity_np): Likewise.
4274         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4275         interface change, keep compatibility code.
4276         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4277         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4278         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4279         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4280         __pthread_getaffinity_np.
4281         * Versions: Add version for changed interfaces.
4282         * tst-attr3.c: Adjust test for interface change.
4283         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4284         increasing buffer sizes.
4285         * pthread_attr_destroy.c: Remove unused list handling.
4286         * pthread_attr_init.c: Likewise.
4288 2004-03-17  Roland McGrath  <roland@redhat.com>
4290         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4291         first argument to clock_getres so we ever enable kernel timers.
4293 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4295         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4297 2004-03-12  Richard Henderson  <rth@redhat.com>
4299         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4300         oldvalue from CENABLE to CDISABLE.
4302 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4304         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4305         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4306         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4307         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4309 2004-03-11  Richard Henderson  <rth@redhat.com>
4311         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4312         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4313         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4315 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4317         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4318         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4319         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4321 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4323         * forward.c (__pthread_cond_broadcast_2_0,
4324         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4325         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4326         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4328 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4330         * sysdeps/sh/tcb-offsets.sym: Add PID.
4331         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4332         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4334 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4336         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4337         include <sysdep-cancel.h>, vfork is no cancellation point.
4338         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4339         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4340         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4342 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4344         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4345         libc_hidden_def.
4346         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4347         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4348         Likewise.
4349         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4350         Likewise.
4351         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4352         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4353         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4354         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4355         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4357         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4358         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4359         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4360         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4361         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4362         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4364         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4365         a local register for saving old PID.  Negate PID in parent upon exit.
4367         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4368         tcb-offsets.h.
4369         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4370         before syscall, set to the old value in the parent afterwards.
4371         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4372         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4373         tcb-offsets.h.
4374         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4375         before syscall, set to the old value in the parent afterwards.
4376         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4377         * sysdeps/s390/tcb-offsets.sym: Add PID.
4379         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4380         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4381         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4382         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4383         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4384         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4386 2004-03-10  Andreas Schwab  <schwab@suse.de>
4388         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4389         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4390         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4392 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4394         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4395         * tst-cancel21.c (do_one_test): Likewise.
4396         Reported by Gordon Jin <gordon.jin@intel.com>.
4398 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4400         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4401         if non-zero and set to INT_MIN if zero.
4402         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4403         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4404         (SAVE_PID, RESTORE_PID): Define.
4405         (__vfork): Use it.
4406         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4407         Use relative path to avoid including NPTL i386/vfork.S.
4408         (SAVE_PID, RESTORE_PID): Define.
4409         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4410         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4411         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4412         tst-vfork2x.
4413         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4414         * tst-vfork1.c: New test.
4415         * tst-vfork2.c: New test.
4416         * tst-vfork1x.c: New test.
4417         * tst-vfork2x.c: New test.
4419 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4421         * sysdeps/i386/tcb-offsets.sym: Add PID.
4422         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4423         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4424         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4426 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4428         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4430 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4432         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4433         _rtld_global_ro.
4435 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4438         _rtld_global_ro.
4440         * tst-once4.c: Remove unnecessary macro definition.
4442         * tst-mutex7.c (do_test): Limit thread stack size.
4443         * tst-once2.c (do_test): Likewise.
4444         * tst-tls3.c (do_test): Likewise.
4445         * tst-tls1.c (do_test): Likewise.
4446         * tst-signal3.c (do_test): Likewise.
4447         * tst-kill6.c (do_test): Likewise.
4448         * tst-key4.c (do_test): Likewise.
4449         * tst-join4.c (do_test): Likewise.
4450         * tst-fork1.c (do_test): Likewise.
4451         * tst-context1.c (do_test): Likewise.
4452         * tst-cond2.c (do_test): Likewise.
4453         * tst-cond10.c (do_test): Likewise.
4454         * tst-clock2.c (do_test): Likewise.
4455         * tst-cancel10.c (do_test): Likewise.
4456         * tst-basic2.c (do_test): Likewise.
4457         * tst-barrier4.c (do_test): Likewise.
4459 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4461         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4463 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4466         (__pthread_cond_timedwait): Optimize wakeup test.
4467         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4468         (__pthread_cond_wait): Likewise.
4469         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4470         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4471         Likewise.
4473 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4475         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4476         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4477         the atomic instruction needed.
4478         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4479         (__lll_mutex_lock_wait): Likewise.
4481 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4483         * Makefile (tests): Add tst-cond14 and tst-cond15.
4484         * tst-cond14.c: New file.
4485         * tst-cond15.c: New file.
4487 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4489         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4490         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4491         needs to be implemented differently to be useful.
4493 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4495         * pthread_attr_setschedparam.c: Don't test priority against limits
4496         here.  Set ATTR_FLAG_SCHED_SET flag.
4497         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4498         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4499         from parent thread to child.  If attribute is used and scheduling
4500         parameters are not inherited, copy parameters from attribute or
4501         compute them.  Check priority value.
4502         * pthread_getschedparam.c: If the parameters aren't known yet get
4503         them from the kernel.
4504         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4505         ATTR_FLAG_POLICY_SET flag for thread.
4506         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4507         and ATTR_FLAG_POLICY_SET.
4509         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4511         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4512         fail if stack address hasn't been set.  Just return 0.
4514 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4516         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4517         libpthread for the files in this list.
4518         (CFLAGS-tst-unload): Removed.
4519         * tst-unload.c (do_test): Don't use complete path for
4520         LIBPHREAD_SO.
4522         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4523         tst-_res1mod2.
4525 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4527         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4528         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4529         operation per round is needed.
4530         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4531         (__lll_mutex_lock_wait): Likewise.
4533 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4535         * tst-cancel9.c (cleanup): Don't print to stderr.
4537 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4539         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4541 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4543         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4544         (__syscall_error_handler2): Call CDISABLE.
4545         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4546         (__syscall_error_handler2): Call CDISABLE.
4548         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4549         Release lock before the loop, don't reacquire it.
4551         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4553 2004-02-19  Andreas Schwab  <schwab@suse.de>
4555         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4556         Fix last change.
4558 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4560         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4561         (pthread_barrier_wait): After wakeup, release lock only when the
4562         last thread stopped using the barrier object.
4563         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4564         (pthread_barrier_wait): Likewise.
4565         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4566         Likewise.
4567         * Makefile (tests): Add tst-barrier4.
4568         * tst-barrier4.c: New file.
4570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4571         (__pthread_cond_timedwait): Perform timeout test while holding
4572         internal lock to prevent wakeup race.
4573         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4574         * sysdeps/pthread/pthread_cond_timedwait.c
4575         (__pthread_cond_timedwait): Likewise.
4576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4577         (__pthread_cond_timedwait): Likewise.
4579 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4581         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4582         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4583         * Makefile (tests): Add tst-rwlock13.
4584         * tst-rwlock13.c: New test.
4586 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4588         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4589         (__condvar_tw_cleanup): Little optimization.
4590         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4592 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4594         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4595         libpthread as "lib" parameter to SHLIB_COMPAT.
4596         (__novmx_siglongjmp): Fix typo in function name.
4597         (__novmx_longjmp): Fix typo in function name.
4599 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4601         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4602         __builtin_expect.
4604         * sysdeps/generic/pt-longjmp.c: Moved to...
4605         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4607 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4609         * Makefile (libpthread-routines): Add pt-cleanup.
4610         * pt-longjmp.c: Removed.
4611         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4612         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4613         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4614         Version longjmp, siglongjmp for GLIBC_2.3.4.
4615         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4617 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4619         * sysdeps/pthread/pthread_cond_timedwait.c
4620         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4621         Reuse code.  Add __builtin_expects.
4623         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4624         (__pthread_cond_timedwait): Get internal lock in case timeout has
4625         passed before the futex syscall.
4626         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4628 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4630         * allocatestack.c: Pretty printing.
4632         * sysdeps/pthread/createthread.c (create_thread): Don't add
4633         CLONE_DETACHED bit if it is not necessary.
4635 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4637         * pthread_getattr_np.c: Include ldsodefs.h.
4639 2004-01-16  Richard Henderson  <rth@redhat.com>
4641         * allocatestack.c: Don't declare __libc_stack_end.
4642         * init.c (__pthread_initialize_minimal_internal): Likewise.
4643         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4645 2004-01-15  Richard Henderson  <rth@redhat.com>
4647         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4648         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4649         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4650         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4651         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4652         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4653         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4654         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4656 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4658         * init.c (pthread_functions): Make array const.
4660 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4662         * allocatestack.c (__make_stacks_executable): Change interface.
4663         Check parameters.  Pass parameter on to libc counterpart.
4664         * pthreadP.h: Change declaration.
4666 2004-01-13  Richard Henderson  <rth@redhat.com>
4668         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4669         prototype form.
4670         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4671         Likewise.
4673         * sysdeps/alpha/Makefile: New file.
4674         * sysdeps/alpha/tcb-offsets.sym: New file.
4675         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4676         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4678         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4679         on powerpc version.
4681 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4683         * Makefile (tests): Add tst-backtrace1.
4684         * tst-backtrace1.c: New test.
4686 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4688         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4689         register as second parameter to the REGISTER macro.
4690         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4691         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4692         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4693         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4694         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4695         of thread register as second parameter to REGISTER macro in 64 case.
4697 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4699         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4700         (CFLAGS-getpid.o): Defined.
4701         (CFLAGS-getpid.os): Defined.
4703 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4705         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4706         returned for main thread does not overlap with any other VMA.
4707         Patch by Jakub Jelinek.
4709 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4711         * tst-raise1.c: Include stdio.h.
4713 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4715         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4716         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4717         If pid is 0, set it to selftid.
4718         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4719         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4720         != 0, return self->tid without doing a syscall.
4721         * descr.h (struct pthread): Move pid field after tid.
4723         * Makefile (tests): Add tst-raise1.
4724         * tst-raise1.c: New file.
4726 2003-12-23  Roland McGrath  <roland@redhat.com>
4728         * tst-oddstacklimit.c: New file.
4729         * Makefile (tests): Add it.
4730         (tst-oddstacklimit-ENV): New variable.
4732         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4733         value up to page size for __default_stacksize.
4735 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4737         * Makefile (tests): Add tst-eintr5.
4738         * tst-eintr5.c: New file.
4740         * eintr.c (eintr_source): Prevent sending signal to self.
4742         * tst-eintr2.c (tf1): Improve error message.
4744 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4746         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4747         * sysdeps/unix/sysv/linux/getpid.c: New file.
4748         * pthread_cancel.c: Add comment explaining use of PID field.
4749         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4750         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4751         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4752         temporarily to signal the field must not be relied on and updated
4753         by getpid().
4754         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4755         temporarily negative.
4756         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4758 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4760         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4761         (eintr_source): If ARG != NULL, use pthread_kill.
4762         * tst-eintr1.c: Adjust for this change.
4763         * tst-eintr2.c: Likewise.
4764         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4765         * tst-eintr3.c: New file.
4766         * tst-eintr4.c: New file.
4768 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4770         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4771         if CANCELSTATE_BITMASK is set.
4772         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4773         Likewise.
4775         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4776         (tests-reverse): Add tst-cancel23.
4777         * tst-cancel22.c: New test.
4778         * tst-cancel23.c: New test.
4780 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
4782         * tst-eintr1.c: Better error messages.
4784         * Makefile (tests): Add tst-eintr2.
4785         * tst-eintr2.c: New file.
4787 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
4789         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4790         (CFLAGS-tst-cancelx21.c): Set.
4791         * tst-cancel21.c: New test.
4792         * tst-cancelx21.c: New test.
4794         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
4795         comparison operand.
4796         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4797         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
4798         * pt-longjmp.c: Include jmpbuf-unwind.h.
4799         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4800         _JMPBUF_UNWINDS.  Adjust compared pointers.
4801         * init.c (__pthread_initialize_minimal_internal): Initialize
4802         pd->stackblock_size.
4803         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4804         * sysdeps/alpha/jmpbuf-unwind.h: New file.
4805         * sysdeps/i386/jmpbuf-unwind.h: New file.
4806         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4807         * sysdeps/s390/jmpbuf-unwind.h: New file.
4808         * sysdeps/sh/jmpbuf-unwind.h: New file.
4809         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4810         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4811         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4812         (_JMPBUF_CFA_UNWINDS): Remove.
4813         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4815 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
4817         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4818         (CFLAGS-tst-cancelx20.c): Set.
4819         * tst-cancel20.c: New test.
4820         * tst-cancelx20.c: New test.
4822 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
4824         * init.c (__pthread_initialize_minimal_internal): Don't treat
4825         architectures with separate register stack special here when
4826         computing default stack size.
4828 2003-12-17  Roland McGrath  <roland@redhat.com>
4830         * Makefile (tst-cancelx7-ARGS): New variable.
4831         Reportd by Greg Schafer <gschafer@zip.com.au>.
4833 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
4835         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
4836         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4837         (tst-stack3-ENV): Set.
4838         ($(objpfx)tst-stack3-mem): New.
4839         * tst-stack3.c: New test.
4841 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
4843         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4844         Add unwind directives.  Drop unused .regstk directive.
4845         (_fini_EPILOG_BEGINS): Add unwind directives.
4847 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
4849         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4850         Assume parameter is a pointer.
4851         (lll_futex_wake): Likewise.
4852         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4853         Likewise.
4854         (lll_futex_wake): Likewise.
4855         Reported by Boris Hu.
4856         * sysdeps/unix/sysv/linux/unregister-atfork.c
4857         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4859         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4861 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
4863         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4864         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4865         __rtld_lock_initialize for ld.so lock.
4866         Patch in part by Adam Li <adam.li@intel.com>.
4868 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
4870         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4871         in $(gnulib).  Also, remove stale comment.
4873 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
4875         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4876         advantage of new syscall stub and optimize accordingly.
4878         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4879         from SYS_futex, to match expectations of
4880         sysdep.h:DO_INLINE_SYSCALL.
4881         (lll_futex_clobbers): Remove.
4882         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4883         (lll_futex_wake): Likewise.
4884         (lll_futex_requeue): Likewise.
4885         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4886         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4887         Jelinek).
4888         (__lll_mutex_lock): Likewise.
4889         (__lll_mutex_cond_lock): Likewise.
4890         (__lll_mutex_timed_lock): Likewise.
4891         (__lll_mutex_unlock): Likewise.
4892         (__lll_mutex_unlock_force): Likewise.
4894         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4895         comes before the include of <sysdep.h>.
4896         (THREAD_SELF_SYSINFO): New macro.
4897         (THREAD_SYSINFO): Likewise.
4898         (INIT_SYSINFO): New macro.
4899         (TLS_INIT_TP): Call INIT_SYSINFO.
4901         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4903         * sysdeps/pthread/createthread.c (create_thread): Use
4904         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4905         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4906         THREAD_SELF_SYSINFO instead of open code.
4907         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4908         (THREAD_SYSINFO): Likewise.
4910         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4912         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4914 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
4916         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4917         instead of .init.  Patch by David Mosberger.
4919 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
4921         * sysdeps/pthread/configure.in: Remove broken declaration in C
4922         cleanup handling check.
4924 2003-11-30  Andreas Jaeger  <aj@suse.de>
4926         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4927         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4928         Likewise.
4930 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
4932         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4933         * pthread_attr_destroy.c: Include shlib-compat.h.
4934         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4935         is set in iattr->flags.
4936         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4938 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
4940         * Makefile (distribute): Add tst-cleanup4aux.c.
4942         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
4943         include.
4945 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
4947         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4948         pthread_cond_signal.
4950         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4951         store mutex address if the current value is ~0l.
4952         * sysdeps/pthread/pthread_cond_timedwait.c
4953         (__pthread_cond_timedwait): Likewise.
4954         * sysdeps/pthread/pthread_cond_broadcast.c
4955         (__pthread_cond_broadcast): Don't use requeue for pshared
4956         condvars.
4958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4959         (__pthread_cond_wait): Don't store mutex address if the current
4960         value is ~0l.
4961         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4962         (__pthread_cond_timedwait): Likewise.
4963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4964         (__pthread_cond_broadcast): Don't use requeue for pshared
4965         condvars.
4967         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
4968         element with ~0l for pshared condvars, with NULL otherwise.
4970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4971         (__pthread_cond_wait): Don't store mutex address if the current
4972         value is ~0l.
4973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4974         (__pthread_cond_timedwait): Likewise.
4975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4976         (__pthread_cond_broadcast): Don't use requeue for pshared
4977         condvars.
4979         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
4980         * tst-cond12.c: New file.
4981         * tst-cond13.c: New file.
4983 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
4985         * sysdeps/pthread/configure.in: Make missing forced unwind support
4986         fatal.
4988 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
4990         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
4992 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
4994         * Makefile: Add magic to clean up correctly.
4996 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
4998         * unwind.c (FRAME_LEFT): Define.
4999         (unwind_stop): Handle old style cleanups here.
5000         (__pthread_unwind): Handle old style cleanups only if
5001         !HAVE_FORCED_UNWIND.
5002         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5003         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5004         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5005         ($(objpfx)tst-cleanupx4): Likewise.
5006         * tst-cleanup4.c: New test.
5007         * tst-cleanup4aux.c: New.
5008         * tst-cleanupx4.c: New test.
5010 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5012         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5013         lll_mutex_*lock macros to skip atomic operations on some archs.
5015 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5017         * sysdeps/pthread/tst-timer.c (main): Initialize
5018         sigev2.sigev_value as well.
5020 2003-10-15  Roland McGrath  <roland@redhat.com>
5022         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5023         is missing.
5024         * sysdeps/pthread/configure: Regenerated.
5026 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5028         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5029         locking macros.  No distinction between normal and mutex locking
5030         anymore.
5031         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5032         Merge bits from lowlevelmutex.S we still need.
5033         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5034         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5035         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5036         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5037         new mutex implementation.
5038         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5039         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5040         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5041         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5042         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5043         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5044         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5045         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5046         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5047         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5048         symbol for entry point to avoid cancellation.
5050 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5052         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5053         changes.
5054         (SAVE_OLDTYPE_0): Fix a typo.
5056 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5058         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5059         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5061 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5063         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5064         correct offset.
5066 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5068         * Makefile (tests): Add tst-cancel19.
5069         * tst-cancel19.c: New test.
5071 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5073         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5074         restoring of the old cancellation type.
5076 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5078         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5080 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5082         * sysdeps/pthread/malloc-machine.h: New file
5084 2003-09-24  Roland McGrath  <roland@redhat.com>
5086         * allocatestack.c (__make_stacks_executable): Don't ignore return
5087         value from _dl_make_stack_executable.
5089 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5091         * allocatestack.c (__make_stacks_executable): Also change
5092         permission of the currently unused stacks.
5094         * allocatestack.c (change_stack_perm): Split out from
5095         __make_stacks_executable.
5096         (allocate_stack): If the required permission changed between the time
5097         we started preparing the stack and queueing it, change the permission.
5098         (__make_stacks_executable): Call change_stack_perm.
5100         * Makefile: Build tst-execstack-mod locally.
5101         * tst-execstack-mod.c: New file.
5103 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5105         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5107 2003-09-23  Roland McGrath  <roland@redhat.com>
5109         * tst-execstack.c: New file.
5110         * Makefile (tests): Add it.
5111         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5112         (LDFLAGS-tst-execstack): New variable.
5114         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5115         whether to use PROT_EXEC for stack mmap.
5116         (__make_stacks_executable): New function.
5117         * pthreadP.h: Declare it.
5118         * init.c (__pthread_initialize_minimal_internal): Set
5119         GL(dl_make_stack_executable_hook) to that.
5121 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5124         recommendation from AMD re avoidance of lock prefix.
5126 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5128         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5129         lll_futex_timed_wait instead of lll_futex_wait.
5130         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5131         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5132         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5133         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5134         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5135         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5136         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5137         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5138         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5139         Completely revamp the locking macros.  No distinction between
5140         normal and mutex locking anymore.
5141         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5142         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5143         __lll_lock_timedwait): Fix prototypes.
5144         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5145         __lll_lock_timedwait): Likewise.
5146         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5147         macros, add __builtin_expect.
5148         (lll_mutex_timedlock): Likewise.  Fix return value.
5149         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5150         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5151         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5152         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5153         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5154         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5155         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5156         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5158 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5160         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5161         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5162         operation if possible.
5164         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5165         like jumping over the lock prefix.
5167 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5169         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5170         locking macros.  No distinction between normal and mutex locking
5171         anymore.
5172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5173         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5174         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5175         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5176         locking.  Merge bits from lowlevelmutex.S we still need.
5177         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5178         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5179         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5180         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5181         * Makefile (routines): Remove libc-lowlevelmutex.
5182         (libpthread-rountines): Remove lowlevelmutex.
5183         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5184         for new mutex implementation.
5185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5187         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5188         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5190         Likewise.
5191         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5192         Likewise.
5193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5194         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5195         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5198         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5200         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5201         Likewise.
5202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5203         Likewise.
5204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5205         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5207         Don't use requeue.
5208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5209         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5211 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5213         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5214         in parameters of asm with output parameters.
5216         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5217         type of DECR parameter to int.
5218         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5220 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5222         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5223         guardsize for each thread.
5225 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5227         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5228         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5229         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5231         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5232         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5233         NULL.
5234         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5235         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5236         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5237         (pthread_getaffinity_np): Add hidden_def.
5239         * Makefile (tests): Add tst-attr3.
5240         * tst-attr3.c: New test.
5242         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5244 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5246         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5247         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5249 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5251         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5252         * tst-align.c: Include tst-stack-align.h.
5253         (tf, do_test): Use TEST_STACK_ALIGN macro.
5255 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5257         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5258         variable.
5260 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5262         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5263         stack-related values for the initial thread.
5265 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5267         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5269 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5271         * pthread_mutex_lock.c: Minor code rearrangements.
5273 2003-09-05  Roland McGrath  <roland@redhat.com>
5275         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5276         Instead, include ../nptl_db/db_info.c to do its magic.
5277         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5278         (__pthread_pthread_key_2ndlevel_size): Likewise.
5279         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5280         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5281         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5282         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5283         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5284         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5285         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5286         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5287         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5288         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5289         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5290         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5291         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5292         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5293         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5294         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5295         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5297 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5299         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5300         of pthread_t to be compatible with LT.
5301         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5302         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5303         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5304         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5305         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5306         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5307         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5309 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5311         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5313 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5315         * unwind-forcedunwind.c: Move to...
5316         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5317         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5318         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5319         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5320         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5321         * unwind.c: Include jmpbuf-unwind.h.
5322         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5324 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5326         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5327         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5328         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5329         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5330         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5331         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5332         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5333         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5334         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5335         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5336         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5337         function.
5338         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5339         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5340         * Makefile (tests): Add tst-stack2.
5341         * tst-stack2.c: New test.
5342         * tst-stack1.c: Include limits.h and sys/param.h.
5343         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5345         * pthread_condattr_setpshared.c: Include errno.h.
5346         (pthread_condattr_setpshared): Return EINVAL if pshared
5347         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5349         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5350         defined symbol for entry point to avoid cancellation.
5351         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5352         Likewise.
5353         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5354         Likewise.
5355         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5356         Likewise.
5357         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5358         Likewise.
5359         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5360         Likewise.
5361         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5362         __close_nocancel, __read_nocancel, __write_nocancel,
5363         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5364         libpthread.so or librt.so, define to corresponding function
5365         without _nocancel suffix.
5366         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5367         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5368         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5370         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5372 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5374         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5375         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5377         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5378         in subsections has a symbol associated with it.
5380         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5381         defined symbol for entry point to avoid cancellation.
5382         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5384 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5386         * Makefile (tests): Add tst-tls5.
5387         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5388         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5389         ($(objpfx)tst-tls5): New.
5390         ($(objpfx)tst-tls6.out): Likewise.
5391         (tests): Depend on $(objpfx)tst-tls6.out.
5392         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5393         (do_test): Check pthread_self () return value alignment.
5394         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5395         (tf): Check pthread_self () return value alignment.
5396         * tst-tls5.c: New test.
5397         * tst-tls5.h: New.
5398         * tst-tls5mod.c: New.
5399         * tst-tls5moda.c: New.
5400         * tst-tls5modb.c: New.
5401         * tst-tls5modc.c: New.
5402         * tst-tls5modd.c: New.
5403         * tst-tls5mode.c: New.
5404         * tst-tls5modf.c: New.
5405         * tst-tls6.sh: New test.
5407         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5408         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5409         * init.c (pthread_functions): Initialize them.
5410         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5411         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5412         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5413         pthread_cond_timedwait@@GLIBC_2.3.2.
5415 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5417         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5418         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5419         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5420         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5421         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5422         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5424         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5426         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5427         _POSIX_THREAD_PRIORITY_SCHEDULING.
5428         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5430 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5432         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5433         nested function, use static inline function from libio.h.
5434         Code by Richard Henderson.
5436         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5437         weak.
5439 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5441         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5442         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5443         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5444         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5445         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5446         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5447         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5448         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5449         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5450         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5451         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5452         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5453         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5454         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5455         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5456         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5457         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5458         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5459         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5460         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5461         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5462         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5463         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5464         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5465         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5466         * sysdeps/sparc/tls.h: New file.
5467         * sysdeps/sparc/tcb-offsets.sym: New file.
5468         * sysdeps/sparc/Makefile: New file.
5469         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5470         * init.c [__sparc__] (__NR_set_tid_address): Define.
5472 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5474         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5475         _IO_release_lock): Define.
5477 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5479         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5480         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5482 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5484         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5485         (__pthread_cleanup_class): Add missing return types of member
5486         functions.
5488 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5491         (lll_mutex_unlock_force): Add memory barrier between store and futex
5492         syscall.
5494 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5496         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5497         tempmsg in first loop.
5499 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5501         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5502         _POSIX_THREAD_PRIORITY_SCHEDULING.
5503         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5505 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5507         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5508         (__rtld_lock_default_lock_recursive,
5509         __rtld_lock_default_unlock_recursive): Define.
5510         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5511         __rtld_lock_unlock_recursive): Define using
5512         GL(_dl_rtld_*lock_recursive).
5513         * init.c (__pthread_initialize_minimal_internal): Initialize
5514         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5515         Lock GL(_dl_load_lock) the same number of times as
5516         GL(_dl_load_lock) using non-mt implementation was nested.
5518         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5519         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5521 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5523         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5524         PIPE_BUF.
5526 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5528         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5530 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5532         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5533         to first syscall error check.  Move syscall error check for tkill
5534         into __ASSUME_CLONE_STOPPED #ifdef.
5536 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5538         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5539         is not defined, do explicit synchronization.
5540         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5541         is not defined also unlock pd->lock for non-debugging case in case
5542         it is necessary.
5543         * pthread_create.c (start_thread): Always get and release pd->lock
5544         if __ASSUME_CLONE_STOPPED is not defined.
5545         (start_thread_debug): Removed.  Adjust users.
5546         * allocatestack.c (allocate_stack): Always initialize lock if
5547         __ASSUME_CLONE_STOPPED is not defined.
5548         * Makefile (tests): Add tst-sched1.
5549         * tst-sched1.c: New file.
5551         * sysdeps/pthread/createthread.c (do_clone): Only use
5552         sched_setschduler and pass correct parameters.
5554 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5556         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5557         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5558         PTHREAD_STACK_MIN in comments.
5560 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5562         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5563         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5564         argument.
5565         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5566         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5567         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5568         (__pthread_cleanup_upto): Fix prototype.
5569         (_longjmp_unwind): Adjust caller.
5570         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5571         Change second argument to const struct pointer.
5572         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5573         * tst-sem9.c (main): Likewise.
5574         * unwind.c: Include string.h for strlen prototype.
5576 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5579         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5580         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5581         Define HAVE_CMOV.
5582         Patch by Nicholas Miell <nmiell@attbi.com>.
5584 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5586         * init.c (__pthread_initialize_minimal_internal): Initialize
5587         GL(dl_init_static_tls).
5588         * pthreadP.h (__pthread_init_static_tls): New prototype.
5589         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5590         New functions.
5591         * Makefile (tests): Add tst-tls4.
5592         (modules-names): Add tst-tls4moda and tst-tls4modb.
5593         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5594         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5595         tst-tls4modb.so.
5596         * tst-tls4.c: New file.
5597         * tst-tls4moda.c: New file.
5598         * tst-tls4modb.c: New file.
5600 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5602         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5603         before __timer_dealloc.
5604         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5605         Don't call list_unlink.
5607 2003-07-29  Roland McGrath  <roland@redhat.com>
5609         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5611 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5613         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5614         Don't reuse struct aiocb A if it failed.
5615         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5616         not just one byte, as that does not block.
5618 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5620         * sysdeps/pthread/unwind-resume.c: New file.
5621         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5622         unwind-resume in csu subdir.
5623         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5624         exceptions.
5625         (librt-sysdep_routines, librt-shared-only-routines): Add
5626         rt-unwind-resume.
5627         * sysdeps/pthread/rt-unwind-resume.c: New file.
5628         * unwind-forcedunwind.c: New file.
5629         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5630         (libpthread-shared-only-routines): Likewise.
5631         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5632         * pthreadP.h (pthread_cancel_init): New prototype.
5633         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5635         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5636         attr argument const struct pthread_attr *.
5638         * res.c (__res_state): Return __resp.
5639         * descr.h: Include resolv.h.
5640         (struct pthread): Add res field.
5641         * pthread_create.c: Include resolv.h.
5642         (start_thread): Initialize __resp.
5643         * Makefile (tests): Add tst-_res1.
5644         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5645         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5646         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5647         libpthread.
5648         * tst-_res1.c: New file.
5649         * tst-_res1mod1.c: New file.
5650         * tst-_res1mod2.c: New file.
5652 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5654         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5656         * Makefile: Define various *-no-z-defs variables for test DSOs
5657         which has undefined symbols.
5659 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5661         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5662         Retry if the stwcx fails to store once_control.
5664 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5666         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5667         pthread_attr_setaffinity.
5668         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5669         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5670         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5671         * pthread_attr_destroy.c: Free cpuset element if allocated.
5672         * pthread_create.c: Pass iattr as additional parameter to
5673         create_thread.
5674         * sysdeps/pthread/createthread.c: If attribute is provided and
5675         a new thread is created with affinity set or scheduling parameters,
5676         start thread with CLONE_STOPPED.
5677         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5678         pthread_attr_setaffinity.
5679         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5680         cpuset element.
5682 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5684         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5686 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5688         * sysdeps/pthread/configure.in: Require CFI directives also for
5689         ppc and s390.
5691 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5693         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5694         Add cfi directives.
5696 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5698         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5699         CLEANUP_JMP_BUF.
5700         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5701         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5702         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5703         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5704         not self pointer in __writer.  Compare with TID to determine
5705         deadlocks.
5706         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5707         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5708         Likewise.
5709         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5710         Likewise.
5711         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5712         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5713         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5714         macros also when compiling librt.
5716 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5718         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5719         -fasynchronous-unwind-tables.
5720         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5721         (PSEUDO): Add cfi directives.
5722         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5723         Likewise.
5724         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5725         Likewise.
5727 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5729         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5730         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5731         * unwind.c (__pthread_unwind_next): Add hidden_def.
5732         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5733         Likewise.
5734         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5735         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5736         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5737         Likewise.
5738         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5739         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5740         Likewise.
5741         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5742         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5743         __pthread_unregister_cancel and __pthread_unwind_next.
5745 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5747         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5748         different symbol for the cancellation syscall wrapper and
5749         non-cancellation syscall wrapper.
5750         (PSEUDO_END): Define.
5752 2003-07-05  Richard Henderson  <rth@redhat.com>
5754         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5755         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5756         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5757         return actual return value from the syscall, not 0.
5759 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5761         * descr.h (struct pthread): Add pid field.
5762         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5763         (__reclaim_stacks): Likewise.
5764         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5765         also check for PID of the signal source.
5766         (__pthread_initialize_minimal_internal): Also initialize pid field
5767         of initial thread's descriptor.
5768         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5769         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5770         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5771         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5772         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5774 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
5776         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5777         Fix use of parameter.
5778         (__libc_cleanup_pop): Likewise.
5780 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
5782         * init.c (sigcancel_handler): Change parameters to match handler
5783         for SA_SIGACTION.  Check signal number and code to recognize
5784         invalid invocations.
5786 2003-07-03  Roland McGrath  <roland@redhat.com>
5788         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5789         Apply sizeof (struct pthread) bias to r13 value.
5791 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
5793         * sysdeps/pthread/configure.in: Require CFI directives.
5795         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5796         definition.
5797         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5798         libpthread compilation.
5799         * unwind.c (__pthread_unwind): Add hidden_def.
5800         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5802 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5804         * libc-cancellation.c (__libc_cleanup_routine): Define.
5805         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5806         (__pthread_cleanup_pop): Define.
5808 2003-07-01  Richard Henderson  <rth@redhat.com>
5810         * sysdeps/alpha/elf/pt-initfini.c: New file.
5811         * sysdeps/alpha/pthread_spin_lock.S: New file.
5812         * sysdeps/alpha/pthread_spin_trylock.S: New file.
5813         * sysdeps/alpha/pthreaddef.h: New file.
5814         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5815         * sysdeps/alpha/tls.h: New file.
5816         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5817         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5818         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5819         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5820         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5821         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5822         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5823         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5824         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5825         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5827 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5829         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5830         cleanup support and unwind info.
5832 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
5834         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5835         Use correct cleanup handler registration.  Add unwind info.
5836         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5837         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5838         * tst-once3.c: Add cleanup handler and check it is called.
5839         * tst-once4.c: Likewise.
5840         * tst-oncex3.c: New file.
5841         * tst-oncex4.c: New file.
5842         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5844 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
5846         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5848 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
5850         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5851         (tf_msgsnd): Likewise.
5853         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5854         premature returns a bit more.
5856 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
5858         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5859         definition to the front.
5861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5862         the cleanup functions to make the names unique.  Fix dwarf opcode
5863         un unwind table.
5864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5865         functions to make the names unique.  Fix CFA offset for two blocks.
5867 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
5869         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5870         missing closing braces.
5871         Patch by Christophe Saout <christophe@saout.de>.
5873 2003-06-24  Roland McGrath  <roland@redhat.com>
5875         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5877 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
5879         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5880         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5882         * pthreadP.h: Declare __find_thread_by_id.
5883         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5884         * pthread_clock_gettime.c: Allow using other thread's clock.
5885         * pthread_clock_settime.c: Likewise.
5886         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5887         * Makefile: Add rules to build and run tst-clock2.
5888         * tst-clock2.c: New file.
5890 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
5892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5893         to use exception-based cleanup handler.
5894         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5896         * tst-cond8.c (ch): Announce that we are done.
5898         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5900         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5901         Also test aio_suspend with timeout value.
5903 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
5905         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5906         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5907         attribute_hidden.
5909         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5910         (__pthread_mutex_lock_internal): Likewise.
5911         (__pthread_mutex_unlock_internal): Likewise.
5912         (__pthread_mutex_unlock_usercnt): Declare.
5913         * pthread_mutex_destroy.c: Always fail if used in any way.
5914         * pthread_mutex_init.c: Update comment.
5915         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5916         * pthread_mutex_timedlock.c: Adjust __nusers.
5917         * pthread_mutex_trylock.c: Adjust __nusers.
5918         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5919         and public interfaces are wrapper with pass additional parameter.
5920         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5921         parameter zero.
5922         * tst-mutex8.c: New file.
5923         * Makefile (tests): Add tst-mutex8.
5924         * sysdeps/pthread/pthread_cond_timedwait.c: Call
5925         __pthread_mutex_unlock_usercnt.
5926         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5929         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5931         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5932         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5933         Add __nusers.
5934         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5935         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5936         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5937         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5938         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5940         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5941         * pthread_mutex_timedlock.c: Likewise.
5942         * pthread_mutex_trylock.c: Adjust __nusers.
5943         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5944         * tst-mutex9.c: New file.
5945         * Makefile (tests): Add tst-mutex9.
5946         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5947         * sysdeps/ia64/tls.h: Likewise.
5948         * sysdeps/powerpc/tls.h: Likewise.
5949         * sysdeps/s390/tls.h: Likewise.
5950         * sysdeps/sh/tls.h: Likewise.
5951         * sysdeps/x86_64/tls.h: Likewise.
5952         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5953         Change type of __owner.
5954         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5955         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5956         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5957         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5958         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5960 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
5962         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
5963         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
5965         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
5966         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
5967         instead of nr to lll_futex_wake.  Only set errno and return -1
5968         if err < 0.
5970         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
5971         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5972         return actual return value from the syscall, not 0.
5974 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
5976         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
5977         find a random value.
5978         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
5979         errno==EIDRM.
5981         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
5982         compat_timer_settime.
5983         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
5984         compat_timer_gettime.
5985         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
5986         compat_timer_getoverrun.
5987         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
5988         compat_timer_delete.
5990         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
5991         error-checking mutex detect busy mutexes.
5993 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
5995         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
5996         Add ax to clobber list.
5997         (lll_mutex_cond_lock): Likewise.
5998         (lll_mutex_unlock): Likewise.
5999         (lll_lock): Likewise.
6000         (lll_unlock): Likewise.
6002         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6003         * tst-cancel18.c: New file.
6004         * tst-cancelx18.c: New file.
6006         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6007         and tcdrain.
6009         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6010         * tst-cancel17.c: New file.
6011         * tst-cancelx17.c: New file.
6013         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6014         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6015         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6017         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6019 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6021         * sysdeps/pthread/createthread.c (create_thread): Set
6022         header.multiple_threads unconditionally.
6023         * allocatestack.c (allocate_stack): Likewise.
6024         * descr.h (struct pthread): Add header.multiple_threads
6025         unconditionally.
6026         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6027         Define for librt.  #error if neither libpthread, libc nor librt.
6028         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6029         Likewise.
6030         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6031         CDISABLE): Likewise.
6032         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6033         CDISABLE): Likewise.
6034         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6035         CDISABLE): Likewise.
6036         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6037         CDISABLE): Likewise.  Access header.multiple_threads outside of
6038         libc and libpthread.
6039         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6040         Likewise.
6041         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6042         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6044 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6046         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6047         Also test early cancellation before the thread reaches the cancellation
6048         point.
6050         * Makefile: Compile forward.c with exceptions.
6052         * sysdeps/unix/sysv/linux/sleep.c: New file.
6054 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6056         * Makefile: Add CFLAGS definition to compile function wrappers
6057         duplicated from libc with exceptions.
6058         * tst-cancel4.c: Also check cancellation handlers.
6060         * Makefile: Add rules to build and run tst-cancel16 and
6061         tst-cancelx16.  Add missing CFLAGS definitions.
6062         * tst-cancel16.c: New file.
6063         * tst-cancelx16.c: New file.
6065 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6067         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6068         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6069         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6070         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6072         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6073         (LIBC_CANCEL_RESET): Likewise.
6074         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6075         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6076         librt-cancellation.
6077         (CFLAGS-libcrt-cancellation.c): Define.
6078         * sysdeps/pthread/librt-cancellation.c: New file.
6079         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6080         macros also when compiling librt.
6081         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6082         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6083         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6084         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6085         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6086         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6087         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6089         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6090         compat_timer_create.
6092 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6094         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6096         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6097         __register_atfork.
6098         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6099         Add libc_hidden_def.
6101 2003-06-13  Roland McGrath  <roland@redhat.com>
6103         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6104         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6106 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6108         * allocatestack.c (queue_stack): Always inline.
6109         * ptreadhP.h (__do_cancel): Likewise.
6111 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6113         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6114         a typo.
6116 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6118         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6119         (__pthread_cond_signal): Remove incorrect second addition for
6120         cond_lock!=0.
6122 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6125         (__pthread_cond_signal): Use correct futex pointer in
6126         __lll_mutex_lock_wait call.
6128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6129         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6131 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6133         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6134         cancelable.
6135         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6136         Likewise.
6138         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6139         hand-written CFI generation code.  Since ENTRY/END also initiated
6140         CFI frames this caused two CFI sets to be generated.
6142 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6144         * cleanup_routine.c: New file.
6145         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6146         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6147         cleanup handling.
6148         * Makefile (libpthread-routines): Add cleanup_routine.
6149         Add more CFLAGS variables to compile with exceptions.  Add comments
6150         why which file needs unwind tables.
6151         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6152         tests.
6153         * tst-cancelx1.c: New file.
6154         * tst-cancelx2.c: New file.
6155         * tst-cancelx3.c: New file.
6156         * tst-cancelx4.c: New file.
6157         * tst-cancelx5.c: New file.
6158         * tst-cancelx6.c: New file.
6159         * tst-cancelx7.c: New file.
6160         * tst-cancelx8.c: New file.
6161         * tst-cancelx9.c: New file.
6162         * tst-cancelx10.c: New file.
6163         * tst-cancelx11.c: New file.
6164         * tst-cancelx12.c: New file.
6165         * tst-cancelx13.c: New file.
6166         * tst-cancelx14.c: New file.
6167         * tst-cancelx15.c: New file.
6168         * tst-cleanupx0.c: New file.
6169         * tst-cleanupx0.expect: New file.
6170         * tst-cleanupx1.c: New file.
6171         * tst-cleanupx2.c: New file.
6172         * tst-cleanupx3.c: New file.
6174         * tst-cleanup0.c: Make standard compliant.
6175         * tst-cleanup1.c: Likewise.
6177         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6178         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6179         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6180         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6181         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6182         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6183         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6184         CLEANUP_JMP_BUF.
6185         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6186         * tst-cancel12.c: New file.
6187         * tst-cancel13.c: New file.
6188         * tst-cancel14.c: New file.
6189         * tst-cancel15.c: New file.
6190         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6191         and tst-cancel15.
6193         * tst-cancel1.c: Add some comments.
6195         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6196         timeout correctly.
6198 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6200         * Makefile (CFLAGS-pthread_cancel.c): Define.
6202 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6204         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6205         Change type of __writer element to int.
6206         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6207         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6208         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6209         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6210         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6211         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6212         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6213         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6214         Compare with TID to determine deadlocks.
6215         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6216         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6217         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6218         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6219         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6220         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6221         Likewise.
6222         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6223         Likewise.
6224         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6225         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6226         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6227         Likewise.
6228         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6229         Likewise.
6230         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6231         * Makefile (tests): Add tst-rwlock12.
6232         * tst-rwlock12.c: New file.
6234 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6236         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6237         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6238         Remove bogus hidden_proto.
6239         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6240         Likewise.
6241         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6242         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6243         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6244         ___lll_mutex_timedlock): Likewise.
6246 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6249         (__pthread_cond_signal): Add some code to eventually handle
6250         cond_lock!=0.
6252 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6254         * Makefile (tests): Add tst-exec4.
6255         (tst-exec4-ARGS): Define.
6256         * tst-exec4.c: New file.
6258 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6261         Also fail if tv_nsec < 0.
6262         (__lll_timedwait_tid): Likewise.
6263         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6264         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6265         Likewise.
6266         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6267         Likewise.
6268         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6269         Likewise.
6270         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6271         Likewise.
6272         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6273         Likewise.
6274         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6275         Likewise.
6277         * Makefile (tests): Add tst-sem8 and tst-sem9.
6278         * tst-sem8.c: New file.
6279         * tst-sem9.c: New file.
6280         * sem_open.c: Fix creation of in_use record if the file exists but
6281         no internal record.
6283         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6284         definitions.
6286         * sysdeps/pthread/timer_create.c (timer_create): In case
6287         evp==NULL, assign timer ID to sival_ptr.
6289         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6290         struct pthread_unwind_buf *.
6291         (struct pthread): Likewise for cleanup_jmp_buf element.
6293         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6294         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6295         * unwind.c (__pthread_unwind_next): Likewise.
6297 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6299         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6300         (lll_futex_timed_wait): Use int for futex value parameter.
6301         (lll_futex_wake): Likewise.
6302         (lll_futex_requeue): Likewise.
6304         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6305         Replace one memory operation with one register operation.
6307         * tst-join4.c (do_test): Fix error message.
6309         * tst-rwlock6.c (do_test): Use correct format specifier.
6311         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6312         (__lll_mutex_lock_wait): Replace one memory operation with one
6313         register operation.
6314         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6315         (__lll_mutex_lock_wait): Likewise.
6317         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6318         (__lll_mutex_cond_lock): Add one to value parameter of
6319         __lll_lock_wait to reflect reality in the futex syscall.
6320         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6321         (lll_mutex_cond_lock): Likewise.
6323 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6325         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6326         New function.
6327         (lll_mutex_cond_lock): Define.
6329 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6331         * Makefile (tests): Add tst-signal6.
6332         * tst-signal6.c: New file.
6334         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6335         (__lll_mutex_unlock_force): New function
6336         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6338         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6339         (__lll_mutex_unlock_force): New function.
6340         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6342         * tst-rwlock7.c (do_test): Use correct format specifier.
6344         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6345         Find break parameter in correct asm argument.
6347 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6349         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6350         Remove out4.
6351         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6352         error occured.
6353         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6354         Add __mutex.
6355         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6356         lll_futex_requeue, lll_mutex_unlock_force): Define.
6358 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6360         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6361         (pthread_cond_t): Add __mutex.
6362         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6363         lll_futex_requeue, lll_mutex_unlock_force): Define.
6365 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6367         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6368         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6369         Add __mutex field.
6370         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6371         Define.
6372         (lll_futex_wait, lll_futex_wake): Define.
6373         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6374         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6375         FUTEX_REQUEUE instead of FUTEX_WAIT.
6376         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6377         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6378         mutex which was used in condvar structure.  Call
6379         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6380         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6382         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6383         include tcb-offsets.h.  Read wakeup value in locked region.
6384         Use the value of gbr register as THREAD_ID.
6385         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6386         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6387         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6389         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6390         macros.
6392 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6394         * sysdeps/pthread/pthread_cond_broadcast.c
6395         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6397 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6400         typo in register name.
6401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6402         correctly.  Actually use requeue.  Little optimization.
6403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6404         mutex address early.  Handle cancellation state as 32-bit value.
6405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6406         Remove unnecessary label.
6408 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6410         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6411         instead of FUTEX_WAIT.
6412         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6415         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6417         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6418         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6419         of __pthread_mutex_lock_internal.
6420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6422         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6423         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6426         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6427         Add pthread_mutex_cond_lock.
6428         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6429         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6430         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6431         lll_mutex_cond_lock.
6432         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6433         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6434         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6435         Add __mutex field.
6436         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6437         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6439         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6440         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6442         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6443         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6444         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6445         macro don't define aliases.
6447         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6448         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6449         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6450         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6453         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6455         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6457 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6459         * sem_open.c: Fix one endless loop.  Implement correct semantics
6460         wrt opening the same semaphore more then once.
6461         * sem_close.c: Adjust for sem_open change.
6462         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6463         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6464         * Makefile (tests): Add tst-sem7.
6465         * tst-sem7.c: New file.
6467 2003-05-16  Roland McGrath  <roland@redhat.com>
6469         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6470         uninitialized variable braino.
6472 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6474         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6475         test for syscall availability.
6477         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6478         __no_posix_timers to -1 if the syscalls don't exist.
6480         * pthread_join.c (pthread_join): Set tid field of the joined
6481         thread to -1.  This isn't necessary but helps to recognize some
6482         error conditions with almost no cost.
6484         * allocatestack.c (FREE_P): Also negative values indicate an
6485         unused stack.
6487         * unwind.c: Include <unistd.h>.
6489 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6491         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6493 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6495         * Makefile (crti-objs, crtn-objs): New variables.
6496         (omit-deps, extra-objs): Add crtn.
6497         ($(objpfx)libpthread.so): Depend on both crti and crtn
6498         and links to them in multidir.
6499         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6501 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6503         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6504         (lll_mutex_unlock): Use atomic_exchange_rel.
6506 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6508         * cond-perf.c (cons): Add missing locking around setting of alldone.
6510 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6512         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6513         related macros.
6514         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6516 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6518         * tst-sem6.c: New file.
6519         * Makefile (tests): Add tst-sem6.
6521         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6522         Use atomic_exchange_rel instead of atomic_exchange.
6523         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6524         Likewise.
6526         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6527         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6528         vsyscall is possible.
6530         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6531         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6532         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6533         pthread_setaffinity_np.
6534         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6535         and pthread_setaffinity_np.
6536         * Makefile (libpthread-routines): Add pthread_getaffinity and
6537         pthread_setaffinity.
6539         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6540         use it in case mmap to allocate the stack fails.
6541         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6542         ARCH_MAP_FLAGS here.
6543         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6544         ARCH_RETRY_MMAP.
6546 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6548         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6549         handler implementation.  It is now lockless in fork().
6550         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6551         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6552         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6553         declare the __fork_*_lists.
6554         (struct fork_handler): Include pointers to all three functions.
6555         Add next, refcntr and need_signal elements.
6556         (__fork_handlers): New declaration.
6557         (__register_atfork_malloc): Remove declaration.
6558         (HAVE_register_atfork_malloc): Remove definition.
6559         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6560         __pthread_child_handler variable.
6561         (__libc_pthread_init): Use __register_atfork instead of explicitly
6562         adding to the list.
6563         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6564         and lll_futex_wake.
6565         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6567         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6568         function must never be reached.
6570         * cond-perf.c: New file.
6572 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6574         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6576 2003-05-04  Roland McGrath  <roland@redhat.com>
6578         * Makefile ($(objpfx)../libc.so): New target.
6580 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6582         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6583         (pthread_condattr_t): Size is only an int, don't use long for
6584         alignment.
6585         (pthread_mutexattr_t): Likewise.
6586         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6587         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6588         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6590 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6592         * sysdeps/i386/tls.h: Define THREAD_ID.
6593         * sysdeps/ia64/tls.h: Likewise.
6594         * sysdeps/powerpc/tls.h: Likewise.
6595         * sysdeps/s390/tls.h: Likewise.
6596         * sysdeps/sh/tls.h: Likewise.
6597         * sysdeps/x86_64/tls.h: Likewise.
6598         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6599         record ownership.
6600         * pthread_mutex_timedlock.c: Likewise.
6601         * pthread_mutex_trylock.c: Likewise.
6602         * pthread_mutex_unlock.c: Likewise.
6603         * pthread_rwlock_trywrlock.c: Likewise.
6604         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6605         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6606         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6607         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6609         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6610         flag.
6612 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6614         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6615         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6616         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6617         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6618         Make __align long long instead of long.
6619         (pthread_rwlock_t): Formatting.
6620         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6621         (pthread_rwlock_t): Formatting.
6622         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6623         (pthread_cond_t): Make __align long long instead of long.
6624         (pthread_rwlock_t): Move __flags field to the same position as in
6625         linuxthreads.
6627 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6629         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6630         * tst-rwlock7.c (do_test): Likewise.
6632 2003-04-26  Roland McGrath  <roland@redhat.com>
6634         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6636 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6638         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6639         sizeof (struct pthread).
6640         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6641         1 struct pthread.
6642         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6643         to 0.
6644         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6645         struct pthread.
6646         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6647         to 32-bit bytes.
6648         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6649         tcbp.
6650         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6651         unneccessarily.
6652         (NO_TLS_OFFSET): Define.
6653         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6654         add TLS_TCB_SIZE unnecessarily.
6656 2003-04-22  Roland McGrath  <roland@redhat.com>
6658         * Makeconfig (shared-thread-library): Reverse link order to work
6659         around linker bug.
6661 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6663         * semaphore.h: Fix typo in comment.
6665 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6667         * sysdeps/pthread/sigfillset.c: New file.
6669         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6670         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6671         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6672         * sysdeps/pthread/sigaction.c: Likewise.
6673         * sysdeps/pthread/sigprocmask.c: New file.
6674         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6675         __SIGRTMIN+1.
6676         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6677         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6678         in this case.
6680 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6682         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6683         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6685         * sysdeps/unix/sysv/linux/unregister-atfork.c
6686         (__unregister_atfork): Don't free memory not allocated dynamically.
6688         * semaphore.h: Remove __THROW marker from cancellation points.
6689         * nptl/sysdeps/pthread/pthread.h: Likewise.
6691 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6693         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6694         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6695         __THROW.
6697 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6699         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6701 2003-04-15  Roland McGrath  <roland@redhat.com>
6703         * forward.c (__pthread_unwind): Tweak to avoid warning.
6705 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6707         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6709 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6712         overflow CFA advance instructions.
6713         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6715 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6717         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6718         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6719         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6720         defined.
6722         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6723         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6725         DW_CFA_advance_loc for .Laddl-.Lsubl.
6727 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6729         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6730         position-independent unwind data for static libraries.
6731         Add missing unwind info.  Add comments.
6733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6736         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6738 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6740         * Makefile: Make sure all cancellation points are compiled with
6741         exception and asynchronous unwind tables.
6743         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6744         which mishandles loading of global object addresses in PIC.
6745         (THREAD_SETMEM_NC): Likewise.
6747 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6749         * pthread.h: Define new data structure for cleanup buffer.  Declare
6750         new cleanup handler interfaces.
6751         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6752         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6753         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6754         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6755         it.  Declare old cleanup handler installation functions.
6756         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6757         handling.
6758         * cleanup_defer.c: Likewise.
6759         * cleanup_compat.c: New file.  Old cleanup code.
6760         * cleanup_def_compat.c: New file.  Old cleanup code.
6761         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6762         if own thread descriptor.
6763         * unwind.c: New file.
6764         * forward.c: Add __pthread_unwind.
6765         * init.c (pthread_functions): Add __pthread_unwind.
6766         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6767         Add ptr___pthread_unwind.
6768         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6769         and unwind function.
6770         * Makefile (libpthread-routines): Add cleanup_compat,
6771         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6772         table generation if necessary.
6773         * version.c: Record whether unwind support is compiled in.
6774         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6775         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6776         handler interfaces.
6777         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6778         complication to generate unwind information for syscall wrappers.
6779         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6780         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6781         __cleanup_fct_attribute.
6783         * Makefile: Add rules to build and run tst-cleanup0.
6784         * tst-cleanup0.c: New file.
6785         * tst-cleanup0.expect: New file.
6787         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
6788         caller.  Optimize to avoid often unecessary local variable.
6790 2003-04-11  Roland McGrath  <roland@redhat.com>
6792         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6793         sets variable `multidir'; include that.
6794         (generated): Add it.
6795         ($(objpfx)$(multidir)/crti.o): New target.
6796         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6798 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6800         * tst-attr2.c (do_test): Add cast to avoid warning.
6801         * tst-mutex4.c (do_test): Likewise.
6803 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
6805         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6806         in child.
6808 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
6810         * Makefile (tests): Add tst-detach1.
6811         * tst-detach1.c: New file.
6813 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
6815         * sysdeps/pthread/pthread.h: Remove duplicate
6816         pthread_cleanup_{push,pop} definitions.
6818         * tst-barrier2.c: Eliminate warnings.
6819         * tst-cancel4.c: Likewise.
6820         * tst-cond4.c: Likewise.
6821         * tst-cond6.c: Likewise.
6822         * tst-detach1.c: Likewise.
6823         * tst-rwlock4.c: Likewise.
6824         * tst-rwlock6.c: Likewise.
6825         * tst-rwlock7.c: Likewise.
6826         * tst-sem3.c: Likewise.
6827         * tst-spin2.c: Likewise.
6828         * tst-umask1.c: Likewise.
6830 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
6832         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6834 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
6836         * descr.h (struct pthread): Move cancelhandling member to the front.
6838 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
6840         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6841         malloc_parent, and malloc_child statically.
6842         (__register_atfork_malloc): New function.
6843         (free_mem): Don't free any of the malloc_* variables on the list.
6844         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6845         Define HAVE_register_atfork_malloc.
6847 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
6849         * sysdeps/pthread/createthread.c (create_thread): Add some more
6850         comments explaining when to set multiple_threads and when not.
6852         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6853         THREAD_ATOMIC_BIT_SET if not already defined.
6854         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6855         THREAD_ATOMIC_BIT_SET:
6856         * sysdeps/x86_64/tls.h: Likewise.
6857         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6858         THREAD_ATOMIC_CMPXCHG_VAL.
6859         (_pthread_cleanup_pop_restore): Likewise.
6860         * cancellation.c (__pthread_enable_asynccancel): Likewise.
6861         (__pthread_enable_asynccancel_2): Likewise.
6862         (__pthread_disable_asynccancel): Likewise.
6863         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6864         (__libc_disable_asynccancel): Likewise.
6865         * init.c (sigcancel_handler): Likewise.
6866         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6867         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6869 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
6871         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6872         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6873         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6874         * Makefile (tests): Add tst-cancel11.
6875         * tst-cancel11.c: New file.
6877 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
6879         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6880         round, not the first.  Use specific_used flag instead of local
6881         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
6882         (__free_tcb): Don't call deallocate_tsd here.
6883         (start_thread): Call deallocate_tsd here.
6884         * pthread_setspecific.c: Set specific_used flag really only when
6885         needed.
6886         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6887         * tst-tsd3.c: New file.
6888         * tst-tsd4.c: New file.
6890 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6892         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6893         Use atomic_exchange_and_add instead of __lll_add.
6894         (__lll_mutex_timedlock): Likewise.
6895         Patch by Ian Wienand.
6897 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
6899         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6900         (SINGLE_THREAD_P): Fix typo.
6901         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6903 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6905         * Makefile (tests): Add tst-align.
6906         * tst-align.c: New file.
6907         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6909         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6910         function correctly.
6912         * tst-tsd2.c: Add casts to avoid warnings.
6914 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
6916         * descr.h (struct pthread): Move most often used elements to the front.
6918 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
6920         * Makefile (libpthread-routines): Add pthread_atfork.
6921         (libpthread-static-only-routines): Add pthread_atfork.
6923 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6925         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6926         of TLS_DTV_AT_TP.
6927         (INSTALL_DTV): Add parens.
6928         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6929         Use passed descr instead of THREAD_SELF.
6930         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6931         (__lll_mutex_timedlock_wait): Correct expected value after
6932         spurious wakeup.
6933         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6934         Release lock before waking up the waiters.
6935         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6936         criteria.  Reorderstruct passed to cleanup handler.  Fix
6937         handling of cancellation and failung pthread_mutex_unlock call.
6938         Use __pthread_enable_asynccancel_2 instead of
6939         __pthread_enable_asynccancel.
6940         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6941         Return result of lock re-get if it fails.
6942         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6943         for __pthread_cleanup_push.
6944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6945         completely broken rwlock implementation.
6946         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6947         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6948         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6949         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6950         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6951         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
6952         versioned_symbol macro.
6953         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6954         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6956 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
6958         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
6959         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
6960         and __helper_tid.
6961         (struct timer): Remove th and bar field.
6962         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
6963         debugging code.  Create only one helper thread.
6964         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
6965         helper thread.
6966         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6967         Renamed.  Define statically.  Use thread info from siginfo.
6968         (__helper_once): New variable.
6969         (__helper_tid): New variable.
6970         (__reset_helper_control): New function.
6971         (__start_helper_thread): New function.
6973         * pthread_create.c (start_thread): Don't use setjmp inside
6974         __builtin_expect to work around gcc bug.
6976         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
6977         timer_delete syscall fails, but not with ENOSYS, set
6978         __no_posix_timers.
6980         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
6981         (timer_settime): Fix typo.
6982         * sysdeps/unix/sysv/linux/timer_getoverr.c
6983         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
6985 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
6987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
6988         offset of cleanupbuf.__prev.
6990 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
6992         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
6993         of included file.
6995 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
6997         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
6998         NULL provide default definition to syscall.
7000 2003-03-25  Roland McGrath  <roland@redhat.com>
7002         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7003         (timer_id2ptr): Fix typo.
7005 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7007         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7008         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7009         * sysdeps/ia64/pthreaddef.h: Likewise.
7010         * sysdeps/powerpc/pthreaddef.h: Likewise.
7011         * sysdeps/s390/pthreaddef.h: Likewise.
7012         * sysdeps/sh/pthreaddef.h: Likewise.
7013         * sysdeps/x86_64/pthreaddef.h: Likewise.
7014         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7015         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7016         being changed.
7017         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7018         SIGTIMER is not unblocked.
7019         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7020         RT signal taken.
7021         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7022         be send.
7023         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7024         pass pointer through as ID.
7025         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7026         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7027         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7028         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7029         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7030         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7031         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7032         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7033         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7034         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7035         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7036         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7037         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7038         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7039         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7040         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7041         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7042         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7043         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7044         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7045         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7046         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7047         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7048         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7049         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7050         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7051         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7052         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7053         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7054         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7055         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7056         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7057         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7059         * pthreadP.h: Remove FRAME_LEFT definition.
7060         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7061         already left frame.  Programs which have this problem are not POSIX
7062         compliant.
7063         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7065 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7067         * sysdeps/pthread/tst-timer.c: Check return values of the
7068         functions we test.
7070 2003-03-23  Roland McGrath  <roland@redhat.com>
7072         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7073         * tst-tls3mod.c: Likewise.
7074         * tst-tls1.c: Likewise.
7075         * tst-tls2.c: Likewise.
7077         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7078         undefined behavior.
7080         * tst-join5.c (tf1, tf2): Add a cast.
7082         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7084         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7085         Don't test anything.
7086         * tst-cond4.c: Likewise.
7087         * tst-cond6.c: Likewise.
7088         * tst-flock2.c: Likewise.
7089         * tst-mutex4.c: Likewise.
7090         * tst-rwlock4.c: Likewise.
7091         * tst-signal1.c: Likewise.
7092         * tst-spin2.c: Likewise.
7093         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7095         * tst-mutex4.c: Use test-skeleton.c.
7096         * tst-spin2.c: Likewise.
7097         * tst-sysconf.c: Likewise.
7098         * tst-barrier2.c: Likewise.
7099         * tst-cond4.c: Likewise.
7100         * tst-cond6.c: Likewise.
7101         * tst-rwlock4.c: Likewise.
7102         * tst-unload.c: Likewise.
7103         * tst-flock2.c (do_test): Use return instead of exit.
7105 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7107         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7109 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7111         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7112         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7113         instead of __lll_compare_and_swap.
7114         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7115         Likewise.
7116         Removed definition if __lll_compare_and_swap.
7118         * cancellation.c: Adjust for new form of compare&exchange macros.
7119         * cleanup_defer.c: Likewise.
7120         * init.c: Likewise.
7121         * libc-cancellation.c: Likewise.
7122         * old_pthread_cond_broadcast.c: Likewise.
7123         * old_pthread_cond_signal.c: Likewise.
7124         * old_pthread_cond_timedwait.c: Likewise.
7125         * old_pthread_cond_wait.c: Likewise.
7126         * pthread_cancel.c: Likewise.
7127         * pthread_create.c: Likewise.
7128         * pthread_detach.c: Likewise.
7129         * pthread_join.c: Likewise.
7130         * pthread_key_delete.c: Likewise.
7131         * pthread_setcancelstate.c: Likewise.
7132         * pthread_setcanceltype.c: Likewise.
7133         * pthread_timedjoin.c: Likewise.
7134         * pthread_tryjoin.c: Likewise.
7135         * sysdeps/pthread/createthread.c: Likewise.
7137 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7139         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7140         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7141         definitions.  Replace uses with calls to atomic_* functions.
7142         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7143         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7144         __lll_test_and_set calls with atomic_exchange_and_add and
7145         atomic_exchange calls respectively.
7146         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7147         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7148         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7149         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7150         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7151         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7152         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7154         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7155         returns the old value.
7157 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7159         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7160         int for variable OLDVAL and correct inline assembler contraint.
7161         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7162         type int for variable OLD.
7164         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7165         only for s390-32.
7166         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7167         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7168         instead of multiple_threads field in the TCB.
7170 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7172         * sysdeps/i386/i686/bits/atomic.h: Removed.
7173         * sysdeps/i386/i586/bits/atomic.h: Removed.
7174         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7175         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7176         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7177         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7178         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7179         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7180         * atomic.h: Removed.  Moved to glibc.
7182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7183         support for clock selection.
7185         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7186         signalling waiters.
7188 2003-03-18  Roland McGrath  <roland@redhat.com>
7190         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7191         Add __lll_rel_instr first.  Add memory clobber.
7192         (lll_mutex_unlock): Use __lll_test_and_set.
7193         From Paul Mackerras <paulus@samba.org>.
7195         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7196         unconditionally.
7197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7198         (SINGLE_THREAD_P):  Add `header.' prefix.
7199         From Paul Mackerras <paulus@samba.org>.
7201         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7202         pthread_timedjoin_np to ...
7203         (libpthread: GLIBC_2.3.3): ... here.
7204         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7206         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7207         Avoid shadowing VAL variable.
7209         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7210         New macro.
7212 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7214         * Makefile (tests): Add tst-cond11.
7215         * tst-cond11.c: New file.
7217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7218         struct passed to cleanup handler to eliminate one more
7219         instruction.
7220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7222         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7223         (pthrad_cond_t): Replace __unused field with __clock.
7225         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7226         waken all waiters in cleanup handler.
7227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7228         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7230         * pthread_condattr_getclock.c: New file.
7231         * pthread_condattr_setclock.c: New file.
7232         * sysdeps/pthread/pthread.h: Declare these new functions.
7233         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7234         * Makefile (libpthread-routines): Add the new functions.
7235         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7236         Renamed field to value.  Document use of the bits.
7237         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7238         change.
7239         * pthread_condattr_setpshared.c: Likewise.
7240         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7241         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7242         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7243         Add __clock field.
7244         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7245         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7246         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7247         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7249         Implement clock selection.
7250         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7251         * pthread-errnos.sym: Add ENOSYS.
7252         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7253         _POSIX_CLOCK_SELECTION.
7254         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7257         invalid .size directive.
7259 2003-03-17  Roland McGrath  <roland@redhat.com>
7261         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7262         Formatting tweaks.
7264 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7266         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7267         Use __lll_add instead of spelling it out.  Use protected symbol names.
7268         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7269         Use __lll_add.
7270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7271         Renamed from lll_compare_and_swap.  Use new name where necessary.
7272         (__lll_add): Defined.
7273         (__lll_dec_if_positive): Defined.
7274         (__lll_test_and_set): Defined.
7275         * sysdeps/ia64/pthread_spin_init.c: Removed.
7276         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7277         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7278         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7279         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7280         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7281         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7282         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7283         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7284         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7285         __sync_lock_release_si.
7286         Patch by Jakub Jelinek.
7288         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7289         Fix timeout handling.
7290         (__lll_timedwait_tid): Likewise.
7291         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7292         Patch by Jakub Jelinek.
7294         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7296 2003-03-17  Roland McGrath  <roland@redhat.com>
7298         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7299         * sysdeps/pthread/pthread_spin_init.c: New file.
7300         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7301         * sysdeps/powerpc/Makefile: New file.
7302         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7303         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7304         * sysdeps/powerpc/pthreaddef.h: New file.
7305         * sysdeps/powerpc/tcb-offsets.sym: New file.
7306         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7307         * sysdeps/powerpc/tls.h: New file.
7308         * sysdeps/powerpc/bits/atomic.h: New file.
7309         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7310         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7311         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7313         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7314         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7315         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7316         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7317         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7318         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7319         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7320         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7321         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7322         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7323         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7324         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7325         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7326         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7327         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7329         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7330         not gettimeofday.
7331         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7332         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7333         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7334         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7335         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7337 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7339         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7340         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7343         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7345 2003-03-16  Roland McGrath  <roland@redhat.com>
7347         * tst-fork4.c: Include <string.h>.
7348         * tst-signal2.c: Likewise.
7349         * tst-mutex5.c (do_test): exit -> return.
7350         * tst-mutex2.c: Include <stdlib.h>.
7352 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7354         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7355         (__lll_mutex_timedlock_wait): Correct expected value after
7356         spurious wakeup.  Otherwise we would never wait again.
7358         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7359         zone versus inline asm stupidity.  Use correct instructions.
7361         * tst-rwlock6.c: Add some more status output.
7363 2003-03-15  Roland McGrath  <roland@redhat.com>
7365         * sysdeps/pthread/configure.in: New file.
7366         * sysdeps/pthread/configure: New file (generated).
7368 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7370         * allocatestack.c (allocate_stack): Store the exact stack size of
7371         user allocated stacks.
7373 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7375         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7376         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7377         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7378         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7379         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7380         Use `header.' prefix.
7381         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7383 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7385         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7386         __builtin_frame_address, use stack pointer.
7388         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7389         instead of __builtin_frame_pointer.
7391 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7393         * tst-basic1.c (do_test): Add cast to avoid warning.
7394         * tst-basic2.c (do_test): Likewise.
7396         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7397         amount of stack correction.
7399         * tst-fork4.c: Use test-skeleton.c.
7401 2003-03-14  Roland McGrath  <roland@redhat.com>
7403         * init.c: Fix typo "#eli" for "#else".
7405 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7407         * allocatestack.c (__stack_user): Use hidden_data_def.
7408         * pthread_create.c (__pthread_keys): Likewise.
7410         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7412 2003-03-14  Roland McGrath  <roland@redhat.com>
7414         * tst-fork4.c: New file.
7415         * Makefile (tests): Add it.
7417         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7418         we always define the padding space.
7419         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7420         stopped supporting its own extensions fully.
7421         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7422         struct also called `header', so `header.multiple_threads' is the field
7423         name to use on all machines.
7424         * allocatestack.c (allocate_stack): Use `header.' prefix.
7425         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7426         * pthread_create.c (__pthread_create_2_1): Likewise.
7427         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7428         (THREAD_SELF): Likewise.
7429         * sysdeps/x86_64/tls.h: Likewise.
7430         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7431         (SINGLE_THREAD_P): Likewise.
7432         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7433         (SINGLE_THREAD_P): Likewise.
7434         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7435         (SINGLE_THREAD_P): Likewise.
7437         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7438         value directly.
7440 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7442         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7443         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7445         * pthread_create.c (start_thread): setjmp is expected to return 0.
7447         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7448         (THREAD_GETMEM_NC): Likewise.
7450 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7452         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7453         and the size of the stack which must be allocated is a multiple,
7454         allocate one more page.
7455         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7456         MULTI_PAGE_ALIASING.
7458 2003-03-13  Roland McGrath  <roland@redhat.com>
7460         * pthread_create.c (start_thread): Set EXITING_BIT after the
7461         event-reporting (and destructors), not before.
7463 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7465         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7466         lll_futex_wake): Declare register variables as long int instead of
7467         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7468         Make syscall arguments clobbered by the syscall.
7469         (lll_futex_wait): Define using lll_futex_timed_wait.
7471         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7472         to void *.
7474         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7475         PPID if [! NDEBUG].
7477         * allocatestack.c (nptl_ncreated): Only declare if
7478         COLORING_INCREMENT != 0.
7480         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7481         (__libc_enable_asynccancel_2): Remove prototype.
7483         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7484         ctid to match kernel.
7486 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7488         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7489         libc_multiple_threads.
7490         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7491         __libc_multiple_threads to...
7492         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7494         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7495         versioning.
7496         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7497         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7499         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7500         (__pthread_once_internal): Define.
7502         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7503         macros instead of .symver directly.
7504         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7505         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7507         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7508         * sysdeps/x86_64/tcb-offsets.sym: New file.
7509         * sysdeps/x86_64/Makefile: New file.
7511         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7513         to access own pthread_t in TCB.
7514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7515         Likewise.
7516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7517         Likewise.
7518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7520 2003-03-12  Roland McGrath  <roland@redhat.com>
7522         * pthread-errnos.sym: New file.
7523         * Makefile (gen-as-const-headers): New variable, list that file.
7524         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7525         header <pthread-errnos.h> instead of defining errno values here.
7526         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7527         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7528         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7530         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7531         Likewise.
7532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7533         Likewise.
7534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7536         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7537         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7538         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7539         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7540         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7541         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7542         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7543         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7544         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7545         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7546         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7547         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7548         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7549         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7550         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7551         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7552         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7553         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7554         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7555         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7556         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7557         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7558         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7559         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7560         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7562         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7563         CLONE_CHILD_SETTID worked.
7565 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7567         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7568         file.
7569         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7570         file.
7572         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7573         (pthread_cond_t): Add padding.
7575         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7576         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7577         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7579         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7580         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7582         (__pthread_rwlock_timedrdlock): Likewise.
7583         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7584         (__pthread_rwlock_wrlock): Likewise.
7585         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7586         (__pthread_rwlock_rdlock): Likewise.
7588         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7591         result of lock re-get if it fails.
7593 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7596         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7597         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7600         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7601         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7602         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7603         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7604         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7606         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7607         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7609         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7610         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7611         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7612         (create_thread): Likewise.
7613         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7614         * init.c (__pthread_initialize_minimal_internal): Initialize
7615         __libc_multiple_threads_ptr if necessary.
7616         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7617         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7618         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7619         __libc_multiple_threads.
7620         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7621         necessary.
7623         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7624         (THREAD_SETMEM_NC): Likewise.
7626         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7627         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7628         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7629         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7631         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7632         Eliminate one entire instruction.
7634         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7635         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7637         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7638         instead of __pthread_enable_asynccancel.
7639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7640         (__pthread_cond_wait): Likewise.
7641         * sysdeps/pthread/pthread_cond_timedwait.c
7642         (__pthread_cond_timedwait): Likewise.
7643         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7645         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7646         (__condvar_cleanup): Wake up all waiters in case we got signaled
7647         after being woken up but before disabling asynchronous
7648         cancellation.
7649         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7650         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7651         (__condvar_cleanup): Likewise.
7653         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7654         Make it an error if architecture has no #if case.  Add x86-64.
7656         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7657         pt-initfini.s generation.
7659         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7660         (TLS_INIT_TP): Fix typo.
7662 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7664         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7665         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7667         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7668         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7669         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7670         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7671         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7672         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7673         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7674         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7676 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7678         * sysdeps/pthread/pthread_cond_timedwait.c
7679         (__pthread_cond_timedwait): Return the result of the final
7680         locking.  If it succeeds, the regular function return value.
7682         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7683         Return result of the final locking.
7684         * version.c (__nptl_main): Work around problems with the strange
7685         INTERNAL_SYSCALL macro on ppc32.
7686         * init.c (__pthread_initialize_minimal_internal): Unblock
7687         SIGCANCEL in case the parent blocked it.
7688         Reported by Paul Mackerras <paulus@samba.org>.
7690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7694 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7696         * sysdeps/pthread/pthread_cond_timedwait.c
7697         (__pthread_cond_timedwait): Unlock and fail if
7698         __pthread_mutex_unlock_internal failed.
7700         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7701         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7702         Use ARCH_CLONE.
7703         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7704         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7705         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7706         ALLOCATE_STACK): New macros.
7707         (TLS_TPADJ): New macro.
7708         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7709         (allocate_stack): Handle TLS_DTV_AT_TP and
7710         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7711         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7712         Don't set PD->self.
7713         * init.c [__ia64__] (__NR_set_tid_address): Define.
7715         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7716         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7717         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7718         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7719         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7720         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7721         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7722         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7723         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7724         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7725         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7726         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7727         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7728         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7729         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7730         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7731         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7732         * sysdeps/ia64/bits/atomic.h: New file.
7733         * sysdeps/ia64/Makefile: New file.
7734         * sysdeps/ia64/pthread_spin_init.c: New file.
7735         * sysdeps/ia64/pthread_spin_lock.c: New file.
7736         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7737         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7738         * sysdeps/ia64/pthreaddef.h: New file.
7739         * sysdeps/ia64/tcb-offsets.sym: New file.
7740         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7741         * sysdeps/ia64/tls.h: New file.
7743         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7744         to syscall instead of no arguments.
7746 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7748         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7749         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7750         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7751         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7753         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7754         unused code.
7756         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7758         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7759         lowlevelbarrier.sym.
7760         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7761         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7762         Include lowlevelbarrier.h and don't define offsets locally.
7763         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7766         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7767         (__lll_mutex_timedlock_wait): Likewise.
7768         (lll_mutex_lock): Adjust asm for that.
7769         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7770         (lll_lock): Adjust asm for operand order change.
7771         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7772         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7774         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7775         Reverse order of parameters.
7776         (__lll_timedwait_tid): Remove regparms attribute.
7777         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7778         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7780         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7781         (__lll_timedwait_tid): Remove one unnecessary instruction.
7783         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7784         __lll_mutex_timedlock_wait only for NOT_IN_libc.
7785         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7786         lowlevelmutex.S.
7788         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7789         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7790         for NOT_IN_libc.
7791         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7792         lowlevellock.S.
7794         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7795         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
7796         for libc.so.
7797         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7798         define LOCK here (if UP is not defined).  The actual code is in
7799         lowlevelmutex.S.
7801         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7802         LOCK is already defined.  Don't define lll_unlock_wake_cb and
7803         __lll_timedwait_tid for libc.so.
7804         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7805         define LOCK here (if UP is not defined).  The actual code is in
7806         lowlevellock.S.
7808         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7809         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7810         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7811         instead of lowlevelsem.h.
7812         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7813         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7814         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7816         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7817         lowlevelrwlock.sym.
7818         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7819         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7820         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7822         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7823         register loading.
7824         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7825         last changed.  D'oh.
7827         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7829         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7830         of __libc_locking_needed.
7831         (lll_trylock): Initialize %eax to zero.
7833         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7834         pthread_cond_t definition.
7836 2003-03-10  Roland McGrath  <roland@redhat.com>
7838         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7839         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7840         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7841         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7842         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7844         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7845         Instead of setting PD->multiple_threads, set globals
7846         __pthread_multiple_threads and __libc_multiple_threads.
7847         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7848         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7849         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7851         * descr.h (struct pthread): Conditionalize first member on
7852         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
7853         containing an anonymous tcbhead_t.  Move `list' member out.
7854         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7855         * allocatestack.c: Remove use of `header.data.' prefix.
7856         * pthread_create.c: Likewise.
7857         * init.c (__pthread_initialize_minimal_internal): Likewise.
7858         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7859         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7860         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7861         * sysdeps/x86_64/tls.h: Likewise.
7862         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7863         (SINGLE_THREAD_P): Likewise.
7864         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7865         (SINGLE_THREAD_P): Likewise.
7866         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7867         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7869 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
7871         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7873         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7874         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7876         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7877         leftovers from the ia32 code.
7879         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7880         memory load.
7881         (clear_once_control): Don't load %esi.
7883         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7884         handling.
7886         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7888         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7889         * sysdeps/unix/sysv/linux/createthread.c: ...here.
7891         * Makefile (tests): Add tst-cond10.
7892         * tst-cond10.c: New file.
7894 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
7896         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7897         * tst-signal3.c (do_test): Likewise.
7898         * tst-sem5.c (do_test): Likewise.
7899         * tst-kill6.c (do_test): Likewise.
7900         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
7902         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7903         of inc/dec.
7904         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7905         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7906         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7907         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7908         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7909         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7910         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7911         Likewise.
7912         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7913         Likewise.
7914         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7915         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7916         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7919         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7920         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7921         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7923         * allocatestack.c (allocate_stack): If mprotect() fails free the
7924         TLS memory.
7926 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
7928         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7930         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7931         lll_wake_tid.  This was used only to work around kernel limits in
7932         the early days.
7933         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7934         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7935         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7936         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7938         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7939         (__pthread_initialize_minimal_internal): Change initialization of
7940         __static_tls_align_m1 appropriately.
7941         * pthreadP.h (__static_tls_align_m1): Renamed from
7942         __static_tls_align.
7943         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7944         instead of __static_tls_align-1.
7946 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
7948         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7950         * pthread_create.c: Define __pthread_keys using nocommon
7951         attribute, not by placing it explicitly in bss.
7952         Remove DEFINE_DEALLOC definition.  Not needed anymore.
7954         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7955         Use it in mmap call to allocate stacks.
7957         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
7959         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
7960         result of the thread function.
7962 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
7964         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
7965         version is just fine.
7967         * sysdeps/unix/sysv/linux/libc_pthread_init.c
7968         (__pthread_child_handler): Renamed from pthread_child_handler,
7969         exported, and marked hidden.  Change all users.
7970         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
7971         free __pthread_child_handler from child list.
7973 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7975         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
7977         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7978         Fix handling of cancellation and failing pthread_mutex_unlock call.
7979         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7980         (__pthread_cond_wait): Likewise.
7982         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
7983         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
7984         lll_futex_timed_wait call.
7985         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7986         (pthread_rwlock_timedwrlock): Likewise.
7988         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7989         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
7990         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
7992         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
7993         check of lll_futex_wake return value.
7995 2003-03-03  Roland McGrath  <roland@redhat.com>
7997         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
7999         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8000         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8001         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8003 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8005         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8006         error for CPU clocks.
8008         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8009         _POSIX_MONOTONIC_CLOCK.
8010         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8012         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8013         recent kernels.
8015 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8017         * descr.h (struct pthread): Move cleanup field to the front.
8019 2003-03-01  Roland McGrath  <roland@redhat.com>
8021         * sem_open.c (sem_open): Braino fix.
8023 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8025         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8027         __pthread_cleanup_pop functionality.
8028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8030         * descr.h (struct pthread): Move tid field to the front now that
8031         it is often used.
8033         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8034         (__lll_mutex_timedlock_wait): Remove.
8035         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8036         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8037         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8038         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8039         (lll_unlock_wake_cb): Don't save and restore %esi.
8040         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8041         %esi.
8042         (__lll_timedwait_tid): Add alignment.
8043         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8044         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8045         %esi.
8046         (__lll_timedwait_tid): Removed.
8047         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8048         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8049         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8050         (pthread_barrier_wait): Don't save, load, and restore %esi for
8051         last thread.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8053         (__pthread_cond_signal): Don't save, load, and restore %esi.
8054         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8055         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8056         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8057         Don't save, load, and restore %esi.
8059 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8061         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8062         Release lock before waking up the waiters.
8064         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8066         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8067         (reader_thread): Likewise.
8069         * sysdeps/pthread/pthread_rwlock_unlock.c
8070         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8071         to wake up readers if there are none.
8073         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8074         Release internal lock before wake threads.
8076 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8078         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8079         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8080         predefined.
8081         * tst-rwlock9.c: Likewise.
8082         * tst-rwlock10.c: New file.
8083         * tst-rwlock11.c: New file.
8085         * Makefile (tests): Add tst-dlsym1.
8086         * tst-dlsym1.c: New file.
8088         * init.c (__pthread_initialize_minimal_internal): Set
8089         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8090         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8092 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8094         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8096         * tst-cond2.c: Fix sychronization with child.
8098         * tst-rwlock8.c (reader_thread): Remove unused variable.
8100         * Makefile: Add rules to build and run tst-tls3.
8101         * tst-tls3.c: New file.
8102         * tst-tls3mod.c: New file.
8104         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8105         * tst-rwlock8.c: New file.
8106         * tst-rwlock9.c: New file.
8107         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8108         complete broken rwlock implementation.
8109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8110         Likewise.
8111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8112         Likewise.
8113         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8115         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8116         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8117         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8118         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8119         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8121 2003-02-23  Roland McGrath  <roland@redhat.com>
8123         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8125 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8127         * Makefile (tests): Add tst-context1.
8128         * tst-context1.c: New file.
8130         * Makefile (tests): Add tst-tls1 and tst-tls2.
8131         * tst-tls1.c: New file.
8132         * tst-tls2.c: New file.
8134         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8135         for failed cmpxchg.
8137         * pthread_create.c (start_thread): Set EXITING_BIT early.
8139         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8140         (THREAD_GETMEM_NC): Likewise.
8142 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8144         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8145         off 3 more bytes by using offset-less instructions when possible.
8147         * Makefile: Add dependency for $(objpfx)version.d.
8149         * eintr.c (eintr_source): Add unnecessary return but the compiler
8150         insists.
8152         * tst-kill3.c: Include <unistd.h>.
8154 2003-02-21  Roland McGrath  <roland@redhat.com>
8156         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8158 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8160         * Makefile (tests): Add tst-eintr1.
8161         (distribute): Add eintr.c.
8162         * tst-eintr1.c: New file.
8163         * eintr.c: New file.
8165         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8167         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8168         Disallow sending SIGCANCEL.
8170         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8171         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8172         * tst-kill1.c: New file.
8173         * tst-kill2.c: New file.
8174         * tst-kill3.c: New file.
8175         * tst-kill5.c: New file.
8176         * tst-kill6.c: New file.
8177         * tst-basic7.c: Renamed to...
8178         * tst-kill4.c: ...this.
8180 2003-02-21  Roland McGrath  <roland@redhat.com>
8182         * Makefile (install-lib-ldscripts): New variable.
8184 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8186         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8187         * pthread_cancel.c: Use INVALID_TD_P.
8188         * pthread_detach.c: Likewise.
8189         * pthread_getschedparam.c: Likewise.
8190         * pthread_setschedparam.c: Likewise.
8191         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8192         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8193         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8194         * pthread_timedjoin.c: Likewise.
8196         * tst-basic7.c: Include <signal.h>.
8198         * pthread_join.c (pthread_join): Limited checking for invalid
8199         descriptors.
8200         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8202 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8204         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8205         beginning of the loop.  Clear the entire first block of TSD.
8206         * Makefile (tests): Add tst-key4.
8207         * tst-key4.c: New file.
8209 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8211         * Makefile (tests): Add tst-basic7.
8212         * tst-basic7.c: New file.
8214         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8215         Add some more __builtin_expect.
8217         * pthreadP.h: Define dummy version of DEBUGGING_P.
8219 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8221         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8222         _POSIX_THREAD_PRIORITY_SCHEDULING.
8223         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8224         _XOPEN_REALTIME_THREADS.
8225         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8227         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8228         kernel returns EINVAL for PID <= 0, work around it.
8230         * Makefile (tests): Add tst-signal5.
8231         * tst-signal5.c: New file.
8233         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8234         and LOGIN_NAME_MAX.
8236         * tst-cancel1.c (tf): Block all signals.
8238         * Makefile (tests): Add tst-basic6.
8239         * tst-basic6.c: New file.
8241         * tst-basic1.c: Add test for process ID.
8243         * Makefile (tests): Add tst-cancel10.
8244         * tst-cancel10.c: New file.
8246         * Makefile (tests): Add tst-signal4.
8247         * tst-signal4.c: New file.
8249         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8250         __sigismember instead of sigismember.  Add __builtin_expect.
8252 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8254         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8255         pthread_setcancelstate, and pthread_rwlock_setpshared.
8257         * tst-cancel7.c (do_test): Make sure the pid file exists before
8258         canceling the thread.
8260         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8261         pthread_rwlock_timedrdlock tests.
8262         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8264         Check for invalid tv_nsec field.
8265         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8266         Likewise.
8268         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8269         recursive mutex of overflow.
8271         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8273         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8274         going into an endless loop.
8275         * Makefile (tests): Add tst-cancel9.
8276         * tst-cancel9.c: New file.
8278         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8280 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8282         * tst-mutex5.c (do_test): Add more timedlock tests.
8284         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8285         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8287         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8288         use INLINE_SYSCALL.  Error number is returned, not -1.
8290         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8291         and __deallocate_stack with internal_function.
8292         * pthread_create.c: Adjust definitions appropriately.
8293         * allocatestack.c: Likewise.
8295         * pthread_join.c: Add one more __builtin_expect.
8296         * pthread_timedjoin.c: Likewise.
8298         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8299         not data of sequence number does not match.
8300         Add one __builtin_expect.
8302         * Makefile (tests): Add tst-clock1.
8303         * tst-clock1.c: New file.
8305         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8306         negative arguments.
8307         * Makefile (tests): Add tst-basic5.
8308         * tst-basic5.c: New file.
8310 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8312         * Makefile (tests): Add tst-basic4.
8313         * tst-basic4.c: New file.
8315         * pthreadP.h: Add declaraction for __nptl_nthreads.
8316         * pthread_create.c: Define __nptl_nthreads
8317         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8318         after thread is done.  If then zero, call exit(0).
8319         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8320         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8321         * init.c (pthread_functions): Initialize ptr_nthreads.
8322         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8323         (__reclaim_stacks): Decrement __nptl_nthreads.
8324         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8325         Define.
8326         * Makefile (tests): Add tst-basic3.
8327         * tst-basic3.c: New file.
8329         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8330         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8331         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8332         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8333         if asynchronous canceling is enabled.
8334         * pthread_join.c (pthread_join): When recognizing circular joins,
8335         take into account the other thread might be already canceled.
8336         * Makefile (tests): Add tst-join5.
8337         * tst-join5.c: New file.
8339         * Makefile (tests): Add tst-join4.
8340         * tst-join4.c: New file.
8342 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8344         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8346 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8348         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8349         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8350         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8351         warning.
8352         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8353         to avoid warning.
8354         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8355         error if lll_futex_wake failed.
8357 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8360         handling of cancellation and failung pthread_mutex_unlock call.
8361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8362         * Makefile (tests): Add tst-cond8 and tst-cond9.
8363         * tst-cond8.c: New file.
8364         * tst-cond9.c: New file.
8366         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8368         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8369         non-standard initializers with __USE_GNU.
8371         * Makefile (tests): Add tst-cleanup3.
8372         * tst-cleanup3.c: New file.
8374 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8376         * Makefile (tests): Add tst-attr1 and tst-attr2.
8377         * tst-attr1.c: New file.
8378         * tst-attr2.c: New file.
8380         * Makefile: Add rules to build and run tst-atfork2 test.
8381         * tst-atfork2.c: New file.
8382         * tst-atfork2mod.c: New file.
8384         * sysdeps/unix/sysv/linux/unregister-atfork.c
8385         (__unregister_atfork): Free the memory allocated for the handlers
8386         after removing them from the lists.
8388         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8389         cleanup function.
8391         * tst-atfork1.c (do_test): Wait for the child we forked.
8392         Report error in child.
8394         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8396         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8398 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8400         * Makefile (tests): Add tst-cancel8.
8401         * tst-cancel8.c: New file.
8403         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8404         clearing of control variable.
8405         * Makefile (tests): Add tst-once3 and tst-once4.
8406         * tst-once3.c: New file.
8407         * tst-once4.c: New file.
8409 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8411         * sysdeps/sh/Makefile: New file.
8412         * sysdeps/sh/bits/atomic.h: New file.
8413         * sysdeps/sh/pthread_spin_init.c: New file.
8414         * sysdeps/sh/pthread_spin_lock.c: New file.
8415         * sysdeps/sh/pthread_spin_trylock.S: New file.
8416         * sysdeps/sh/pthread_spin_unlock.S: New file.
8417         * sysdeps/sh/pthreaddef.h: New file.
8418         * sysdeps/sh/tcb-offsets.sym: New file.
8419         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8420         * sysdeps/sh/tls.h: New file.
8421         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8422         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8423         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8424         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8425         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8426         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8427         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8428         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8429         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8430         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8431         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8432         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8433         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8434         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8435         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8436         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8437         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8438         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8439         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8440         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8441         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8442         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8444         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8445         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8446         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8447         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8448         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8449         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8450         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8452 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8454         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8455         according to POSIX.
8457         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8459 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8461         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8462         (TLS_GET_FS): New #define.
8463         (TLS_SET_FS): New #define.
8464         Correct value of __NR_set_thread_area.
8466         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8468 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8470         * Makefile (tests): Add tst-popen1.
8471         * tst-popen1.c: New file.
8473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8474         but inactive generalization.
8475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8477         Minor optimization, remove one instruction.
8478         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8480 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8482         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8484 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8486         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8487         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8488         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8489         * sysdeps/pthread/pthread_cond_signal.c: New file.
8490         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8491         * sysdeps/pthread/pthread_cond_wait.c: New file.
8492         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8493         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8494         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8495         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8496         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8497         * sysdeps/s390/Makefile: New file.
8498         * sysdeps/s390/bits/atomic.h: New file.
8499         * sysdeps/s390/pthread_spin_init.c: New file.
8500         * sysdeps/s390/pthread_spin_lock.c: New file.
8501         * sysdeps/s390/pthread_spin_trylock.c: New file.
8502         * sysdeps/s390/pthread_spin_unlock.c: New file.
8503         * sysdeps/s390/pthreaddef.h: New file.
8504         * sysdeps/s390/tcb-offsets.sym: New file.
8505         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8506         * sysdeps/s390/tls.h: New file.
8507         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8508         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8509         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8510         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8511         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8512         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8513         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8514         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8515         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8516         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8517         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8518         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8519         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8520         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8521         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8522         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8523         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8524         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8525         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8526         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8527         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8528         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8529         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8531 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8533         * atomic.h: Add a couple more default implementations.
8534         (atomic_compare_and_exchange_acq): Use
8535         __arch_compare_and_exchange_32_acq in return value definition.  It
8536         always exists.
8537         (atomic_bit_set): Renamed from atomic_set_bit.
8538         Add missing atomic_ prefixes.
8540         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8541         thread library is available, use correct value to mark initialized
8542         once variable.
8544 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8546         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8547         __sysconf to determine pagesize.
8549         * pthread_create.c: Include <atomic.h>.
8550         * allocatestack.c (allocate_stack): Implement coloring of the
8551         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8552         size minus one.  Adjust users.
8553         * sysdeps/i386/i686/Makefile: New file.
8555 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8557         * allocatestack.c: Improve comment throughout the file.
8559         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8560         (__lll_lock_wait): Add branch prediction.
8561         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8562         (__lll_lock_wait): Likewise.
8563         (lll_unlock_wake_cb): Removed.
8565 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8567         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8568         _POSIX_THREAD_PRIORITY_SCHEDULING.
8570 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8572         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8573         Fix return type of ptr___pthread_getspecific.
8575 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8577         * Makefile (tests): Add tst-umask1.
8578         (tst-umask1-ARGS): Define.
8579         * tst-umask1.c: New file.
8581 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8583         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8584         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8585         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8586         pthread_rwlock_unlock.
8587         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8588         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8589         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8590         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8592         New file.
8593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8595         New file.
8596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8597         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8598         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8599         New file.
8600         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8601         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8602         New file.
8603         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8604         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8605         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8606         New file.
8607         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8608         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8609         New file.
8610         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8612         * Makefile (libpthread-routines): Remove lowlevelcond and
8613         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8614         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8615         and pthread_cond_broadcast.
8616         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8617         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8618         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8619         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8620         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8621         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8622         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8623         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8624         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8625         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8628         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8630         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8631         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8632         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8633         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8634         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8635         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8636         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8637         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8638         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8639         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8640         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8641         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8642         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8643         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8644         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8645         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8646         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8648         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8649         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8650         of the code is moved to ...
8651         * sysdeps/pthread/createthread.c: ...here.  New file.
8653 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8655         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8656         (__new_sem_post): Clear %eax before returning.
8657         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8659         * Makefile (tests): Add tst-cleanup2.
8660         * tst-cleanup2.c: New file.
8662         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8663         Interpret first parameter correctly.
8665 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8667         * Makefile (headers): Add bits/semaphore.h.
8669 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8671         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8672         if not SHARED.
8674 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8676         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8677         must be used and mapping failed.
8678         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8680         * Makefile (CFLAGS-pthread_self.os): Define this, not
8681         CFLAGS-pthread_self.c.
8683 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8685         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8686         lll_unlock_wake_cb.
8688         * Makefile (libpthread-routines): Add version.  Add rules to build
8689         version.os and banner.h.
8690         * version.c: New file.
8692 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8694         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8695         the alias unconditional.
8696         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8698 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8700         * Makefile (CFLAGS-pthread_self.c): New definition.
8702 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8704         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8705         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8706         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8707         * init.c (__pthread_initialize_minimal_internal): Likewise.
8709 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8711         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8713         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8714         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8715         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8716         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8717         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8718         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8720 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8722         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8723         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8724         * tst-cancel-wrappers.sh: Remove all exceptions.
8726 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8728         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8729         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8731         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8732         Use __libc_pthread_functions array if SHARED.
8734         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8735         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8737         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8738         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8739         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8740         __libc_ptf_call instead of __libc_maybe_call.
8741         (PTF): New #define.
8742         (__libc_cleanup_region_start): Wrap function name with PTF call.
8743         (__libc_cleanup_region_end): Likewise.
8744         (__libc_cleanup_end): Likewise.
8746         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8747         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8748         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8749         * pthreadP.h: Add prototypes.
8751         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8752         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8753         __pthread_rwlock_unlock aliases.
8754         * pthreadP.h: Add prototypes for new aliases.
8756         * pthreadP.h (struct pthead_functions): Moved to...
8757         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8758         * init.c (pthread_functions): Add initializers for new elements.
8760         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8761         __pthread_cleanup_pop_restore aliases.
8762         * pthreadP.h: Add prototypes.
8764         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8765         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8766         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8767         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8768         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8769         * pthreadP.h: Adjust prototypes and callers.
8771 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
8773         * Makefile (tests): Add tst-cancel7.
8774         (tst-cancel7-ARGS): New variable.
8775         * tst-cancel7.c: New file.
8777         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8778         around gcc defficiencies.
8779         * old_pthread_cond_signal.c: Likewise.
8780         * old_pthread_cond_timedwait.c: Likewise.
8781         * old_pthread_cond_wait.c: Likewise.
8783         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8785 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8787         * Makefile (tests): Add tst-cond7.
8788         * tst-cond7.c: New file.
8790         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8791         (condvar_cleanup): Get condvar address from the right place.
8793         * atomic.h: Correct definitions of atomic_full_barrier,
8794         atomic_read_barrier, atomic_write_barrier.
8796         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8797         race-free.
8798         * old_pthread_cond_signal.c: Likewise.
8799         * old_pthread_cond_timedwait.c: Likewise.
8800         * old_pthread_cond_wait.c: Likewise.
8802 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
8804         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8806 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8808         * pthreadP.h (pthread_cond_2_0_t): New type.
8809         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8810         Use new type for the 2.0 condvar function prototypes.
8811         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8812         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8813         parameter.
8814         * old_pthread_cond_destroy.c: Likewise.
8815         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
8816         * old_pthread_cond_signal.c: Likewise.
8817         * old_pthread_cond_timedwait.c: Likewise.
8818         * old_pthread_cond_wait.c: Likewise.
8820         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8821         (__pthread_cond_wait): Don't save cancellation mode and seq value
8822         in same location.
8824         * herrno.c (__h_errno_location): Don't define as weak.
8826 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8828         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8829         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8830         and pthread_cond_wait.
8831         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8832         Renamed to...
8833         (__pthread_cond_broadcast_2_0): ... this.
8834         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8835         Renamed to...
8836         (__pthread_cond_destroy_2_0): ... this.
8837         * old_pthread_cond_init.c (__old_pthread_cond_init):
8838         Renamed to...
8839         (__pthread_cond_init_2_0): ... this.
8840         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8841         Renamed to...
8842         (__pthread_cond_signal_2_0): ... this.
8843         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8844         Renamed to...
8845         (__pthread_cond_wait_2_0): ... this.
8846         * pthread_cond_destroy.c: Include shlib-compat.h.
8847         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8848         * pthread_cond_init.c: Include shlib-compat.h.
8849         (pthread_cond_init): Change strong_alias into versioned_symbol.
8850         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8851         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8852         fields.
8853         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8854         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8855         __pthread_cond_wait_2_0): New prototypes.
8856         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8857         __old_pthread_cond_init, __old_pthread_cond_signal,
8858         __old_pthread_cond_wait): Removed.
8859         * init.c: Include shlib-compat.h.
8860         (pthread_functions): Guard ptr___pthread_attr_init_2_0
8861         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8862         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8863         ptr___pthread_cond_*_2_0 fields.
8864         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8865         pthread_cond_*@GLIBC_2.0 compatibility symbols.
8867         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8868         LIBC_SIGACTION was not yet defined.
8869         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8870         [!defined LIBC_SIGACTION] (__sigaction): New function and
8871         libc_hidden_weak.
8872         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8873         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8875 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8877         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8879 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
8881         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8882         New, larger type definition.
8883         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8884         implementation.
8885         * Versions [libpthread]: Add definitions for new pthread_cond_*
8886         interfaces for version GLIBC_2.3.2.
8887         * pthread_cond_init.c: Update initialization for new type definition.
8888         * Makefile (libpthread-routines): Remove pthread_cond_wait,
8889         pthread_cond_timedwait, pthread_cond_signal, and
8890         pthread_cond_broadcast.  Add old_pthread_cond_init,
8891         old_pthread_cond_destroy, old_pthread_cond_wait,
8892         old_pthread_cond_timedwait, old_pthread_cond_signal, and
8893         old_pthread_cond_broadcast.
8894         * old_pthread_cond_broadcast.c: New file.
8895         * old_pthread_cond_destroy.c: New file.
8896         * old_pthread_cond_init.c: New file.
8897         * old_pthread_cond_signal.c: New file.
8898         * old_pthread_cond_timedwait.c: New file.
8899         * old_pthread_cond_wait.c: New file.
8900         * pthreadP.h: Add prototypes for the compatibility interfaces.
8902         * pthread_cond_destroy.c: Don't include <errno.h>.
8904 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
8906         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8907         unnecessary zero offset when addressing MUTEX.
8909 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8911         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8912         __register_atfork.
8913         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8914         for __register_atfork.
8916 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8918         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8919         instead of ASSEMBLER test macro.
8921         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8922         __libc_current_sigrtmax): Add libc_hidden_def.
8924         * sysdeps/pthread/list.h: Remove assert.h include.
8926 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8928         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8929         __pthread_initialize_minimal_internal not
8930         __pthread_initialize_minimal.
8932 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
8934         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8935         __pthread_initialize_minimal as hidden.
8937         * init.c (__pthread_initialize_minimal_internal): Don't mark as
8938         constructor.
8940 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8942         * Makefile ($(inst_libdir)/libpthread.so): Depend on
8943         $(common-objpfx)format.lds, include that into the output script.
8944         Fix comment.
8945         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8947 2002-12-28  Andreas Jaeger  <aj@suse.de>
8949         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8950         nsec resolution changes.
8951         (xstat64_conv): Likewise.
8952         (xstat32_conv): Likewise.
8953         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8954         struct kernel_stat.
8955         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
8956         structs stat and stat64.
8957         * time/time.h (__timespec_defined): Define for __USE_MISC.
8958         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8960 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
8962         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
8963         argument.
8964         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
8965         (pthread_exit): Use strong_alias to avoid warnings.
8966         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
8967         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
8968         ptr___pthread_attr_init_2_*.
8969         * init.c (pthread_functions): Adjust.
8971 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
8973         * forward.c: Make all functions available by default again.  It
8974         caused too much trouble.
8976         * pt-siglongjmp.c: Removed.
8978 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
8980         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
8981         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
8982         * sysdeps/i386/Makefile: New file.
8983         * sysdeps/i386/tcb-offsets.sym: New file.
8984         * sysdeps/pthread/tcb-offsets.h: New file.
8985         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8986         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
8988         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
8989         __register_atfork...
8990         (GLIBC_2.3.2): ...here.
8992 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
8994         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
8995         pthread_attr_setstackaddr with __attribute_deprecated__.
8997 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
8999         * pt-system.c (system): Remove cancellation handling.
9000         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9001         cancellation routines.
9003 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9005         * descr.h: Include <dl-sysdep.h>.
9006         (struct pthread): Move header.data.list to the back of the struct.
9007         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9008         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9009         (SYSINFO_OFFSEET): Likewise.
9011 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9013         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9014         Define.
9015         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9016         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9017         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9018         (USE_DL_SYSINFO): Undef.
9020 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9022         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9023         $(common-objpfx)libc.so.
9024         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9025         it is bigger than pipe buffer size even on arches with bigger
9026         page size.
9027         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9029 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9031         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9032         correct errno access for case that USE___THREAD is not defined.
9034 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9036         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9037         Patch by Marijn Ros <marijn@mad.scientist.com>.
9039 2002-12-22  Roland McGrath  <roland@redhat.com>
9041         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9043 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9045         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9047 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9049         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9050         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9051         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9053         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9054         of int $0x80.
9055         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9056         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9057         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9058         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9059         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9060         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9061         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9062         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9064         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9065         sysenter.
9066         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9068         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9070         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9071         in new TCB.
9072         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9073         that sysinfo is properly initialized.
9074         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9075         to 1 only for ld.so.
9077         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9078         RTLD_CORRECT_DYNAMIC_WEAK.
9080 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9082         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9083         Use return 0 as 6th argument to FORWARD4.
9084         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9086 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9088         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9089         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9090         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9091         (INIT_SYSINFO): New #define.
9092         (TLS_TP_INIT): Use INIT_SYSINFO.
9093         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9094         At test to make sure SYSINFO_OFFSET value is correct.
9095         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9097 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9099         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9100         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9101         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9102         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9103         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9104         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9105         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9107 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9109         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9110         macro instead of using int $0x80 directly.
9112         * sysdeps/pthread/bits/stdio-lock.h: New file.
9113         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9114         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9115         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9116         * Makefile (routines): Add libc-lowlevelmutex.
9118         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9119         __i686.get_pc_thunk.dx.
9121 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9123         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9124         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9125         ($(objpfx)tst-cancel-wrappers.out): New rule.
9126         * tst-cancel-wrappers.sh: New test.
9127         * tst-locale1.c: Include signal.h.
9128         (uselocale): Test static linking of __libc_current_sigrt*.
9130 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9132         * Makefile (tests): Add tst-cancel6.
9133         * tst-cancel6.c: New file
9135 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9137         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9138         Define meaningfully for assembler as well.
9139         * pthreadP.h (struct pthread_functions): Remove
9140         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9141         and ptr_pthread_attr_init_2_1 fields.
9142         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9143         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9144         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9145         (FORWARD3): Define using FORWARD4.
9146         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9147         versions.
9148         * pt-system.c: Remove duplicate stdlib.h include.
9150 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9152         * sem_init.c: Define sem_init@GLIBC_2.0.
9153         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9154         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9156         * flockfile.c: Moved to...
9157         * sysdeps/pthread/flockfile.c: ...here.  New file.
9158         * funlockfile.c: Moved to...
9159         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9160         * ftrylockfile.c: Moved to...
9161         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9163 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9165         * libc-cancellation.c: Guard both function with
9166         #if !defined NOT_IN_libc.
9167         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9168         automatically provided pthread wrappers.
9169         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9170         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9171         nor in libpthread.
9172         * pt-open.c: Removed.
9173         * pt-fcntl.c: Removed.
9174         * pt-fsync.c: Removed.
9175         * pt-lseek.c: Removed.
9176         * pt-msgrcv.c: Removed.
9177         * pt-msgsnd.c: Removed.
9178         * pt-msync.c: Removed.
9179         * pt-nanosleep.c: Removed.
9180         * pt-open64.c: Removed.
9181         * pt-pause.c: Removed.
9182         * pt-pread.c: Removed.
9183         * pt-pread64.c: Removed.
9184         * pt-pwrite.c: Removed.
9185         * pt-pwrite64.c: Removed.
9186         * pt-read.c: Removed.
9187         * pt-recv.c: Removed.
9188         * pt-recvfrom.c: Removed.
9189         * pt-recvmsg.c: Removed.
9190         * pt-send.c: Removed.
9191         * pt-sendto.c: Removed.
9192         * pt-sigtimedwait.c: Removed.
9193         * pt-sigwait.c: Removed.
9194         * pt-wait.c: Removed.
9195         * pt-waitpid.c: Removed.
9196         * pt-write.c: Removed.
9197         * pt-accept.c: Removed.
9198         * pt-close.c: Removed.
9199         * pt-connect.c: Removed.
9200         * pt-lseek64.c: Removed.
9201         * pt-sendmsg.c: Removed.
9202         * pt-tcdrain.c: Removed.
9204 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9206         * init.c (__pthread_initialize_minimal_internal): Renamed from
9207         __pthread_initialize_minimal.  Make old name an alias.  This
9208         converts a normal relocation into a relative relocation.
9210         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9212         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9213         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9214         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9215         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9216         pt-sigwaitinfo, pt-waitid, and pt-writev.
9217         * pt-creat.c: Removed.
9218         * pt-poll.c: Removed.
9219         * pt-pselect.c: Removed.
9220         * pt-readv.c: Removed.
9221         * pt-select.c: Removed.
9222         * pt-sigpause.c: Removed.
9223         * pt-sigsuspend.c: Removed.
9224         * pt-sigwaitinfo.c: Removed.
9225         * pt-waitid.c: Removed.
9226         * pt-writev.c: Removed.
9228         * init.c (pthread_functions): New variable.
9229         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9230         (or NULL) to __libc_pthread_init.
9231         * forward.c: Rewrite to use __libc:pthread_functions array to get
9232         function addresses.
9233         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9234         prototype.
9235         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9236         Take new parameter.  Copy content of variable pointed to by it
9237         to __libc_pthread_init.
9239         * pthreadP.h (struct pthread_functions): New type.
9240         (__libc_pthread_init): Declare.
9242         * pthread_attr_destroy.c: Add namespace protected alias.
9243         * pthread_attr_getdetachstate.c: Likewise.
9244         * pthread_attr_getinheritsched.c: Likewise.
9245         * pthread_attr_getschedparam.c: Likewise.
9246         * pthread_attr_getschedpolicy.c: Likewise.
9247         * pthread_attr_getscope.c: Likewise.
9248         * pthread_attr_setdetachstate.c: Likewise.
9249         * pthread_attr_setinheritsched.c: Likewise.
9250         * pthread_attr_setschedparam.c: Likewise.
9251         * pthread_attr_setschedpolicy.c: Likewise.
9252         * pthread_attr_setscope.c: Likewise.
9253         * pthread_cond_broadcast.c: Likewise.
9254         * pthread_cond_destroy.c: Likewise.
9255         * pthread_cond_init.c: Likewise.
9256         * pthread_cond_signal.c: Likewise.
9257         * pthread_cond_wait.c: Likewise.
9258         * pthread_condattr_destroy.c: Likewise.
9259         * pthread_condattr_init.c: Likewise.
9260         * pthread_equal.c: Likewise.
9261         * pthread_exit.c: Likewise.
9262         * pthread_getschedparam.c: Likewise.
9263         * pthread_self.c: Likewise.
9264         * pthread_setcancelstate.c: Likewise.
9265         * pthread_setschedparam.c: Likewise.
9266         * pthread_mutex_destroy.c: Likewise.
9267         * pthread_mutex_init.c: Likewise.
9268         * pthreadP.h: Add prototypes for the aliases.
9270         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9271         multiple_threads member in correct TCB to 1.
9273         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9274         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9275         member of thread decriptor, otherwise return unconditionally 1.
9277 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9279         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9280         regular Linux version.  Remove file.
9281         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9282         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9283         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9284         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9285         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9286         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9287         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9288         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9289         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9290         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9291         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9292         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9293         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9294         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9295         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9296         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9297         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9298         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9299         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9300         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9301         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9302         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9303         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9304         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9305         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9306         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9307         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9308         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9309         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9310         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9312 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9314         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9315         * sysdeps/unix/sysv/linux/open.c: Removed.
9316         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9317         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9318         * sysdeps/unix/sysv/linux/msync.c: Removed.
9319         * sysdeps/unix/sysv/linux/read.c: Removed.
9320         * sysdeps/unix/sysv/linux/close.c: Removed.
9321         * sysdeps/unix/sysv/linux/creat.c: Removed.
9322         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9323         * sysdeps/unix/sysv/linux/pause.c: Removed.
9324         * sysdeps/unix/sysv/linux/select.c: Removed.
9325         * sysdeps/unix/sysv/linux/write.c: Removed.
9327 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9329         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9330         element in TCB to see whether locking is needed.
9332         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9333         MULTIPLE_THREADS_OFFSET value is correct.
9335         * sysdeps/unix/sysv/linux/close.c: New file.
9336         * sysdeps/unix/sysv/linux/connect.S: New file.
9337         * sysdeps/unix/sysv/linux/creat.c: New file.
9338         * sysdeps/unix/sysv/linux/fsync.c: New file.
9339         * sysdeps/unix/sysv/linux/llseek.c: New file.
9340         * sysdeps/unix/sysv/linux/lseek.c: New file.
9341         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9342         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9343         * sysdeps/unix/sysv/linux/msync.c: New file.
9344         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9345         * sysdeps/unix/sysv/linux/open.c: New file.
9346         * sysdeps/unix/sysv/linux/open64.c: New file.
9347         * sysdeps/unix/sysv/linux/pause.c: New file.
9348         * sysdeps/unix/sysv/linux/poll.c: New file.
9349         * sysdeps/unix/sysv/linux/pread.c: New file.
9350         * sysdeps/unix/sysv/linux/pread64.c: New file.
9351         * sysdeps/unix/sysv/linux/pselect.c: New file.
9352         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9353         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9354         * sysdeps/unix/sysv/linux/readv.c: New file.
9355         * sysdeps/unix/sysv/linux/recv.S: New file.
9356         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9357         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9358         * sysdeps/unix/sysv/linux/select.c: New file.
9359         * sysdeps/unix/sysv/linux/send.S: New file.
9360         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9361         * sysdeps/unix/sysv/linux/sendto.S: New file.
9362         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9363         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9364         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9365         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9366         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9367         * sysdeps/unix/sysv/linux/system.c: New file.
9368         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9369         * sysdeps/unix/sysv/linux/wait.c: New file.
9370         * sysdeps/unix/sysv/linux/waitid.c: New file.
9371         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9372         * sysdeps/unix/sysv/linux/writev.c: New file.
9373         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9375         * pt-readv.c: Fix comment.
9377 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9379         * tst-cleanup1.c: Include stdlib.h.
9381         * tst-cancel5.c: New test.
9382         * Makefile (tests): Add tst-cancel5.
9383         (tst-cancel5): Link against libc.so libpthread.so in that order.
9385 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9387         * forward.c (test_loaded): Prevent recursive calls.
9389         * Makefile (routines): Add libc-cancellation.
9390         * libc-cancellation.c: New file.
9391         * descr.h (struct pthread): Add multiple_threads field.
9392         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9393         new thread descriptor to 1.
9394         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9395         Initialize multiple_thread field after successful thread creation.
9396         * cancellation.c (__do_cancel): Move to pthreadP.h.
9397         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9398         (__pthread_disable_asynccancel): Add internal_function attribute.
9399         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9400         * pthread_setcancelstate.c: Likewise.
9401         * pthread_setcanceltype.c: Likewise.
9402         * pthread_exit.c: Likewise.
9403         * pthreadP.h (CANCELLATION_P): Likewise.
9404         (__do_cancel): Define as static inline.
9405         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9406         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9407         declarations.
9408         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9409         fields.  Define MULTIPLE_THREADS_OFFSET.
9410         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9411         declaration.
9412         * sysdeps/unix/sysv/linux/accept.S: New file.
9413         * sysdeps/unix/sysv/linux/read.c: New file.
9414         * sysdeps/unix/sysv/linux/write.c: New file.
9415         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9416         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9417         initialization of __libc_locking_needed.
9418         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9419         __libc_locking_needed, use multiple_threads field in TCB.
9420         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9422 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9424         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9425         version.
9426         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9428         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9429         access to __libc_locking_needed for PIC.
9431 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9433         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9434         declare for libc.so.
9435         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9436         expression.
9437         (__libc_lock_lock): Put into statement expression.
9438         (__libc_lock_unlock): Remove trailing semicolon.
9439         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9441 2002-12-12  Roland McGrath  <roland@redhat.com>
9443         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9444         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9446 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9448         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9449         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9450         Initialize __libc_locking_needed.
9451         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9452         instead of __register_pthread_fork_handler.
9453         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9454         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9455         fork-gen with libc_pthread_init.
9456         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9457         of __register_pthread_fork_handler.
9458         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9459         of __register_pthread_fork_handler.
9460         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9461         __libc_locking_needed to determine whether lock prefix can be avoided.
9462         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9464 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9466         * Makefile (tests): Add tst-cleanup1.
9467         * tst-cleanup1.c: New file.
9468         * cancellation.c (__cleanup_thread): Removed.
9469         (__do_cancel): Remove call to __cleanup_thread.
9470         * pthreadP.h: Remove __cleanup_thread prorotype.
9472         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9473         Remember function and argument even if cancellation handler
9474         function is not available.
9475         (__libc_cleanup_region_end): Execute registered function directly if
9476         pthread functions are not available.
9477         (__libc_cleanup_end): Likewise.
9479         * init.c (__pthread_initialize_minimal): Fix initialization in
9480         static lib by preventing gcc from being too clever.
9482 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9484         * init.c (__pthread_initialize_minimal): Remove unneccesary
9485         sigaddset call.
9487         * Makefile (tests): We can run tst-locale2 now.
9489 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9491         * Versions: Remove duplicated sigwait entry.
9493 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9495         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9496         inside libpthread.
9498         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9500         * pthreadP.h: Declare __pthread_enable_asynccancel and
9501         __pthread_disable_asynccancel.
9502         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9503         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9504         * cancellation.c (__pthread_enable_asynccancel): New function.
9505         (__pthread_disable_asynccancel): New function.
9506         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9507         * pt-close.c: Likewise.
9508         * pt-connect.c: Likewise.
9509         * pt-creat.c: Likewise.
9510         * pt-fcntl.c: Likewise.
9511         * pt-fsync.c: Likewise.
9512         * pt-lseek.c: Likewise.
9513         * pt-lseek64.c: Likewise.
9514         * pt-msgrcv.c: Likewise.
9515         * pt-msgsnd.c: Likewise.
9516         * pt-msync.c: Likewise.
9517         * pt-nanosleep.c: Likewise.
9518         * pt-open.c: Likewise.
9519         * pt-open64.c: Likewise.
9520         * pt-pause.c: Likewise.
9521         * pt-poll.c: Likewise.
9522         * pt-pread.c: Likewise.
9523         * pt-pread64.c: Likewise.
9524         * pt-pselect.c: Likewise.
9525         * pt-pwrite.c: Likewise.
9526         * pt-pwrite64.c: Likewise.
9527         * pt-read.c: Likewise.
9528         * pt-readv.c: Likewise.
9529         * pt-recv.c: Likewise.
9530         * pt-recvfrom.c: Likewise.
9531         * pt-recvmsg.c: Likewise.
9532         * pt-select.c: Likewise.
9533         * pt-send.c: Likewise.
9534         * pt-sendmsg.c: Likewise.
9535         * pt-sendto.c: Likewise.
9536         * pt-sigpause.c: Likewise.
9537         * pt-sigsuspend.c: Likewise.
9538         * pt-sigtimedwait.c: Likewise.
9539         * pt-sigwait.c: Likewise.
9540         * pt-sigwaitinfo.c: Likewise.
9541         * pt-system.c: Likewise.
9542         * pt-tcdrain.c: Likewise.
9543         * pt-wait.c: Likewise.
9544         * pt-waitid.c: Likewise.
9545         * pt-waitpid.c: Likewise.
9546         * pt-write.c: Likewise.
9547         * pt-writev.c: Likewise.
9548         * pthread_join.c: Likewise.
9549         * pthread_timedjoin.c: Likewise.
9551         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9552         (__xpg_sigpause): New function.
9553         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9555 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9557         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9559         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9560         _GI_pthread_cleanup_pop to pthreadP.h.
9562         * ftrylockfile.c: Use _IO_lock_trylock instead of
9563         pthread_mutex_trylock.
9565         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9566         (CANCEL_RESET): Likewise.
9567         (__pthread_setcanceltype_): Declare.
9568         (__pthread_mutex_lock_internal): Declare.
9569         (__pthread_mutex_unlock_internal): Declare.
9570         (__pthread_once_internal): Declare.
9571         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9572         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9574         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9575         and pthread_mutex_unlock.
9576         * pthread_cond_wait.c: Likewise.
9577         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9578         * pthread_mutex_unlock.c: Likewise.
9580         * pthread_setcanceltype.c: Add additional alias
9581         __pthread_setcanceltype.
9583         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9584         * sem_open.c (sem_open): Likewise.
9585         Use __libc_open, __libc_write, and __libc_close instead of
9586         open, write, and close respectively.
9588         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9589         Rewrite as statement expression since it must return a value.
9591         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9592         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9593         __pthread_kill.
9595         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9596         alias __pthread_once_internal.
9598         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9600 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9602         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9603         * tst-stdio1.c: New file.
9604         * tst-stdio2.c: New file.
9606         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9608         * Makefile (tests): Comment out tst-locale2 for now.
9609         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9611         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9612         -D_IO_MTSAFE_IO.
9613         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9614         Use _IO_lock_init instead of explicit assignment.
9616         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9617         Define __libc_lock_* and __libc_lock_recursive macros with
9618         lowlevellock macros, not pthread mutexes.
9620         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9621         of pthread_mutex_lock.
9622         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9623         instead of pthread_mutex_unlock.
9625 2002-12-06  Roland McGrath  <roland@redhat.com>
9627         * allocatestack.c (__stack_user): Use uninitialized defn.
9628         * init.c (__pthread_initialize_minimal): Initialize it here.
9630 2002-12-05  Roland McGrath  <roland@redhat.com>
9632         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9633         string.
9634         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9636         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9637         missing & here too.
9639 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9641         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9642         lowlevellock.
9643         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9644         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9645         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9646         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9647         for __libc_lock_* macros.
9648         * Makefile (routines): Add libc-lowlevellock.
9650 2002-10-09  Roland McGrath  <roland@redhat.com>
9652         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9653         Under [__PIC__], call the function via the pointer fetched for
9654         comparison rather than a call by name that uses the PLT.
9655         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9656         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9657         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9658         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9659         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9661 2002-12-04  Roland McGrath  <roland@redhat.com>
9663         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9665         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9666         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9668         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9670 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9672         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9673         a completely opaque, non-integer type.
9674         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9676 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9678         * sysdeps/i386/tls.h: Include stdlib.h.
9679         * sysdeps/x86_64/tls.h: Likewise.
9681 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9683         * Makefile (tests): Add tst-locale2.
9684         (tests-static): Likewise.
9685         * tst-locale2.c: New file.
9687         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9688         volatile and add memory clobbers to lock operations.
9690 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9692         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9693         * sysdeps/i386/i486/bits/atomic.h: New file.
9694         * sysdeps/i386/i586/bits/atomic.h: New file.
9695         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9696         include i486 version.
9697         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9698         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9699         Patch by Marijn Ros <marijn@mad.scientist.com>.
9701         * allocatestack.c (get_cached_stack): Don't crash if we first
9702         found a stack with a larger size then needed.
9703         Reported by Hui Huang <hui.huang@sun.com>.
9705         * Makefile (tests): Add tst-sysconf.
9706         * tst-sysconf.c: New file.
9708         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9709         PTHREAD_THREADS_MAX.
9711 2002-12-02  Roland McGrath  <roland@redhat.com>
9713         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9714         Declare using hidden_proto instead of attribute_hidden, so there are
9715         non-.hidden static symbols for gdb to find.
9716         (__pthread_keys): Likewise.
9717         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9718         * allocatestack.c (__stack_user): Likewise.
9719         * pthread_create.c (__pthread_keys): Likewise.
9720         (__nptl_threads_events, __nptl_last_event): Make these static instead
9721         of hidden.
9722         * pthread_key_create.c (__pthread_pthread_keys_max,
9723         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9725 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9727         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9728         statically.
9729         * tst-locale1.c: New file.
9731         * pthread_cond_timedwait.c: Include <stdlib.h>.
9733         * Makefile (tests): Add tst-fork2 and tst-fork3.
9734         * tst-fork2.c: New file.
9735         * tst-fork3.c: New file.
9737 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9739         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9741         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9742         require it to 200112L.
9744         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9745         instruction only if HAVE_CMOV is defined.
9746         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9748         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9750         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9752         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9754         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9756 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9758         * sysdeps/x86_64/bits/atomic.h: New file.
9760         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9761         16-bit operations.
9763         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9764         possible since gettid cannot fail.
9766         * sysdeps/x86_64/pthreaddef.h: New file.
9768         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9770         * sysdeps/x86_64/pthread_spin_init.c: New file.
9771         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9772         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9773         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9775         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9776         Add missing lock prefix.  Minute optimization.
9778         * tst-spin2.c (main): Also check successful trylock call.
9780         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9781         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
9783         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9784         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
9786         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
9787         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9788         value in case of an error.  Add support for INTERNAL_SYSCALL.
9790         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9791         value in case of an error.
9793         * sysdeps/x86_64/tls.h: New file.
9795 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9797         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
9798         takes the array member name and the index as parameters.
9799         (THREAD_SETMEM_NC): Likewise.
9800         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9801         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9802         interfaces.
9804         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9805         to decide which code to use.
9806         (THREAD_SETMEM_NC): Likewise.
9808         * allocatestack.c (queue_stack): Don't remove stack from list here.
9809         Do it in the caller.  Correct condition to prematurely terminate
9810         loop to free stacks.
9811         (__deallocate_stack): Remove stack from list here.
9813 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9815         * Makefile (tests): Add tst-stack1.
9816         * tst-stack1.c: New file.
9818         * allocatestack.c (allocate_stack): Initialize the TCB on a user
9819         provided stack.
9821         * pthread_attr_getstack.c: Return bottom of the thread area.
9823 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
9825         * Makefile (libpthread-routines): Add pt-allocrtsig and
9826         pthread_kill_other_threads.
9827         * pt-allocrtsig.c: New file.
9828         * pthread_kill_other_threads.c: New file.
9829         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9830         all three functions.
9831         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9832         allocrtsig.
9833         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9834         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9835         and __libc_allocate_rtsig_private.
9836         * Versions (libpthread): Export pthread_kill_other_threads_np,
9837         __libc_current_sigrtmin, and __libc_current_sigrtmax.
9839 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
9841         * allocatestack.c (allocate_stack): stackaddr in attribute points to
9842         the end of the stack.  Adjust computations.
9843         When mprotect call fails dequeue stack and free it.
9844         * pthread_attr_setstack.c: Store top of the stack in stackaddr
9845         attribute.
9846         * pthread_getattr_np.c: Likewise.
9848         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9849         surprises.
9851 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
9853         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9854         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9856 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
9858         * pthread_getspecific.c: Optimize access to first 2nd-level array.
9859         * pthread_setspecific.c: Likewise.
9861 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
9863         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9864         definitions.  Get them from the official place.
9865         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9867         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9868         Use new CLONE_ flags in clone() calls.
9870         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9871         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9873         * Versions: Add pthread_* functions for libc.
9874         * forward.c: New file.
9876         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9877         errno-loc.
9878         * herrno.c: New file.
9879         * res.c: New file.
9881         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9882         sem_trywait, and sem_timedwait.  Add herrno and res.
9883         * sem_init.c: Don't initialize lock and waiters members.
9884         * sem_open.c: Likewise.
9885         * sem_post.c: Removed.
9886         * sem_wait.c: Removed.
9887         * sem_trywait.c: Removed.
9888         * sem_timedwait.c: Removed.
9889         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9890         Includes full implementations of sem_post, sem_wait, sem_trywait,
9891         and sem_timedwait.
9892         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9893         for new implementation.
9894         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9895         and waiters fields.
9897         * tst-sem3.c: Improve error message.
9898         * tst-signal3.c: Likewise.
9900         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9901         to tell the kernel about the termination futex and to initialize tid
9902         member.  Don't initialize main_thread.
9903         * descr.h (struct pthread): Remove main_thread member.
9904         * cancelllation.c (__do_cancel): Remove code handling main thread.
9905         The main thread is not special anymore.
9907         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
9908         size of the stacks to stack_cache_actsize.
9910         * pt-readv.c: Add missing "defined".
9911         * pt-sigwait.c: Likewise.
9912         * pt-writev.c: Likewise.
9914 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
9916         * Versions: Export __connect from libpthread.
9917         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9919         * Makefile (libpthread-routines): Add pt-raise.
9920         * sysdeps/unix/sysv/linux/raise.c: New file.
9921         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9922         * sysdeps/generic/pt-raise.c: New file.
9924         * pthread_cond_init.c: Initialize all data elements of the condvar
9925         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9927         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9928         * pthread_create.c: Likewise.
9930         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9931         * tst-key1.c: New file.
9932         * tst-key2.c: New file.
9933         * tst-key3.c: New file.
9935         * Versions: Export pthread_detach for version GLIBC_2.0.
9936         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9938 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
9940         * pthread_key_create.c: Terminate search after an unused key was found.
9941         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9943         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9944         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9946 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
9948         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9949         dynamic lookup for errno in PIC.
9951         * allocatestack.c (get_cached_stack): Rearrange code slightly to
9952         release the stack lock as soon as possible.
9953         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9954         the static TLS block.
9955         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
9957         * cancellation.c: Renamed from cancelation.c.
9958         * Makefile: Adjust accordingly.
9959         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
9960         * cleanup_defer.c: Use CANCELLATION_P.
9961         * pthread_testcancel.c: Likewise.
9962         * descr.h: Fix spelling in comments.
9963         * init.c: Likewise.
9964         * pthread_getattr_np.c: Likewise.
9965         * pthread_getschedparam.c: Likewise.
9966         * pthread_setschedparam.c: Likewise.
9967         * Versions: Likewise.
9969         * pt-pselect.c: New file.
9970         * Makefile (libpthread-routines): Add pt-pselect.
9971         * Versions: Add pselect.
9973         * tst-cancel4.c: New file.
9974         * Makefile (tests): Add tst-cancel4.
9976 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
9978         * pthread_mutex_lock.c: Always record lock ownership.
9979         * pthread_mutex_timedlock.c: Likewise.
9980         * pthread_mutex_trylock.c: Likewise.
9982         * pt-readv.c: New file.
9983         * pt-writev.c: New file.
9984         * pt-creat.c: New file.
9985         * pt-msgrcv.c: New file.
9986         * pt-msgsnd.c: New file.
9987         * pt-poll.c: New file.
9988         * pt-select.c: New file.
9989         * pt-sigpause.c: New file.
9990         * pt-sigsuspend.c: New file.
9991         * pt-sigwait.c: New file.
9992         * pt-sigwaitinfo.c: New file.
9993         * pt-waitid.c: New file.
9994         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
9995         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
9996         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
9997         * Versions: Add all the new functions.
9999         * tst-exit1.c: New file.
10000         * Makefile (tests): Add tst-exit1.
10002         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10004 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10006         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10008         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10009         call.  pthread_join is an official cancellation point.
10010         * pthread_timedjoin.c: Likewise.
10012         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10013         and the condvar's mutex are retrieved.
10014         * pthread_cond_timedwait.c: Likewise.
10015         Reported by dice@saros.East.Sun.COM.
10017 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10019         * pthreadP.h: Cut out all type definitions and move them...
10020         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10021         * pthreadP.h: Include <internaltypes.h>.
10023         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10024         performance tweaks.
10026         * sem_trywait.c: Shuffle #includes around to get right order.
10027         * sem_timedwait.c: Likewise.
10028         * sem_post.c: Likewise.
10029         * sem_wait.c: Likewise.
10031         * nptl 0.3 released.
10033         * Makefile (tests): Add tst-signal3.
10034         * tst-signal3.c: New file.
10036 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10038         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10039         the asms modify the sem object.
10040         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10042         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10043         the actual members.
10044         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10045         * semaphoreP.h: Include pthreadP.h.
10046         * sem_getvalue.c: Adjust to sem_t change.
10047         * sem_init.c: Likewise.
10048         * sem_open.c: Likewise.
10049         * sem_post.c: Likewise.
10050         * sem_timedwait.c: Likewise.
10051         * sem_trywait.c: Likewise.
10052         * sem_wait.c: Likewise.
10054 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10056         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10057         * tst-basic2.c: New file.
10058         * tst-exec1.c: New file.
10059         * tst-exec2.c: New file.
10060         * tst-exec3.c: New file.
10062         * tst-fork1.c: Remove extra */.
10064         * nptl 0.2 released.  The API for IA-32 is complete.