* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
[glibc.git] / nptl / ChangeLog
blob43d97f687ebfcaa846e06e91bca2c557cba34dc9
1 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
3         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
4         __lll_robust_unlock): Rewrite as macros instead of inline functions.
5         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
6         __lll_robust_unlock, __lll_wait_tid): Likewise.
8 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
10         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
11         Fix a pasto.
12         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
13         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
14         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
15         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
16         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
17         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
18         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
19         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
20         kernel-features.h.
21         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
22         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
23         process private.  Switch DW_CFA_advance_loc1 and some
24         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
25         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
26         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
27         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
28         process private.  Switch DW_CFA_advance_loc{1,2} and some
29         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
30         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
31         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
32         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
33         Likewise.
34         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
35         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
36         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
37         Likewise.
38         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
39         (__pthread_cond_broadcast): Compare %r8 instead of
40         dep_mutex-cond_*(%rdi) with $-1.
41         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
42         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
43         of oring.
45 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
47         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
49 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
51         * allocatestack.c: Include kernel-features.h.
52         * pthread_create.c: Likewise.
53         * pthread_mutex_init.c: Likewise.
54         * init.c: Likewise.
55         * pthread_cond_timedwait.c: Likewise.
56         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
57         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
58         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
59         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
60         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
61         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
62         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
63         Likewise.
64         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
65         Likewise.
66         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
67         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
68         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
69         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
71 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
73         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
74         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
75         byte elements.  One of them is the new __shared element.
76         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
77         adjust names of other padding elements.
78         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
79         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
80         byte elements.  One of them is the new __shared element.
81         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
82         adjust names of other padding elements.
83         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
84         Renamed __pad1 element to __shared, adjust names of other padding
85         elements.
86         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
87         (pthread_rwlock_t): Likewise.
88         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
89         typo.
91 2007-08-09  Anton Blanchard  <anton@samba.org>
93         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
95 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
97         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
98         <kernel-features.h>.
99         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
101 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
103         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
104         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
105         dealing with robust mutexes.
106         * pthread_mutex_timedlock.c: Likewise.
107         * pthread_mutex_trylock.c: Likewise.
108         * pthread_mutex_unlock.c: Likewise.
109         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
111 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
113         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
114         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
115         (PTHREAD_MUTEX_PSHARED): Define.
116         * pthread_mutex_init.c (__pthread_mutex_init): Set
117         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
118         mutexes.
119         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
120         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
121         as second argument to lll_lock.
122         (LLL_MUTEX_TRYLOCK): Take mutex as argument
123         instead of its __data.__lock field.
124         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
125         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
126         to lll_robust_lock.
127         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
128         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
129         instead of mutex->__data.__kind directly, pass
130         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
131         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
132         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
133         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
134         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
135         to lll_timedlock, lll_robust_timedlock, lll_unlock and
136         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
137         of mutex->__data.__kind directly.
138         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
139         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
140         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
141         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
142         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
143         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
144         and lll_futex_wake.
145         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
146         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
147         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
148         directly.
149         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
150         Take mutex as argument instead of its __data.__lock field, pass
151         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
152         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
153         __data.__lock field.
154         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
155         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
156         to lll_robust_cond_lock.
157         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
158         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
159         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
160         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
161         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
162         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
163         lll_futex_wait.
164         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
165         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
166         lll_futex_wake.
167         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
168         pshared variable, pass it to lll_lock, lll_unlock,
169         lll_futex_timedwait and lll_futex_wake.
170         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
171         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
172         and lll_futex_wake.
173         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
174         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
175         macro.
176         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
177         lll_futex_wake_unlock): Likewise.
178         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
179         Likewise.
180         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
181         lll_futex_wake_unlock): Likewise.
182         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
183         Likewise.
184         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
185         lll_futex_wake_unlock): Likewise.
186         (lll_futex_wake): Fix a typo.
187         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
189         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
190         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
191         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
193         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
194         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
196         (__pthread_cond_timedwait): Likewise.
197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
198         (__condvar_cleanup, __pthread_cond_wait): Likewise.
200 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
202         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
203         Don't use CGOTSETUP and CGOTRESTORE macros.
204         (CGOTSETUP, CGOTRESTORE): Remove.
205         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
206         @local symbol.
208 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
210         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
211         definitions for private futexes.
212         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
213         kernel-features.h and lowlevellock.h.  Use private futexes if
214         they are available.
215         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
216         (__lll_mutex_lock_wait): Rename to
217         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
218         (__lll_mutex_timedlock_wait): Rename to ...
219         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
220         Don't compile in for libc.so.
221         (__lll_mutex_unlock_wake): Rename to ...
222         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
223         (__lll_timedwait_tid): Use __NR_gettimeofday.
224         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
225         the header from assembler.  Renamed all lll_mutex_* resp.
226         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
227         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
228         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
229         Define.
230         (__lll_lock_wait_private): Add prototype.
231         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
232         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
233         __lll_unlock_wake): Likewise.
234         (lll_lock): Add private argument.  Call __lll_lock_wait_private
235         if private is constant LLL_PRIVATE.
236         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
237         lll_timedlock, lll_robust_timedlock): Add private argument.
238         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
239         if private is constant LLL_PRIVATE.
240         (lll_robust_unlock, lll_robust_dead): Add private argument.
241         (lll_lock_t): Remove.
242         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
243         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
244         lll_cond_wake, lll_cond_broadcast): Remove.
245         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
246         kernel-features.h and lowlevellock.h.
247         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
248         (LOAD_FUTEX_WAIT): Define.
249         (__lll_robust_mutex_lock_wait): Rename to ...
250         (__lll_robust_lock_wait): ... this.  Add private argument.
251         Use LOAD_FUTEX_WAIT macro.
252         (__lll_robust_mutex_timedlock_wait): Rename to ...
253         (__lll_robust_timedlock_wait): ... this.    Add private argument.
254         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
255         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
256         lowlevellock.h.
257         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
258         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
259         __lll_mutex_{lock,unlock}_*.
260         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
261         lowlevellock.h and pthread-errnos.h.
262         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
263         FUTEX_CMP_REQUEUE, EINVAL): Remove.
264         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
265         __lll_mutex_{lock,unlock}_*.
266         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
267         lowlevellock.h and pthread-errnos.h.
268         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
269         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
270         __lll_mutex_{lock,unlock}_*.
271         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
272         lowlevellock.h.
273         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
274         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
275         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
276         (__condvar_tw_cleanup): Likewise.
277         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
278         lowlevellock.h.
279         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
280         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
281         __lll_mutex_{lock,unlock}_*.
282         ( __condvar_w_cleanup): Likewise.
283         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
284         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
285         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
286         lowlevellock.h.
287         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
288         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
289         __lll_mutex_{lock,unlock}_*.
290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
291         lowlevellock.h.
292         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
293         FUTEX_PRIVATE_FLAG): Remove.
294         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
295         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
297         lowlevellock.h.
298         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
299         FUTEX_PRIVATE_FLAG): Remove.
300         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
301         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
303         lowlevellock.h.
304         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
305         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
306         __lll_mutex_{lock,unlock}_*.
307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
308         lowlevellock.h.
309         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
310         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
311         __lll_mutex_{lock,unlock}_*.
312         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
313         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
314         (__new_sem_post): Use standard initial exec code sequences.
315         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
316         lowlevellock.h.
317         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
318         FUTEX_PRIVATE_FLAG): Remove.
319         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
320         exec code sequences.
321         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
322         (__new_sem_trywait): Use standard initial exec code sequences.
323         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
324         (__new_sem_wait): Use standard initial exec code sequences.
326 2007-07-31  Anton Blanchard  <anton@samba.org>
328         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
329         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
330         atomic_full_barrier.
332 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
334         * allocatestack.c (stack_cache_lock): Change type to int.
335         (get_cached_stack, allocate_stack, __deallocate_stack,
336         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
337         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
338         as second argument to lll_lock and lll_unlock macros on
339         stack_cache_lock.
340         * pthread_create.c (__find_in_stack_list): Likewise.
341         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
342         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
343         as second argument.
344         * descr.h (struct pthread): Change lock and setxid_futex field
345         type to int.
346         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
347         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
348         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
349         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
350         Likewise.
351         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
352         * pthread_cond_init.c (__pthread_cond_init): Likewise.
353         * pthreadP.h (__attr_list_lock): Change type to int.
354         * pthread_attr_init.c (__attr_list_lock): Likewise.
355         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
356         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
357         lll_{,un}lock.
358         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
359         also for lll_futex_{wake,wait}.
360         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
361         a pointer to const.
362         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
363         LLL_SHARED as second argument to lll_{,un}lock.
364         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
365         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
366         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
367         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
368         Likewise.
369         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
370         as second argument to lll_{,un}lock macros on pd->lock.
371         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
372         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
373         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
374         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
375         Likewise.
376         * sysdeps/pthread/createthread.c (do_clone, create_thread):
377         Likewise.
378         * pthread_once.c (once_lock): Change type to int.
379         (__pthread_once): Pass LLL_PRIVATE as second argument to
380         lll_{,un}lock macros on once_lock.
381         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
382         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
383         rwlock->__data.__shared as second argument to them and similarly
384         for lll_futex_w*.
385         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
386         Likewise.
387         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
388         Likewise.
389         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
390         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
391         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
392         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
393         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
394         to lll_{,un}lock macros on __sem_mappings_lock.
395         * sem_open.c (check_add_mapping): Likewise.
396         (__sem_mappings_lock): Change type to int.
397         * semaphoreP.h (__sem_mappings_lock): Likewise.
398         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
399         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
400         instead of lll_*mutex_*, pass LLL_SHARED as last
401         argument.
402         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
403         pass LLL_SHARED as last argument.
404         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
405         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
406         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
407         pass LLL_SHARED as last argument.
408         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
409         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
410         LLL_SHARED as last argument.
411         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
412         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
413         Similarly.
414         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
415         __libc_lock_lock_recursive, __libc_lock_unlock,
416         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
417         argument to lll_{,un}lock.
418         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
419         _IO_lock_unlock): Likewise.
420         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
421         compound literal.
422         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
423         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
424         __fork_lock.
425         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
426         free_mem): Likewise.
427         (__fork_lock): Change type to int.
428         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
429         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
430         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
431         lll_futex_wake.
432         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
433         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
434         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
435         New function.
436         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
437         pass it through to lll_futex_*wait, only compile in when
438         IS_IN_libpthread.
439         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
440         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
441         argument and pass it through to lll_futex_*wait.
442         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
443         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
444         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
445         inline functions to __lll_* resp. __lll_robust_*.
446         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
447         (lll_mutex_dead): Add private argument.
448         (__lll_lock_wait_private): New prototype.
449         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
450         __lll_robust_lock_timedwait): Add private argument to prototypes.
451         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
452         call __lll_lock_wait_private, otherwise pass private to
453         __lll_lock_wait.
454         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
455         __lll_robust_timedlock): Add private argument, pass it to
456         __lll_*wait functions.
457         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
458         call __lll_unlock_wake_private, otherwise pass private to
459         __lll_unlock_wake.
460         (__lll_robust_unlock): Add private argument, pass it to
461         __lll_robust_unlock_wake.
462         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
463         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
464         argument, pass it through to __lll_* inline function.
465         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
466         (lll_lock_t): Remove.
467         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
468         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
469         lll_cond_wake, lll_cond_broadcast): Remove.
470         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
471         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
472         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
473         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
474         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
475         the header from assembler.  Renamed all lll_mutex_* resp.
476         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
477         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
478         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
479         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
480         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
481         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
482         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
483         Remove prototype.
484         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
485         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
486         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
487         (lll_trylock): Likewise, use __lll_trylock_asm, pass
488         MULTIPLE_THREADS_OFFSET as another asm operand.
489         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
490         MULTIPLE_THREADS_OFFSET as last asm operand, call
491         __lll_lock_wait_private if private is constant LLL_PRIVATE,
492         otherwise pass private as another argument to __lll_lock_wait.
493         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
494         lll_timedlock, lll_robust_timedlock): Add private argument, pass
495         private as another argument to __lll_*lock_wait call.
496         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
497         MULTIPLE_THREADS_OFFSET as another asm operand, call
498         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
499         otherwise pass private as another argument to __lll_unlock_wake.
500         (lll_robust_unlock): Add private argument, pass private as another
501         argument to __lll_unlock_wake.
502         (lll_robust_dead): Add private argument, use __lll_private_flag
503         macro.
504         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
505         LLL_MUTEX_LOCK_INITIALIZER.
506         (lll_lock_t): Remove.
507         (LLL_LOCK_INITIALIZER_WAITERS): Define.
508         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
509         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
510         lll_cond_wake, lll_cond_broadcast): Remove.
511         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
512         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
513         2007-05-2{3,9} changes.
514         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
515         kernel-features.h and lowlevellock.h.
516         (LOAD_PRIVATE_FUTEX_WAIT): Define.
517         (LOAD_FUTEX_WAIT): Rewritten.
518         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
519         define.
520         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
521         (__lll_mutex_lock_wait): Rename to ...
522         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
523         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
524         (__lll_mutex_timedlock_wait): Rename to ...
525         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
526         contains private argument.  Don't compile in for libc.so.
527         (__lll_mutex_unlock_wake): Rename to ...
528         (__lll_unlock_wake): ... this.  %ecx contains private argument.
529         Don't compile in for libc.so.
530         (__lll_timedwait_tid): Use __NR_gettimeofday.
531         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
532         kernel-features.h and lowlevellock.h.
533         (LOAD_FUTEX_WAIT): Define.
534         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
535         define.
536         (__lll_robust_mutex_lock_wait): Rename to ...
537         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
538         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
539         macro.
540         (__lll_robust_mutex_timedlock_wait): Rename to ...
541         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
542         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
543         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
544         lowlevellock.h.
545         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
546         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
547         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
548         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
549         to __lll_lock_wait in %edx.
550         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
551         Include lowlevellock.h and pthread-errnos.h.
552         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
553         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
554         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
555         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
556         pass LLL_SHARED in %ecx to both __lll_lock_wait and
557         __lll_unlock_wake.
558         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
559         Include lowlevellock.h and pthread-errnos.h.
560         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
561         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
562         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
563         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
564         pass LLL_SHARED in %ecx to both __lll_lock_wait and
565         __lll_unlock_wake.
566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
567         Include lowlevellock.h.
568         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
569         Don't define.
570         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
571         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
572         pass LLL_SHARED in %ecx to both __lll_lock_wait and
573         __lll_unlock_wake.  Use __NR_gettimeofday.
574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
575         Include lowlevellock.h.
576         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
577         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
578         to __lll_*, pass cond_lock address in %edx rather than %ecx to
579         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
580         and __lll_unlock_wake.
581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
582         Include lowlevellock.h.
583         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
584         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
585         MUTEX(%ebx) address in %edx rather than %ecx to
586         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
587         and __lll_unlock_wake.  Move return value from %ecx to %edx
588         register.
589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
590         Include lowlevellock.h.
591         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
592         Don't define.
593         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
594         MUTEX(%ebp) address in %edx rather than %ecx to
595         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
596         and __lll_unlock_wake.  Move return value from %ecx to %edx
597         register.  Use __NR_gettimeofday.
598         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
599         Include lowlevellock.h.
600         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
601         Don't define.
602         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
603         MUTEX(%ebp) address in %edx rather than %ecx to
604         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
605         and __lll_unlock_wake.  Move return value from %ecx to %edx
606         register.  Use __NR_gettimeofday.
607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
608         Include lowlevellock.h.
609         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
610         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
611         MUTEX(%edi) address in %edx rather than %ecx to
612         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
613         and __lll_unlock_wake.
614         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
615         Include lowlevellock.h.
616         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
617         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
618         MUTEX(%ebx) address in %edx rather than %ecx to
619         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
620         and __lll_unlock_wake.  Move return value from %ecx to %edx
621         register.
622         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
623         lowlevellock.h.
624         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
625         define.
626         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
627         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
628         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
629         lowlevellock.h.
630         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
631         (sem_timedwait): Use __NR_gettimeofday.
632         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
633         lowlevellock.h.
634         (LOCK): Don't define.
635         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
636         lowlevellock.h.
637         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
638         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
639         are waiters.
640         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
641         2007-05-2{3,9} changes.
642         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
643         kernel-features.h and lowlevellock.h.
644         (LOAD_PRIVATE_FUTEX_WAIT): Define.
645         (LOAD_FUTEX_WAIT): Rewritten.
646         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
647         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
648         (__lll_mutex_lock_wait): Rename to ...
649         (__lll_lock_wait): ... this.  %esi is now private argument.
650         Don't compile in for libc.so.
651         (__lll_mutex_timedlock_wait): Rename to ...
652         (__lll_timedlock_wait): ... this.  %esi contains private argument.
653         Don't compile in for libc.so.
654         (__lll_mutex_unlock_wake): Rename to ...
655         (__lll_unlock_wake): ... this.  %esi contains private argument.
656         Don't compile in for libc.so.
657         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
658         kernel-features.h and lowlevellock.h.
659         (LOAD_FUTEX_WAIT): Define.
660         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
661         (__lll_robust_mutex_lock_wait): Rename to ...
662         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
663         Use LOAD_FUTEX_WAIT macro.
664         (__lll_robust_mutex_timedlock_wait): Rename to ...
665         (__lll_robust_timedlock_wait): ... this. %esi argument contains
666         private, use LOAD_FUTEX_WAIT macro.
667         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
668         lowlevellock.h.
669         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
670         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
671         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
672         __lll_lock_wait and __lll_unlock_wake.
673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
674         Include lowlevellock.h and pthread-errnos.h.
675         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
676         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
677         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
678         pass LLL_SHARED in %esi to both __lll_lock_wait and
679         __lll_unlock_wake.
680         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
681         Include lowlevellock.h and pthread-errnos.h.
682         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
683         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
684         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
685         pass LLL_SHARED in %esi to both __lll_lock_wait and
686         __lll_unlock_wake.
687         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
688         Include lowlevellock.h.
689         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
690         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
691         pass LLL_SHARED in %esi to both __lll_lock_wait and
692         __lll_unlock_wake.
693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
694         Include lowlevellock.h.
695         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
696         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
697         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
698         and __lll_unlock_wake.
699         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
700         Include lowlevellock.h.
701         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
702         Don't define.
703         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
704         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
705         and __lll_unlock_wake.
706         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
707         Include lowlevellock.h.
708         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
709         Don't define.
710         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
711         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
712         and __lll_unlock_wake.
713         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
714         Include lowlevellock.h.
715         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
716         Don't define.
717         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
718         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
719         and __lll_unlock_wake.
720         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
721         Include lowlevellock.h.
722         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
723         Don't define.
724         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
725         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
726         and __lll_unlock_wake.
727         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
728         Include lowlevellock.h.
729         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
730         Don't define.
731         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
732         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
733         and __lll_unlock_wake.
734         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
735         lowlevellock.h.
736         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
737         define.
738         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
739         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
740         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
741         lowlevellock.h.
742         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
743         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
744         lowlevellock.h.
745         (LOCK): Don't define.
746         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
747         lowlevellock.h.
748         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
749         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
750         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
751         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
752         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
753         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
754         (__lll_lock_wait_private): New function.
755         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
756         it to lll_futex_*wait.  Don't compile in for libc.so.
757         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
758         Remove.
759         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
760         (struct sparc_pthread_barrier): Remove.
761         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
762         struct sparc_pthread_barrier.  Pass
763         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
764         and lll_futex_wait macros.
765         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
766         Remove.
767         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
768         Include sparc pthread_barrier_wait.c instead of generic one.
770 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
772         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
775         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
776         %ecx.
777         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
778         (pthread_rwlock_timedwrlock): Likewise.
779         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
780         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
782 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
784         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
786 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
788         * tst-locale2.c (useless): Add return statement.
790 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
792         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
793         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
794         * pthread_create.c (start_thread): Likewise.
795         * init.c (sighandler_setxid): Likewise.
796         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
797         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
798         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
799         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
800         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
801         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
802         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
803         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
804         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
805         Likewise.
806         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
807         Likewise.
808         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
809         Likewise.
810         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
811         __rtld_notify): Likewise.
812         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
813         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
814         __pthread_once): Likewise.
815         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
816         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
817         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
818         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
819         (lll_futex_wait): Add private argument, define as wrapper around
820         lll_futex_timed_wait.
821         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
822         use __lll_private_flag macro.
823         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
824         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
825         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
826         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
827         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
828         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
829         (lll_futex_wait): Add private argument, define as wrapper around
830         lll_futex_timed_wait.
831         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
832         use __lll_private_flag macro.
833         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
834         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
835         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
836         Define.
837         (lll_futex_timed_wait, lll_futex_wake): Use it.
838         (lll_private_futex_wait, lll_private_futex_timed_wait,
839         lll_private_futex_wake): Removed.
840         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
841         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
842         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
843         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
844         (lll_futex_wait): Add private argument, define as wrapper around
845         lll_futex_timed_wait.
846         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
847         use __lll_private_flag macro.
848         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
849         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
850         to lll_futex_*.
851         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
852         (lll_private_futex_wait, lll_private_futex_timed_wait,
853         lll_private_futex_wake): Removed.
854         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
855         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
856         (lll_private_futex_wait, lll_private_futex_timed_wait,
857         lll_private_futex_wake): Removed.
858         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
859         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
860         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
861         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
862         (lll_futex_wait): Add private argument, define as wrapper around
863         lll_futex_timed_wait.
864         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
865         use __lll_private_flag macro.
866         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
867         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
868         to lll_futex_*.
869         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
870         Define.
871         (lll_futex_timed_wait, lll_futex_wake): Use it.
872         (lll_private_futex_wait, lll_private_futex_timed_wait,
873         lll_private_futex_wake): Removed.
875 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
877         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
878         of the structure for sparc32.
880 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
882         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
884 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
886         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
887         code used when private futexes are assumed.
888         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
889         Likewise.
891 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
893         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
894         (__lll_private_flag): Define.
895         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
896         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
897         __lll_private_flag.
898         (lll_private_futex_wait, lll_private_futex_timedwait,
899         lll_private_futex_wake): Define as wrapper around non-_private
900         macros.
901         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
902         (__lll_private_flag): Define.
903         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
904         (lll_private_futex_wait, lll_private_futex_timedwait,
905         lll_private_futex_wake): Define as wrapper around non-_private
906         macros.
908 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
910         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
911         parameter to lll_futex_wait call.
912         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
914         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
915         Replace lll_futex_wait with lll_private_futex_wait.
916         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
917         Add LLL_SHARED parameter to lll_futex_wake().
919         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
920         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
921         lll_private_futex_wake.
922         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
923         bit from private parm before syscall.
924         (lll_futex_timed_wait): Likewise.
925         (lll_futex_wake): Likewise.
926         (lll_futex_wake_unlock): Likewise.
927         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
928         (lll_robust_mutex_unlock): Likewise.
929         (lll_mutex_unlock_force): Likewise.
930         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
932 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
935         compilation when unconditionally using private futexes.
936         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
937         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
938         Likewise.
939         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
940         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
942 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
944         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
945         Define.
947 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
949         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
950         kernel-features.h.
952 2007-05-16  Roland McGrath  <roland@redhat.com>
954         * init.c (__nptl_initial_report_events): New variable.
955         (__pthread_initialize_minimal_internal): Initialize pd->report_events
956         to that.
958 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
960         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
961         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
963 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
965         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
966         implementation.
968 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
970         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
971         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
972         * pthread_mutex_timedlock.c: Likewise.
973         * pthread_mutex_trylock.c: Likewise.
974         * pthread_mutex_unlock.c: Likewise.
976 2007-06-17  Andreas Schwab  <schwab@suse.de>
978         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
979         sections.
981 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
983         * allocatestack.c (allocate_stack): Make code compile if
984         __ASSUME_PRIVATE_FUTEX is set.
986 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
988         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
989         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
990         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
991         (__pthread_rwlock_wrlock): Likewise.
992         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
993         (pthread_rwlock_timedrdlock): Likewise.
994         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
995         (pthread_rwlock_timedwrlock): Likewise.
996         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
997         (__pthread_rwlock_unlock): Likewise.
999 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1001         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1002         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1003         Split __flags into __flags, __shared, __pad1 and __pad2.
1004         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1005         futexes if they are available.
1006         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1007         in libc-lowlevellock.S allow using private futexes.
1008         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1009         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1010         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1011         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1012         lll_private_futex_timed_wait and lll_private_futex_wake.
1013         (lll_robust_mutex_unlock): Fix typo.
1014         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1015         field in futex command setup.
1016         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1017         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1018         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1019         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1020         if they are available.  Remove clear_once_control.
1021         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1022         futexes if they are available.
1023         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1027         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1028         Wake only when there are waiters.
1029         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1030         support.  Indicate that there are waiters.  Remove unnecessary
1031         extra cancellation test.
1032         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1033         left-over duplication of __sem_wait_cleanup.
1035 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1037         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1038         parameter to lll_futex_wait, lll_futex_timed_wait, and
1039         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1040         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1041         lll_private_futex_wake.
1042         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1043         * allocatestack.c: Adjust use of lll_futex_* macros.
1044         * init.c: Likewise.
1045         * lowlevellock.h: Likewise.
1046         * pthread_barrier_wait.c: Likewise.
1047         * pthread_cond_broadcast.c: Likewise.
1048         * pthread_cond_destroy.c: Likewise.
1049         * pthread_cond_signal.c: Likewise.
1050         * pthread_cond_timedwait.c: Likewise.
1051         * pthread_cond_wait.c: Likewise.
1052         * pthread_create.c: Likewise.
1053         * pthread_mutex_lock.c: Likewise.
1054         * pthread_mutex_setprioceiling.c: Likewise.
1055         * pthread_mutex_timedlock.c: Likewise.
1056         * pthread_mutex_unlock.c: Likewise.
1057         * pthread_rwlock_timedrdlock.c: Likewise.
1058         * pthread_rwlock_timedwrlock.c: Likewise.
1059         * pthread_rwlock_unlock.c: Likewise.
1060         * sysdeps/alpha/tls.h: Likewise.
1061         * sysdeps/i386/tls.h: Likewise.
1062         * sysdeps/ia64/tls.h: Likewise.
1063         * sysdeps/powerpc/tls.h: Likewise.
1064         * sysdeps/pthread/aio_misc.h: Likewise.
1065         * sysdeps/pthread/gai_misc.h: Likewise.
1066         * sysdeps/s390/tls.h: Likewise.
1067         * sysdeps/sh/tls.h: Likewise.
1068         * sysdeps/sparc/tls.h: Likewise.
1069         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1070         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1071         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1072         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1073         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1074         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1075         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1076         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1077         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1078         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1079         Likewise.
1080         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1081         * sysdeps/x86_64/tls.h: Likewise.
1083 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1085         * pthread_getattr_np.c: No need to install a cancellation handler,
1086         this is no cancellation point.
1087         * pthread_getschedparam.c: Likewise.
1088         * pthread_setschedparam.c: Likewise.
1089         * pthread_setschedprio.c: Likewise.
1090         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1091         lll_unlock_wake_cb.
1092         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1093         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1094         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1095         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1096         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1097         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1098         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1099         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1100         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1101         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1103         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1105         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1106         whether there are more than one thread makes no sense here since
1107         we only call the slow path if the locks are taken.
1108         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1110         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1111         COND_NWAITERS_SHIFT.
1112         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1113         COND_CLOCK_BITS.
1114         * pthread_cond_init.c: Likewise.
1115         * pthread_cond_timedwait.c: Likewise.
1116         * pthread_cond_wait.c: Likewise.
1117         * pthread_condattr_getclock.c: Likewise.
1118         * pthread_condattr_setclock.c: Likewise.
1119         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1125 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1127         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1128         unistd.h.
1130         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1131         insn suffix.
1132         (THREAD_GSCOPE_GET_FLAG): Remove.
1133         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1134         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1135         changes.
1136         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1137         (THREAD_GSCOPE_GET_FLAG): Remove.
1138         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1139         instead of THREAD_GSCOPE_GET_FLAG.
1140         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1141         it.
1142         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1143         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1144         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1145         THREAD_GSCOPE_WAIT): Define.
1146         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1147         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1148         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1149         THREAD_GSCOPE_WAIT): Define.
1150         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1151         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1152         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1153         THREAD_GSCOPE_WAIT): Define.
1154         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1155         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1156         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1157         THREAD_GSCOPE_WAIT): Define.
1159 2007-05-24  Richard Henderson  <rth@redhat.com>
1161         * descr.h (struct pthread): Add header.gscope_flag.
1162         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1163         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1164         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1165         THREAD_GSCOPE_WAIT): Define.
1167 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1169         * init.c: Make it compile with older kernel headers.
1171         * tst-initializers1.c: Show through exit code which test failed.
1173         * pthread_rwlock_init.c: Also initialize __shared field.
1174         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1175         element in rwlock structure into four byte elements.  One of them is
1176         the new __shared element.
1177         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1178         Likewise.
1179         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1180         __shared, adjust names of other padding elements.
1181         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1182         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1183         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1184         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1185         FUTEX_PRIVATE_FLAG.
1186         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1187         futex to use private operations if possible.
1188         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1189         Likewise.
1190         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1191         Likewise.
1192         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1193         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1194         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1195         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1196         Likewise.
1197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1198         Likewise.
1199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1202 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1204         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1205         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1206         * pthread_rwlock_timedrdlock.c: Likewise.
1207         * pthread_rwlock_tryrdlock.c: Likewise.
1209         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1210         optimization.
1212         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1213         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1214         duplication of __sem_wait_cleanup.
1216         * allocatestack.c: Revert last change.
1217         * init.c: Likewise.
1218         * sysdeps/i386/tls.h: Likewise.
1219         * sysdeps/x86_64/tls.h: Likewise.
1220         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1221         header structure.
1222         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1224         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1225         Add private field.
1226         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1227         * pthread_barrier_init.c: Set private flag if pshared and private
1228         futexes are supported.
1229         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1230         private field in futex command setup.
1231         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1233 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1235         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1236         support.
1237         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1238         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1239         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1240         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1241         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1243         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1244         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1245         fields in the structure.
1246         (__old_sem_init): New function.
1247         * sem_open.c: Initialize all fields of the structure.
1248         * sem_getvalue.c: Adjust for renamed element.
1249         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1250         (gen-as-const-headers): Add structsem.sym.
1251         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1252         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1253         struct new_sem.  Add struct old_sem.
1254         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1255         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1256         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1257         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1258         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1259         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1260         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1261         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1262         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1263         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1264         * tst-sem10.c: New file.
1265         * tst-sem11.c: New file.
1266         * tst-sem12.c: New file.
1267         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1268         of struct sem.
1270 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1271             Jakub Jelinek  <jakub@redhat.com>
1273         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1274         Move __pthread_enable_asynccancel right before futex syscall.
1275         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1276         Likewise.
1278 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1280         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1281         THREAD_COPY_PRIVATE_FUTEX): Define.
1282         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1283         THREAD_COPY_PRIVATE_FUTEX): Define.
1284         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1285         * init.c (__pthread_initialize_minimal_internal): Use
1286         THREAD_SET_PRIVATE_FUTEX.
1288         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1289         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1290         THREAD_GSCOPE_FLAG_WAIT): Define.
1291         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1292         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1293         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1294         PTR_DEMANGLE.
1295         (THREAD_GSCOPE_GET_FLAG): Define.
1296         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1297         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1298         instead of ->header.gscope_flag directly.
1300 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1302         * init.c (__pthread_initialize_minimal_internal): Check whether
1303         private futexes are available.
1304         * allocatestack.c (allocate_stack): Copy private_futex field from
1305         current thread into the new stack.
1306         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1307         futexes if they are available.
1308         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1309         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1310         in libc-lowlevellock.S allow using private futexes.
1311         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1312         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1313         FUTEX_PRIVATE_FLAG.
1314         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1315         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1316         if they are available.
1317         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1318         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1319         * sysdeps/i386/tcb-offsets.sym: Likewise.
1320         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1321         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1323 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1325         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1326         Remove ptr_wait_lookup_done again.
1327         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1328         (__pthread_initialize_minimal_internal): Initialize
1329         _dl_wait_lookup_done pointer in _rtld_global directly.
1330         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1331         Remove code to code _dl_wait_lookup_done.
1332         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1333         encrypted for now.
1335 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1337         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1338         pthread_mutex_init failed with ENOTSUP.
1340 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1342         * allocatestack.c (__wait_lookup_done): New function.
1343         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1344         Add ptr_wait_lookup_done.
1345         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1346         * pthreadP.h: Declare __wait_lookup_done.
1347         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1348         Define macros to implement reference handling of global scope.
1349         * sysdeps/x86_64/tls.h: Likewise.
1350         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1351         Initialize GL(dl_wait_lookup_done).
1353 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1355         [BZ #4512]
1356         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1357         is detected.
1358         * pthread_mutex_timedlock.c: Likewise.
1359         * pthread_mutex_trylock.c: Likewise.
1360         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1362         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1363         * tst-robust9.c: New file.
1364         * tst-robustpi9.c: New file.
1366         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1367         unnecessary extra cancellation test.
1369 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1371         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1372         extra cancellation test.
1373         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1375 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1377         * descr.h (struct pthread): Rearrange members to fill hole in
1378         64-bit layout.
1380         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1381         (__pthread_setaffinity_new): If syscall was successful and
1382         RESET_VGETCPU_CACHE is defined, use it before returning.
1383         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1385 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1387         [BZ #4455]
1388         * tst-align2.c: Include stackinfo.h.
1389         * tst-getpid1.c: Likewise.
1391 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1393         [BZ #4455]
1394         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1395         * tst-getpid1.c (do_test): Likewise.
1397         [BZ #4456]
1398         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1399         (allocate_stack): Likewise.
1401 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1403         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1404         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1405         (__lll_robust_timedlock_wait): Likewise.
1406         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1408 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1410         [BZ #4465]
1411         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1412         * tst-cancel4.c (tf_fdatasync): New test.
1414 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1416         [BZ #4392]
1417         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1418         check mutexes like normal mutexes.
1420         [BZ #4306]
1421         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1422         Initialize the whole sigevent structure to appease valgrind.
1424 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1426         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1427         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1429 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1431         * tst-locale1.c: Avoid warnings.
1432         * tst-locale2.c: Likewise.
1434 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1437         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1439 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1441         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1442         __extern_always_inline where appropriate.
1443         * sysdeps/pthread/pthread.h: Likewise.
1445 2007-03-13  Richard Henderson  <rth@redhat.com>
1447         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1448         separate cfi regions for the two subsections.
1450 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1452         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1453         new thread, don't just decrement it.
1454         Patch by Suzuki K P <suzuki@in.ibm.com>.
1456 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1458         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1459         PTHFCT_CALL definition.
1461 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1463         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1464         available, don't use it.
1466 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1468         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1469         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1470         call into the kernel to delay.
1472 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1474         * tst-initializers1.c: We want to test the initializers as seen
1475         outside of libc, so undefined _LIBC.
1477         * pthread_join.c (cleanup): Avoid warning.
1479 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1481         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1482         (__lll_timedwait_tid): Add unwind info.
1484         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1485         function table, mangle the pointers.
1486         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1487         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1488         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1489         demangle pointers before use.
1490         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1491         demangle pointer.
1492         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1493         * sysdeps/pthread/setxid.h: Likewise.
1495 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1497         * tst-rwlock7.c: Show some more information in case of correct
1498         behavior.
1500 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1502         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1503         (lll_futex_timed_wait): Undo part of last change, don't negate
1504         return value.
1506 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1509         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1511 2006-12-28  David S. Miller  <davem@davemloft.net>
1513         * shlib-versions: Fix sparc64 linux target specification.
1515 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1517         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1518         Adjust include path for pthread_barrier_wait.c move.
1520 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1522         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1523         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1525 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1527         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1528         6 argument cancellable syscalls.
1529         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1530         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1531         6 argument cancellable syscalls.
1532         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1534 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1536         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1537         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1539 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1541         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1542         __sync_lock_release instead of __sync_lock_release_si.
1544 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1546         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1547         Define.
1548         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1549         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1550         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1551         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1552         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1553         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1554         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1555         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1556         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1557         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1558         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1560 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1562         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1563         * pthread_barrier_wait.c: ...here.
1564         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1565         * pthread_cond_broadcast.c: ...here.
1566         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1567         * pthread_cond_signal.c: ...here.
1568         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1569         * pthread_cond_timedwait.c: ...here.
1570         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1571         * pthread_cond_wait.c: ...here.
1572         * sysdeps/pthread/pthread_once.c: Move to...
1573         * pthread_once.c: ...here.
1574         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1575         * pthread_rwlock_rdlock.c: ...here.
1576         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1577         * pthread_rwlock_timedrdlock.c: ...here.
1578         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1579         * pthread_rwlock_timedwrlock.c: ...here.
1580         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1581         * pthread_rwlock_unlock.c: ...here.
1582         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1583         * pthread_rwlock_wrlock.c: ...here.
1584         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1585         * pthread_spin_destroy.c: ...here.
1586         * sysdeps/pthread/pthread_spin_init.c: Move to...
1587         * pthread_spin_init.c: ...here.
1588         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1589         * pthread_spin_unlock.c: ...here.
1590         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1591         * pthread_getcpuclockid.c: ...here.
1593         * init.c: USE_TLS support is now always enabled.
1594         * tst-tls5.h: Likewise.
1595         * sysdeps/alpha/tls.h: Likewise.
1596         * sysdeps/i386/tls.h: Likewise.
1597         * sysdeps/ia64/tls.h: Likewise.
1598         * sysdeps/powerpc/tls.h: Likewise.
1599         * sysdeps/s390/tls.h: Likewise.
1600         * sysdeps/sh/tls.h: Likewise.
1601         * sysdeps/sparc/tls.h: Likewise.
1602         * sysdeps/x86_64/tls.h: Likewise.
1604 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1606         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1607         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1608         failed.
1610         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1611         Define to THREAD_SELF->header.multiple_threads.
1612         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1613         Likewise.
1614         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1615         Likewise.
1616         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1617         (SINGLE_THREAD_P): Likewise.
1618         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1619         (SINGLE_THREAD_P): Likewise.
1620         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1621         (SINGLE_THREAD_P): Likewise.
1622         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1623         (SINGLE_THREAD_P): Likewise.
1624         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1625         Likewise.
1626         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1627         (SINGLE_THREAD_P): Likewise.
1628         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1629         (SINGLE_THREAD_P): Likewise.
1630         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1631         Likewise.
1633 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1635         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1636         by default rather than 2_3_3.
1638 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1640         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1641         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1642         atomic_* instead of catomic_* macros.
1644 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1646         [BZ #3285]
1647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1648         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1649         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1650         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1651         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1652         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1653         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1654         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1655         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1656         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1657         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1658         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1659         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1661 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1663         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1664         cancelable syscalls with six parameters.
1666         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1667         operations instead of atomic_*.
1669 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1671         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1673 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1675         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1676         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1677         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1678         New file.
1679         * pthread_attr_setstack.c: Allow overwriting the version number of the
1680         new symbol.
1681         * pthread_attr_setstacksize.c: Likewise.
1682         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1683         it.
1684         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1685         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1687 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1689         [BZ #3251]
1690         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1691         Patch by Petr Baudis.
1693 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1695         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1697         * tst-cancel2.c (tf): Loop as long as something was written.
1699 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1701         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1702         mutexes wake all mutexes.
1703         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1704         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1705         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1707 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1709         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1710         to guarantee the thread is always canceled.
1712 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1714         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1715         Include stdlib.h.
1716         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1717         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1720         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1722 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1724         [BZ #3123]
1725         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1726         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1728         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1729         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1730         * Makefile (tests): Add tst-cond22.
1731         * tst-cond22.c: New file.
1733 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1735         [BZ #3124]
1736         * descr.h (struct pthread): Add parent_cancelhandling.
1737         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1738         cancelhandling value to child.
1739         * pthread_create.c (start_thread): If parent thread was canceled
1740         reset the SIGCANCEL mask.
1741         * Makefile (tests): Add tst-cancel25.
1742         * tst-cancel25.c: New file.
1744 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1745             Ulrich Drepper  <drepper@redhat.com>
1747         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1748         counterp if it is already zero.
1749         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1751 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1752             Roland McGrath  <roland@redhat.com>
1754         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1755         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1756         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1757         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1758         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1759         lll_robust_mutex_timedlock, lll_mutex_unlock,
1760         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1761         Add _L_*_ symbols around the subsection.
1762         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1763         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1765 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1766             Roland McGrath  <roland@redhat.com>
1768         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1769         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1770         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1771         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1772         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1773         lll_robust_mutex_timedlock, lll_mutex_unlock,
1774         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1775         Add _L_*_ symbols around the subsection.
1776         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1777         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1779 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1781         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1782         change because it can disturb too much existing code.  If real hard
1783         reader preference is needed we'll introduce another type.
1784         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1785         (pthread_rwlock_timedwrlock): Likewise.
1786         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1787         Likewise.
1789 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1791         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1792         reader preference.
1793         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1794         (pthread_rwlock_timedwrlock): Likewise.
1795         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1796         Likewise.
1798 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1800         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1801         Only define ifdef SHARED.
1803 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1805         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1806         (free_stacks): ...here.
1807         (__free_stack_cache): New function.
1808         * pthreadP.h: Declare __free_stack_cache.
1809         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1810         ptr_freeres.
1811         * init.c (pthread_functions): Initialize ptr_freeres.
1812         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1813         New freeres function.
1815 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
1817         [BZ #3018]
1818         * Makefile (extra-objs): Add modules to extra-test-objs instead.
1820 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
1822         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1823         _XOPEN_REALTIME_THREADS.
1825 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
1827         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1828         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1829         HAVE_CLOCK_GETTIME_VSYSCALL.
1830         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1832 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
1834         * sysdeps/unix/sysv/linux/bits/posix_opt.h
1835         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1836         * descr.h (struct priority_protection_data): New type.
1837         (struct pthread): Add tpp field.
1838         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1839         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1840         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1841         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1842         TPP mutexes.
1843         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1844         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1845         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1846         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1847         * tpp.c: New file.
1848         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1849         boosted by TPP.
1850         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1851         * pthread_mutexattr_getprioceiling.c
1852         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1853         in the SCHED_FIFO priority range.
1854         * pthread_mutexattr_setprioceiling.c
1855         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1856         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1857         if mutex is not TPP.  Ceiling is now in __data.__lock.
1858         * pthread_mutex_setprioceiling.c: Include stdbool.h.
1859         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
1860         is now in __data.__lock.  Add locking.
1861         * pthread_create.c (__free_tcb): Free pd->tpp structure.
1862         * Makefile (libpthread-routines): Add tpp.
1863         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1864         * tst-tpp.h: New file.
1865         * tst-mutexpp1.c: New file.
1866         * tst-mutexpp6.c: New file.
1867         * tst-mutexpp10.c: New file.
1868         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1869         * tst-mutex6.c (TEST_FUNCTION): Likewise.
1871 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
1873         [BZ #2843]
1874         * pthread_join.c (pthread_join): Account for self being canceled
1875         when checking for deadlocks.
1876         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
1877         (tf1): Don't print anything after pthread_join returns, this would be
1878         another cancellation point.
1879         (tf2): Likewise.
1880         * tst-join6.c: New file.
1881         * Makefile (tests): Add tst-join6.
1883 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
1885         [BZ #2892]
1886         * pthread_setspecific.c (__pthread_setspecific): Check
1887         out-of-range index before checking for unused key.
1889         * sysdeps/pthread/gai_misc.h: New file.
1891 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
1893         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
1894         file.  Don't use sysctl.
1895         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
1896         overwrite the file if this is likely not true.
1898 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
1900         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1901         * Makefile (tests): Add tst-getpid3.
1902         * tst-getpid3.c: New file.
1904 2006-07-30  Roland McGrath  <roland@redhat.com>
1906         * Makefile (libpthread-routines): Add ptw-sigsuspend.
1908         * sysdeps/unix/sysv/linux/i386/not-cancel.h
1909         (pause_not_cancel): New macro.
1910         (nanosleep_not_cancel): New macro.
1911         (sigsuspend_not_cancel): New macro.
1912         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1913         nanosleep_not_cancel macro from <not-cancel.h>.
1914         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1915         macro from <not-cancel.h>.
1917 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
1918             Jakub Jelinek  <jakub@redhat.com>
1920         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1921         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
1922         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1923         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1924         * pthread_mutex_init.c: Add support for priority inheritance mutex.
1925         * pthread_mutex_lock.c: Likewise.
1926         * pthread_mutex_timedlock.c: Likewise.
1927         * pthread_mutex_trylock.c: Likewise.
1928         * pthread_mutex_unlock.c: Likewise.
1929         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1930         all mutexes.
1931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1932         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1933         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1934         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1935         pthread-pi-defines.sym.
1936         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1937         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1938         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1939         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1940         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1941         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1942         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1943         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1945         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1946         _POSIX_THREAD_PRIO_INHERIT to 200112L.
1947         * tst-mutex1.c: Adjust to allow use in PI mutex test.
1948         * tst-mutex2.c: Likewise.
1949         * tst-mutex3.c: Likewise.
1950         * tst-mutex4.c: Likewise.
1951         * tst-mutex5.c: Likewise.
1952         * tst-mutex6.c: Likewise.
1953         * tst-mutex7.c: Likewise.
1954         * tst-mutex7a.c: Likewise.
1955         * tst-mutex8.c: Likewise.
1956         * tst-mutex9.c: Likewise.
1957         * tst-robust1.c: Likewise.
1958         * tst-robust7.c: Likewise.
1959         * tst-robust8.c: Likewise.
1960         * tst-mutexpi1.c: New file.
1961         * tst-mutexpi2.c: New file.
1962         * tst-mutexpi3.c: New file.
1963         * tst-mutexpi4.c: New file.
1964         * tst-mutexpi5.c: New file.
1965         * tst-mutexpi6.c: New file.
1966         * tst-mutexpi7.c: New file.
1967         * tst-mutexpi7a.c: New file.
1968         * tst-mutexpi8.c: New file.
1969         * tst-mutexpi9.c: New file.
1970         * tst-robust1.c: New file.
1971         * tst-robust2.c: New file.
1972         * tst-robust3.c: New file.
1973         * tst-robust4.c: New file.
1974         * tst-robust5.c: New file.
1975         * tst-robust6.c: New file.
1976         * tst-robust7.c: New file.
1977         * tst-robust8.c: New file.
1978         * Makefile (tests): Add the new tests.
1980         * pthread_create.c (start_thread): Add some casts to avoid warnings.
1981         * pthread_mutex_destroy.c: Remove unneeded label.
1983 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
1985         * pthread_mutex_init.c (__pthread_mutex_init): Move some
1986         computations to compile time.
1988 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
1990         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1992 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
1996 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
1998         * pthread_key_create.c (__pthread_key_create): Do away with
1999         __pthread_keys_lock.
2001         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2002         (__kernel_cpumask_size): Mark as hidden.
2003         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2005         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2006         * semaphoreP.h (__sem_mappings_lock): Likewise.
2008 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2010         * pthread_atfork.c: Mark __dso_handle as hidden.
2012 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2014         [BZ #2644]
2015         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2016         the reload problem.  Change the one path in pthread_cancel_init
2017         which causes the problem.  Force gcc to reload.  Simplify callers.
2018         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2019         (_Unwind_GetBSP): Undo last patch.
2021 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2023         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2024         function pointer is reloaded after pthread_cancel_init calls.
2026         [BZ #2644]
2027         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2028         pointers are reloaded after pthread_cancel_init calls.
2030 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2032         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2033         __always_inline.
2035 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2037         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2038         Allocate new object which is passed to timer_sigev_thread so that
2039         the timer can be deleted before the new thread is scheduled.
2041 2006-04-26  Roland McGrath  <roland@redhat.com>
2043         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2045 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2047         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2048         suffix for conditional jumps.
2049         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2050         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2051         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2052         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2053         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2054         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2056         * init.c (sigcancel_handler): Compare with correct PID even if the
2057         thread is in the middle of a fork call.
2058         (sighandler_setxid): Likewise.
2059         Reported by Suzuki K P <suzuki@in.ibm.com> .
2061 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2063         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2065 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2067         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2068         fails [Coverity CID 105].
2070 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2072         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2074 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2076         [BZ #2505]
2077         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2078         Define __lll_rel_instr using lwsync.
2080 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2082         * allocatestack.c (allocate_stack): Always initialize robust_head.
2083         * descr.h: Define struct robust_list_head.
2084         (struct pthread): Use robust_list_head in robust mutex list definition.
2085         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2086         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2087         (__pthread_initialize_minimal_internal): Register robust_list with
2088         the kernel.
2089         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2090         Declare __set_robust_list_avail.
2091         * pthread_create.c (start_thread): Register robust_list of new thread.
2092         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2093         waiters.
2094         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2095         number of users, it's unreliable.
2096         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2097         set_robust_list syscall is available.
2098         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2099         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2100         Set robust_head.list_op_pending before trying to lock a robust mutex.
2101         * pthread_mutex_timedlock.c: Likewise.
2102         * pthread_mutex_trylock.c: Likewise.
2103         * pthread_mutex_unlock.c: Likewise for unlocking.
2104         * Makefile (tests): Add tst-robust8.
2105         * tst-robust8.c: New file.
2107 2006-03-08  Andreas Schwab  <schwab@suse.de>
2109         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2110         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2112 2006-03-05  Roland McGrath  <roland@redhat.com>
2114         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2115         and $config_os doesn't match *linux*.
2117 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2119         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2120         Use __syscall_error.
2121         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2122         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2123         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2124         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2125         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2126         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2128 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2130         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2132 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2134         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2135         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2136         mutex.
2137         (__lll_robust_timedlock_wait): Likewise.
2138         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2139         (__lll_robust_lock_wait): Likewise.
2140         (__lll_robust_timedlock_wait): Likewise.
2141         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2142         (__lll_robust_lock_wait): Likewise.
2143         (__lll_robust_timedlock_wait): Likewise.
2145 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2147         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2148         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2149         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2150         lll_robust_mutex_unlock): Define.
2151         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2153 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2155         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2156         instead of <clone.S>.
2158 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2160         * Makefile (libpthread-routines): Add
2161         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2162         and pthread_mutex_[sg]etprioceiling.
2163         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2164         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2165         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2166         pthread_mutex_setprioceiling.
2167         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2168         PTHREAD_PRIO_PROTECT): New enum values.
2169         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2170         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2171         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2172         prototypes.
2173         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2174         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2175         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2176         Define.
2177         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2178         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2179         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2180         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2181         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2182         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2183         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2184         protocol mutexes.
2185         * pthread_mutex_getprioceiling.c: New file.
2186         * pthread_mutex_setprioceiling.c: New file.
2187         * pthread_mutexattr_getprioceiling.c: New file.
2188         * pthread_mutexattr_setprioceiling.c: New file.
2189         * pthread_mutexattr_getprotocol.c: New file.
2190         * pthread_mutexattr_setprotocol.c: New file.
2192 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2194         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2196 2006-02-27  Roland McGrath  <roland@redhat.com>
2198         * sysdeps/pthread/Subdirs: List nptl here too.
2199         * configure (libc_add_on_canonical): New variable.
2201         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2203         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2204         self to get main source tree's file.
2205         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2206         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2207         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2208         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2209         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2210         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2211         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2212         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2213         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2214         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2215         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2216         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2217         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2219         * Makefile: Use $(sysdirs) in vpath directive.
2221         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2222         (CPPFLAGS-timer_routines.c): Likewise.
2224         * Makeconfig (includes): Variable removed.
2226 2006-02-26  Roland McGrath  <roland@redhat.com>
2228         * sysdeps/generic/pt-raise.c: Moved to ...
2229         * pt-raise.c: ... here.
2230         * sysdeps/generic/lowlevellock.h: Moved to ...
2231         * lowlevellock.h: ... here.
2233 2006-02-23  Roland McGrath  <roland@redhat.com>
2235         * descr.h (struct pthread): Add final member `end_padding'.
2236         (PTHREAD_STRUCT_END_PADDING): Use it.
2238 2006-02-20  Roland McGrath  <roland@redhat.com>
2240         * sysdeps/mips: Directory removed, saved in ports repository.
2241         * sysdeps/unix/sysv/linux/mips: Likewise.
2243 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2245         * tst-robust1.c: Add second mutex to check that the mutex list is
2246         handled correctly.
2248 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2250         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2251         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2252         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2253         lll_robust_mutex_unlock): New macros.
2254         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2255         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2256         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2257         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2258         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2260 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2262         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2263         definitions.
2264         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2266 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2268         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2269         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2270         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2271         (lll_robust_mutex_unlock): Likewise.
2273 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2275         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2276         Set robust_list.__next rather than robust_list.
2277         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2278         (__pthread_list_t): New typedef.
2279         (pthread_mutex_t): Replace __next and __prev fields with __list.
2280         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2281         (__pthread_list_t): New typedef.
2282         (pthread_mutex_t): Replace __next and __prev fields with __list.
2283         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2284         (__pthread_list_t, __pthread_slist_t): New typedefs.
2285         (pthread_mutex_t): Replace __next and __prev fields with __list.
2286         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2287         (__pthread_list_t, __pthread_slist_t): New typedefs.
2288         (pthread_mutex_t): Replace __next and __prev fields with __list.
2289         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2290         (__pthread_list_t, __pthread_slist_t): New typedefs.
2291         (pthread_mutex_t): Replace __next and __prev fields with __list.
2292         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2293         (__pthread_slist_t): New typedef.
2294         (pthread_mutex_t): Replace __next field with __list.
2296 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2298         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2299         PTHREAD_MUTEX_OWNERDEAD.
2300         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2301         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2302         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2303         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2304         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2305         to PTHREAD_MUTEX_INCONSISTENT.
2306         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2307         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2308         * pthread_mutex_trylock.c: Likewise.
2309         * pthread_mutex_timedlock.c: Likewise.
2310         * pthread_mutex_unlock.c: Likewise.
2311         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2312         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2313         lowlevelrobustlock.sym.
2314         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2315         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2316         definitions.
2317         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2318         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2319         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2320         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2321         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2323 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2325         * allocatestack.c (allocate_stack): Initialize robust_list.
2326         * init.c (__pthread_initialize_minimal_internal): Likewise.
2327         * descr.h (struct xid_command): Pretty printing.
2328         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2329         robust_list.  Adjust macros.
2330         * pthread_create.c (start_thread): Adjust robust_list handling.
2331         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2332         but the owner for all robust mutex types.
2333         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2334         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2335         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2336         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2338         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2339         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2341 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2343         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2344         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2346 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2348         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2349         Return status.
2350         (lll_futex_timed_wait): Define.
2352 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2354         * tst-cancel4.c: Test ppoll.
2356 2006-01-18  Andreas Jaeger  <aj@suse.de>
2358         [BZ #2167]
2359         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2360         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2361         by Jim Gifford <patches@jg555.com>.
2363 2006-01-13  Richard Henderson  <rth@redhat.com>
2365         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2367 2006-01-10  Roland McGrath  <roland@redhat.com>
2369         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2370         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2371         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2372         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2373         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2374         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2375         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2376         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2377         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2378         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2380 2006-01-09  Roland McGrath  <roland@redhat.com>
2382         * tst-initializers1-c89.c: New file.
2383         * tst-initializers1-c99.c: New file.
2384         * tst-initializers1-gnu89.c: New file.
2385         * tst-initializers1-gnu99.c: New file.
2386         * Makefile (tests): Add them.
2387         (CFLAGS-tst-initializers1-c89.c): New variable.
2388         (CFLAGS-tst-initializers1-c99.c): New variable.
2389         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2390         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2392         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2393         Use __extension__ on anonymous union definition.
2394         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2395         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2396         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2397         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2398         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2400 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2402         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2403         Don't give the union a name because it changes the mangled name.
2404         Instead name the struct for __data.
2405         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2406         Likewise.
2407         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2408         Likewise.
2410 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2412         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2413         stack bias to mc_ftp field.
2415 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2417         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2418         being too clever and reloading the futex value where it shouldn't.
2420 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2422         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2423         correct type.
2425 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2427         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2428         Add cfi directives.
2430 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2432         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2433         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2434         rename in tcbhead_t.
2436         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2437         Don't give the union a name because it changes the mangled name.
2438         Instead name the struct for __data.
2439         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2440         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2441         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2442         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2443         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2444         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2446 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2449         Return status.
2450         (lll_futex_timed_wait): Define.
2451         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2452         * sysdeps/pthread/aio_misc.h: New file.
2454 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2456         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2458 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2460         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2461         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2462         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2464 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2466         * tst-cancel24.cc: Use C headers instead of C++ headers.
2468 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2470         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2471         sparc-linux configured glibc.
2472         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2473         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2474         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2475         atomic_compare_and_exchange_val_24_acq instead of
2476         atomic_compare_and_exchange_val_acq.
2477         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2478         instead of atomic_exchange_rel.
2479         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2480         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2481         file.
2482         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2483         file.
2484         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2485         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2486         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2487         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2488         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2489         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2490         New file.
2491         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2492         New file.
2493         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2494         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2495         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2496         file.
2497         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2498         file.
2499         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2501 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2503         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2504         mutex initializers.
2506 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2508         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2509         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2510         THREAD_COPY_POINTER_GUARD): Define.
2511         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2512         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2514 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2516         * version.c: Update copyright year.
2518 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2520         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2521         .eh_frame section, use cfi_* directives.
2522         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2524 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2526         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2527         now.
2529 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2531         * sysdeps/pthread/sigaction.c: Removed.
2532         * sigaction.c: New file.
2533         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2535 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2537         * Makefile (tests): Add tst-signal7.
2538         * tst-signal7.c: New file.
2540 2005-12-27  Roland McGrath  <roland@redhat.com>
2542         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2543         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2544         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2545         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2546         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2547         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2548         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2549         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2550         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2551         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2552         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2554 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2556         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2557         and __prev field to pthread_mutex_t.
2558         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2559         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2560         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2561         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2562         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2563         to pthread_mutex_t.
2565 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2567         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2568         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2569         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2570         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2571         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2572         and PTHREAD_MUTEXATTR_FLAG_BITS.
2573         * descr.h (struct pthread): Add robust_list field and define
2574         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2575         * pthread_mutexattr_getrobust.c: New file.
2576         * pthread_mutexattr_setrobust.c: New file.
2577         * pthread_mutex_consistent.c: New file.
2578         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2579         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2580         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2581         Adjust pthread_mutex_t initializers.
2582         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2583         field to pthread_mutex_t.
2584         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2585         and __prev field to pthread_mutex_t.
2586         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2587         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2588         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2589         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2590         * pthread_mutexattr_gettype.c: Likewise.
2591         * pthread_mutexattr_setpshared.c: Likewise.
2592         * pthread_mutexattr_settype.c: Likewise.
2593         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2594         Initialize mutex kind according to robust flag.
2595         * pthread_mutex_lock.c: Implement local robust mutex.
2596         * pthread_mutex_timedlock.c: Likewise.
2597         * pthread_mutex_trylock.c: Likewise.
2598         * pthread_mutex_unlock.c: Likewise.
2599         * pthread_create.c (start_thread): Mark robust mutexes which remained
2600         locked as dead.
2601         * tst-robust1.c: New file.
2602         * tst-robust2.c: New file.
2603         * tst-robust3.c: New file.
2604         * tst-robust4.c: New file.
2605         * tst-robust5.c: New file.
2606         * tst-robust6.c: New file.
2607         * tst-robust7.c: New file.
2608         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2609         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2610         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2611         tst-robust5, tst-robust6, and tst-robust7.
2613         * tst-typesizes.c: New file.
2614         * Makefile (tests): Add tst-typesizes.
2616         * tst-once3.c: More debug output.
2618 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2620         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2621         missing after last change.
2623         * version.c: Update copyright year.
2625 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2627         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2628         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2629         * pthread_mutex_trylock.c: Likewise.
2630         * pthread_mutex_timedlock.c: Likewise.
2631         * pthread_mutex_unlock.c: Likewise.
2633 2005-12-22  Roland McGrath  <roland@redhat.com>
2635         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2636         so that #include_next's search location is not reset to the -I..
2637         directory where <nptl/...> can be found.
2639 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2641         [BZ #1913]
2642         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2643         Fix unwind info.  Remove useless branch prediction prefix.
2644         * tst-cancel24.cc: New file.
2645         * Makefile: Add rules to build and run tst-cancel24.
2647 2005-12-21  Roland McGrath  <roland@redhat.com>
2649         * libc-cancellation.c: Use <> rather than "" #includes.
2650         * pt-cleanup.c: Likewise.
2651         * pthread_create.c: Likewise.
2652         * pthread_join.c: Likewise.
2653         * pthread_timedjoin.c: Likewise.
2654         * pthread_tryjoin.c: Likewise.
2655         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2656         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2657         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2658         * unwind.c: Likewise.
2660 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2662         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2663         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2664         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2665         THREAD_COPY_POINTER_GUARD): Define.
2667 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2669         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2670         rather than one.
2671         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2672         THREAD_COPY_POINTER_GUARD): Define.
2673         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2674         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2675         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2676         THREAD_COPY_POINTER_GUARD): Define.
2677         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2678         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2679         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2680         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2681         Use PTR_DEMANGLE for B0 if defined.
2683 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2685         * pthread_create.c (__pthread_create_2_1): Use
2686         THREAD_COPY_POINTER_GUARD if available.
2687         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2688         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2689         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2690         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2691         * sysdeps/x86_64/tls.h: Likewise.
2693 2005-12-15  Roland McGrath  <roland@redhat.com>
2695         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2697 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2699         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2700         sysdeps/generic.
2701         * errno-loc.c: New file.
2703 2005-12-12  Roland McGrath  <roland@redhat.com>
2705         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2706         adjustments before choosing stack size.  Update minimum stack size
2707         calculation to match allocate_stack change.
2709 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2711         * allocatestack.c (allocate_stack): Don't demand that there is an
2712         additional full page available on the stack beside guard, TLS, the
2713         minimum stack.
2715 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2717         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2718         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2720         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2721         compiling 32-bit code we must define __cleanup_fct_attribute.
2723 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2725         [BZ #1920]
2726         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2727         __attribute__ instead of __attribute.
2728         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2729         (__cleanup_fct_attribute): Likewise.
2731 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2733         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2734         a write barrier before writing libgcc_s_getcfa.
2736 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2738         * sysdeps/unix/sysv/linux/configure: Removed.
2740 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2742         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2743         optional init_array/fini_array support.
2745 2005-10-24  Roland McGrath  <roland@redhat.com>
2747         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2748         versioned_symbol use.
2750 2005-10-16  Roland McGrath  <roland@redhat.com>
2752         * init.c (__pthread_initialize_minimal_internal): Even when using a
2753         compile-time default stack size, apply the minimum that allocate_stack
2754         will require, and round up to page size.
2756 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2758         * Makefile ($(test-modules)): Remove static pattern rule.
2760 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2761             Ulrich Drepper  <drepper@redhat.com>
2763         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2764         alignment in callback function.
2765         * Makefile: Add rules to build and run tst-align3.
2766         * tst-align3.c: New file.
2768 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2770         * allocatestack.c (setxid_signal_thread): Add
2771         INTERNAL_SYSCALL_DECL (err).
2773 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2775         * allocatestack.c (setxid_signal_thread): Need to use
2776         atomic_compare_and_exchange_bool_acq.
2778 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2779             Jakub Jelinek  <jakub@redhat.com>
2781         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2782         CANCEL_RESTMASK.
2783         (struct pthread): Move specific_used field to avoid padding.
2784         Add setxid_futex field.
2785         * init.c (sighandler_setxid): Reset setxid flag and release the
2786         setxid futex.
2787         * allocatestack.c (setxid_signal_thread): New function.  Broken
2788         out of the bodies of the two loops in __nptl_setxid.  For undetached
2789         threads check whether they are exiting and if yes, don't send a signal.
2790         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2791         * pthread_create.c (start_thread): For undetached threads, check
2792         whether setxid bit is set.  If yes, wait until signal has been
2793         processed.
2795         * allocatestack.c (STACK_VARIABLES): Initialize them.
2796         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2798 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2800         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2801         waiters, awake all waiters on the associated mutex.
2803 2005-09-22  Roland McGrath  <roland@redhat.com>
2805         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2806         ../sysdeps/x86_64/hp-timing.h).
2808 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2810         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2811         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2812         (lll_futex_wake_unlock): Define.
2813         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2814         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2815         (lll_futex_wake_unlock): Define.
2816         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2817         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2818         (lll_futex_wake_unlock): Define.
2819         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2820         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2821         (lll_futex_wake_unlock): Define.
2822         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2823         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2824         (lll_futex_wake_unlock): Define.
2825         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2826         lll_futex_wake_unlock.
2827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2828         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2829         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2831         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2832         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2834 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2836         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2837         Fix typo in register name.
2839 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
2841         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2842         Use __sigfillset.  Document that sigfillset does the right thing wrt
2843         to SIGSETXID.
2845 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2847         [BZ #1102]
2848         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2849         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2850         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2851         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2852         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2853         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2854         in the structure.
2855         * Makefile (tests): Add tst-initializers1.
2856         (CFLAGS-tst-initializers1.c): Set.
2857         * tst-initializers1.c: New test.
2859 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2861         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2862         Make sure __flags are located at offset 48 from the start of the
2863         structure.
2865 2005-07-02  Roland McGrath  <roland@redhat.com>
2867         * Makeconfig: Comment fix.
2869 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
2871         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2872         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2873         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2874         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2875         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2876         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2877         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2878         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2879         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2880         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2882 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
2884         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2885         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2886         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2887         fields.
2888         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2889         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2890         field.  Put in sysinfo field unconditionally.
2891         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2892         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2893         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2894         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2895         fields.
2896         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2897         * pthread_create.c (__pthread_create_2_1): Use
2898         THREAD_COPY_STACK_GUARD macro.
2899         * Makefile: Add rules to build and run tst-stackguard1{,-static}
2900         tests.
2901         * tst-stackguard1.c: New file.
2902         * tst-stackguard1-static.c: New file.
2904 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
2906         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2907         Invoke CGOTSETUP and CGOTRESTORE.
2908         (CGOTSETUP, CGOTRESTORE): Define.
2910 2005-05-29  Richard Henderson  <rth@redhat.com>
2912         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2913         (tf_write, tf_writev): Use it.
2914         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
2915         the system minimum.
2917 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
2919         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2920         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2921         __librt_*_asynccancel@local.
2923 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
2925         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2926         all occurrences of JUMPTARGET.  Instead append @local to labels.
2928 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
2930         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2931         size/alignment of struct pthread rather than tcbhead_t.
2932         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2933         Likewise.
2934         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2935         Likewise.
2936         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2937         Likewise.
2939 2005-05-19  Richard Henderson  <rth@redhat.com>
2941         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2942         __sync_val_compare_and_swap, not explicit _si variant.
2943         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2945 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
2947         [BZ #915]
2948         * sysdeps/pthread/pthread.h: Avoid empty initializers.
2950 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
2952         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2953         .eh_frame section, use cfi_* directives.
2955 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
2957         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2958         of "" includes.
2960 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
2962         [BZ #1075]
2963         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2964         aio_write blocks.
2966 2005-04-27  Roland McGrath  <roland@redhat.com>
2968         * Makefile (tests): Remove tst-clock2.
2970         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2971         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2972         translating to the kernel clockid_t for our own process/thread clock.
2974         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2976 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
2978         * old_pthread_cond_init.c: Include <errno.h>.
2979         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2980         process shared or uses clock other than CLOCK_REALTIME.
2981         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2983 2005-04-13  David S. Miller  <davem@davemloft.net>
2985         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2986         * sysdeps/sparc/sparc64/clone.S: New file.
2988 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2990         [BZ #1102]
2991         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2992         __inline instead of inline.
2993         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2995 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
2997         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2998         functionally equivalent, but shorter instructions.
2999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3000         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3001         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3002         Likewise.
3003         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3004         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3005         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3006         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3008         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3009         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3010         Likewise.
3011         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3012         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3013         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3014         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3015         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3017 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3019         * sysdeps/mips/Makefile: New file.
3020         * sysdeps/mips/nptl-sysdep.S: New file.
3021         * sysdeps/mips/tcb-offsets.sym: New file.
3022         * sysdeps/mips/pthread_spin_lock.S: New file.
3023         * sysdeps/mips/pthread_spin_trylock.S: New file.
3024         * sysdeps/mips/pthreaddef.h: New file.
3025         * sysdeps/mips/tls.h: New file.
3026         * sysdeps/mips/jmpbuf-unwind.h: New file.
3027         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3028         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3029         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3030         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3031         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3032         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3033         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3034         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3035         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3036         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3038 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3040         [BZ #1112]
3041         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3042         variable to scerr.
3044 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3046         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3048 2005-02-25  Roland McGrath  <roland@redhat.com>
3050         * alloca_cutoff.c: Correct license text.
3051         * tst-unload.c: Likewise.
3052         * sysdeps/pthread/allocalim.h: Likewise.
3053         * sysdeps/pthread/pt-initfini.c: Likewise.
3054         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3055         * sysdeps/pthread/bits/sigthread.h: Likewise.
3056         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3057         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3059 2005-02-16  Roland McGrath  <roland@redhat.com>
3061         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3062         Use unsigned int * for ptr_nthreads.
3064 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3066         [BZ #721]
3067         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3068         gcc4.
3070 2005-02-07  Richard Henderson  <rth@redhat.com>
3072         [BZ #787]
3073         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3074         argument.
3076 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3078         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3079         order of arguments in invocation of atomic_add_zero.
3081 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3083         [BZ #737]
3084         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3085         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3086         at least gotntpoff relocation and addition.
3087         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3088         Likewise.
3089         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3090         Likewise.
3091         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3092         Likewise.
3094 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3096         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3097         entry for static tls deallocation fix.
3098         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3099         also contains information whether the memory pointed to is static
3100         TLS or not.
3101         * sysdeps/i386/tls.h: Likewise.
3102         * sysdeps/ia64/tls.h: Likewise.
3103         * sysdeps/powerpc/tls.h: Likewise.
3104         * sysdeps/s390/tls.h: Likewise.
3105         * sysdeps/sh/tls.h: Likewise.
3106         * sysdeps/sparc/tls.h: Likewise.
3107         * sysdeps/x86_64/tls.h: Likewise.
3109 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3111         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3113 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3115         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3116         %esp.
3117         * Makefile (tests): Add tst-align2.
3118         * tst-align2.c: New test.
3119         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3120         -mpreferred-stack-boundary=4.
3122 2004-12-18  Roland McGrath  <roland@redhat.com>
3124         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3125         New file removed withdrawn for the moment.
3127 2004-12-17  Richard Henderson  <rth@redhat.com>
3129         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3130         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3132 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3134         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3135         Increased PTHREAD_STACK_MIN.
3137         * tst-context1.c (stacks): Use bigger stack size.
3139 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3141         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3142         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3144 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3146         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3147         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3148         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3150 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3152         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3154 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3156         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3157         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3159         * tst-getpid1.c: If child crashes, report this first.  Print which
3160         signal.
3162 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3164         * init.c (__pthread_initialize_minimal_internal): Also unblock
3165         SIGSETXID.
3167 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3169         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3170         _POSIX_THREAD_CPUTIME): Define to 0.
3171         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3172         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3173         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3174         __timer_signal_thread_tclk): Remove.
3175         (init_module): Remove their initialization.
3176         (thread_cleanup): Remove their cleanup assertions.
3177         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3178         __timer_signal_thread_tclk): Remove.
3179         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3180         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3181         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3183 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3185         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3186         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3188         * Makefile (tests): Add tst-getpid2.
3189         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3190         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3191         * tst-getpid2.c: New test.
3193 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3195         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3197 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3199         * Makefile (tests): Add tst-getpid1.
3200         * tst-getpid1.c: New file.
3201         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3202         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3204 2004-12-02  Roland McGrath  <roland@redhat.com>
3206         * Makefile (libpthread-nonshared): Variable removed.
3207         ($(objpfx)libpthread_nonshared.a): Target removed.
3208         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3209         These are now handled by generic magic from
3210         libpthread-static-only-routines being set.
3212 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3214         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3215         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3216         _POSIX_THREAD_PRIO_PROTECT): Define.
3217         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3218         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3219         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3221 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3223         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3224         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3225         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3226         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3227         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3228         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3229         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3231 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3233         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3235         * Makefile (libpthread-routines): Add pthread_setschedprio.
3236         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3237         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3238         * pthread_setschedprio.c: New file.
3240 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3242         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3243         * pthread_cancel.c (pthread_create): Likewise.
3245         * Makefile (libpthread-routines): Add vars.
3246         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3247         * init.c (__default_stacksize, __is_smp): Remove.
3248         * vars.c: New file.
3249         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3250         and define a wrapper macro.
3251         (PTHREAD_STATIC_FN_REQUIRE): Define.
3252         * allocatestack.c (__find_thread_by_id): Undefine.
3253         * pthread_create (__pthread_keys): Remove.
3254         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3255         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3256         PTHREAD_STATIC_FN_REQUIRE.
3258 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3260         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3261         parameter to REGISTER macro.
3263 2004-11-17  Roland McGrath  <roland@redhat.com>
3265         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3266         Make sure SIGCANCEL is blocked as well.
3268 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3270         * sysdeps/pthread/setxid.h: New file.
3271         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3272         (struct xid_command): Add forward decl.
3273         (struct pthread_functions): Change return type of __nptl_setxid hook
3274         to int.
3275         * pthreadP.h (__nptl_setxid): Change return type to int.
3276         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3277         calling thread, return its return value and set errno on failure.
3278         * descr.h (struct xid_command): Change id type to long array.
3280         * Makefile: Add rules to build and test tst-setuid1 and
3281         tst-setuid1-static.
3282         * tst-setuid1.c: New test.
3283         * tst-setuid1-static.c: New test.
3285 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3287         * Makefile (tests): Add tst-exit3.
3288         * tst-exit3.c: New test.
3290 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3292         * Makefile (tests): Add tst-exit2.
3293         * tst-exit2.c: New file.
3295 2004-11-09  Roland McGrath  <roland@redhat.com>
3297         [BZ #530]
3298         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3299         here, before calling clone.
3300         * pthread_create.c (start_thread): Don't do it here.
3302 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3304         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3306 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3308         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3309         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3310         assembler warning.
3312 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3314         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3315         if sched_priority is not between minprio and maxprio.
3317 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3319         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3320         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3322         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3323         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3325 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3327         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3328         not-cancelable I/O functions.
3330 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3332         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3333         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3334         make sure 2 is stored in the futex and we looked at the old value.
3335         Fix a few other problems to return the correct value.
3337 2004-10-14  Richard Henderson  <rth@redhat.com>
3339         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3340         make gcc4 happy.
3342 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3344         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3345         of pthread-functions.h and pthreaddef.h.
3346         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3349         Change __data.__nwaiters from int to unsigned int.
3351         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3352         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3354         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3355         before return type.
3357         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3358         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3360 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3362         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3363         test fails, remove message queue.
3364         (tf_msgsnd): Likewise.
3366 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3368         * tst-clock1.c: Change #ifdef to #if defined.
3369         * tst-clock2.c: Likewise.
3370         * tst-cond11.c: Likewise.
3372         * sysdeps/pthread/timer_create.c (timer_create): Use
3373         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3374         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3375         THREAD_CPUTIME.
3377 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3379         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3380         _POSIX_THREAD_CPUTIME): Define to 0.
3382 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3384         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3385         and _POSIX_THREAD_CPUTIME to zero.
3386         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3387         * tst-barrier2.c: Fix testing for POSIX feature.
3388         * tst-clock1.c: Likewise.
3389         * tst-clock2.c: Likewise.
3390         * tst-cond11.c: Likewise.
3391         * tst-cond4.c: Likewise.
3392         * tst-cond6.c: Likewise.
3393         * tst-flock2.c: Likewise.
3394         * tst-mutex4.c: Likewise.
3395         * tst-mutex9.c: Likewise.
3396         * tst-rwlock12.c: Likewise.
3397         * tst-rwlock4.c: Likewise.
3398         * tst-signal1.c: Likewise.
3399         * tst-spin2.c: Likewise.
3400         * sysdeps/pthread/posix-timer.h: Likewise.
3401         * sysdeps/pthread/timer_create.c: Likewise.
3402         * sysdeps/pthread/timer_routines.c: Likewise.
3404 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3406         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3407         (__lll_mutex_timedlock_wait): Address futex correctly.
3409         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3410         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3411         make sure 2 is stored in the futex and we looked at the old value.
3412         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3413         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3414         which might very well made the code not working at all before.
3415         [BZ #417]
3417 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3419         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3420         allow SIGSETXID to be sent.
3421         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3422         for SIGSETXID to be defined.
3423         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3424         SIGSETXID cannot be blocked.
3426         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3427         Add __extension__ to long long types.
3428         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3429         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3430         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3431         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3432         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3433         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3434         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3436 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3438         * descr.h (struct pthread): Add stopped_start field.
3439         * sysdeps/pthread/createthread.c (create_thread): Set
3440         start_stopped flag in descriptor for new thread appropriately.
3441         * pthread_create.c (start_thread): Only take lock to be stopped on
3442         startup if stopped_start flag says so.
3444 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3446         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3447         is created detached and if yes, do not try to free the stack in case
3448         the thread creation failed.
3449         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3450         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3451         case there has been no error.  [BZ #405]
3453         * pthread_create.c (start_thread): Don't wait for scheduler data
3454         etc to be set at the beginning of the function.  The cancellation
3455         infrastructure must have been set up.  And enable async
3456         cancellation before potentially going to sleep.  [BZ #401]
3458 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3460         * Versions: Remove exports for pthread_set*id_np functions.
3461         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3462         for now.
3463         * Makefile: Don't build pthread_set*id code for now.
3465 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3467         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3468         internal use.
3469         * allocatestack.c (__nptl_setxid): New function.
3470         * descr.h (struct xid_command): Define type.
3471         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3472         (sighandler_setxid): New function.
3473         (__pthread_initialize_minimal): Register sighandler_setxid for
3474         SIGCANCEL.
3475         * pt-allocrtsig.c: Update comment.
3476         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3477         Declare __nptl_setxid.
3478         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3479         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3480         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3481         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3482         and pthread_setresuid_np.
3483         * pthread_setgid_np.c: New file.
3484         * pthread_setuid_np.c: New file.
3485         * pthread_setegid_np.c: New file.
3486         * pthread_seteuid_np.c: New file.
3487         * pthread_setregid_np.c: New file.
3488         * pthread_setreuid_np.c: New file.
3489         * pthread_setresgid_np.c: New file.
3490         * pthread_setresuid_np.c: New file.
3491         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3492         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3493         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3494         and pthread_setresuid_np.
3495         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3496         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3497         pthread_setregid, and pthread_setresgid.
3499 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3501         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3502         ENOMEM when out of memory.
3504 2004-09-10  Roland McGrath  <roland@redhat.com>
3506         [BZ #379]
3507         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3508         code, since we don't try to use the broken CLONE_STOPPED any more.
3509         * pthread_create.c (start_thread): Likewise.
3511 2004-09-15  Richard Henderson  <rth@redhat.com>
3513         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3515 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3517         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3518         (__libc_unwind_longjmp): Delete macro and declare as function.
3519         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3520         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3521         nptl directory.
3522         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3523         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3524         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3526 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3528         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3529         for __USE_XOPEN2K.
3530         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3531         types also for __USE_XOPEN2K.
3532         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3533         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3534         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3535         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3536         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3537         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3538         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3539         [BZ #320]
3541 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3543         * sysdeps/pthread/pthread.h
3544         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3545         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3546         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3547         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3548         [BZ #375]
3550 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3552         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3553         PSEUDO to be used with . prefix.
3555         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3556         Use atomic_increment instead of atomic_exchange_and_add.
3557         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3558         Likewise.
3559         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3560         Likewise.
3561         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3562         Likewise.
3564         * allocatestack.c (allocate_stack): Use atomic_increment_val
3565         instead of atomic_exchange_and_add.
3566         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3567         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3568         Likewise.
3569         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3570         Likewise.
3572         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3573         the initialization function might throw.
3575 2005-09-05  Richard Henderson  <rth@redhat.com>
3577         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3578         Move definition inside libpthread, libc, librt check.  Provide
3579         definition for rtld.
3581 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3583         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3584         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3585         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3586         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3587         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3588         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3589         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3590         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3591         * unwind.c: Use it.
3593         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3594         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3595         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3596         Likewise.
3597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3598         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3599         this is the last waiter, signal pthread_cond_destroy caller and
3600         avoid using the pthread_cond_t structure after unlock.
3601         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3602         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3603         Read clock type from the least significant bits of __nwaiters instead
3604         of __clock.
3605         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3606         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3608 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3610         [BZ #342]
3611         * Makefile (tests): Add tst-cond20 and tst-cond21.
3612         * tst-cond20.c: New test.
3613         * tst-cond21.c: New test.
3614         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3615         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3616         it unsigned int.
3617         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3618         Likewise.
3619         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3620         (pthread_cond_t): Likewise.
3621         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3622         Likewise.
3623         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3624         Likewise.
3625         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3626         Likewise.
3627         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3628         (cond_nwaiters): New.
3629         (clock_bits): New.
3630         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3631         if there are waiters not signalled yet.
3632         Wait until all already signalled waiters wake up.
3633         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3634         __nwaiters.  If pthread_cond_destroy has been called and this is the
3635         last waiter, signal pthread_cond_destroy caller and avoid using
3636         the pthread_cond_t structure after unlock.
3637         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3638         decrement it when leaving.  If pthread_cond_destroy has been called
3639         and this is the last waiter, signal pthread_cond_destroy caller.
3640         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3641         Likewise.  Read clock type from the least significant bits of
3642         __nwaiters instead of __clock.
3643         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3644         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3645         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3646         clock type just from the last COND_CLOCK_BITS bits of value.
3647         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3648         instead of __clock, just from second bit of condattr's value.
3650 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3652         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3653         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3654         != 64.
3655         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3657 2004-08-15  Roland McGrath  <roland@frob.com>
3659         * pthread_atfork.c: Update copyright terms including special exception
3660         for these trivial files, which are statically linked into executables
3661         that use dynamic linking for the significant library code.
3663 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3665         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3666         pthread_rwlock_rdlock.
3667         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3668         Decrease __nr_readers_queued after reacquiring lock.
3669         * sysdeps/pthread/pthread_rwlock_timedrdlock
3670         (pthread_rwlock_timedrdlock): Likewise.
3671         Reported by Bob Cook <bobcook47@hotmail.com>.
3673 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3675         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3676         before pthread_barrier_wait.
3678 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3681         Remove unnecessary exception handling data.
3683 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3685         [BZ #284]
3686         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3687         instead of clockid_t.
3689 2004-07-21  Roland McGrath  <roland@redhat.com>
3691         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3693 2004-07-19  Roland McGrath  <roland@redhat.com>
3695         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3697 2004-07-02  Roland McGrath  <roland@redhat.com>
3699         * configure: Don't exit.
3701 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3703         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3704         (__pthread_cond_timedwait): Check for invalid nanosecond in
3705         timeout value.
3707 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3709         * Makefile: Add rules to build and run tst-fini1.
3710         * tst-fini1.c: New file.
3711         * tst-fini1mod.c: New file.
3713 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3715         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3716         if no cancellation support is needed.
3717         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3718         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3719         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3720         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3721         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3722         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3723         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3724         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3725         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3727         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3728         only if not already defined.
3730 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3733         constraint "m" instead of "0" for futex.
3735         * shlib-versions: Add powerpc64-.*-linux.*.
3737 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3739         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3740         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3741         for valid tv_nsec.
3742         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3743         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3744         bits.
3746 2004-06-29  Roland McGrath  <roland@redhat.com>
3748         * Banner: NPTL no longer has its own version number.
3749         * Makefile (nptl-version): Variable removed.
3750         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3751         using $(version), the glibc version number.
3753 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3755         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3756         Fix branch offset for a PLT entry.
3757         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3758         Likewise.
3759         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3760         Likewise.
3761         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3762         Likewise.
3763         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3764         Likewise.
3766 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3768         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3769         unconditionally.
3771 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3773         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3774         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3775         instead of tv_sec.
3776         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3777         (pthread_rwlock_timedrdlock): Likewise.
3779 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3781         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3782         Set __r7 to val, not mutex.
3784 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3786         * Makefile: Add rules to build tst-rwlock14.
3787         * tst-rwlock14.c: New file.
3789 2004-06-24  Boris Hu  <boris.hu@intel.com>
3791         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3792         check.
3793         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3795 2004-06-19  Andreas Jaeger  <aj@suse.de>
3797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3798         assembler in last patch.
3800 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3802         * sysdeps/pthread/pthread_cond_timedwait.c
3803         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3804         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3805         (__pthread_cond_timedwait): Check for invalid nanosecond in
3806         timeout value.
3807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3808         * tst-cond19.c: New file.
3809         * Makefile: Add rules to build and run tst-cond19.
3811 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3813         * tst-context1.c (GUARD_PATTERN): Defined.
3814         (tst_context_t): Define struct containing ucontext_t & guard words.
3815         (ctx): Declare as an array of tst_context_t.
3816         (fct): Verify uc_link & guard words are still valid.
3817         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
3819 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3821         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3822         Add __data.__futex field, reshuffle __data.__clock.
3823         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3824         (__pthread_cond_signal): Increment __futex at the same time as
3825         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3826         address of low 32-bits of __wakeup_seq to futex syscall.
3827         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3828         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3829         releasing internal lock to FUTEX_WAIT.
3830         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3831         (__pthread_cond_timedwait): Likewise.
3832         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3833         (FUTEX_CMP_REQUEUE): Define.
3834         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3835         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3836         Pass __futex value from before the unlock and __futex address instead
3837         of address of low 32-bits of __wakeup_seq to futex syscall.
3838         Fallback to FUTEX_WAKE all on any errors.
3840 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
3842         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3843         comment typo.
3844         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3845         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3846         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3847         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3848         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
3850 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3852         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3853         Add memory clobber to inline assembly.
3854         (__lll_mutex_trylock): Likewise.
3855         (__lll_mutex_cond_trylock): Likewise.
3857 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3859         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3860         Pass val argument as 6th system call argument in %r7.
3862 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3864         * Makefile (tests): Add tst-cond16.
3865         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3866         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3867         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3868         Add __data.__futex field, reshuffle __data.__clock.
3869         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3870         (__pthread_cond_signal): Increment __futex at the same time as
3871         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3872         address of low 32-bits of __wakeup_seq to futex syscall.
3873         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3874         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3875         releasing internal lock to FUTEX_WAIT.
3876         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3877         (__pthread_cond_timedwait): Likewise.
3878         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3879         (FUTEX_CMP_REQUEUE): Define.
3880         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3881         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3882         Pass __futex value from before the unlock and __futex address instead
3883         of address of low 32-bits of __wakeup_seq to futex syscall.
3884         Fallback to FUTEX_WAKE all on any errors.
3885         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3886         Define.
3887         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3888         internally.  Return non-zero if error, zero if success.
3889         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3890         Add __data.__futex field, reshuffle __data.__clock.
3891         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3892         Define.
3893         (lll_futex_requeue): Add val argument, return 1 unconditionally
3894         for the time being.
3895         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3896         Add __data.__futex field, reshuffle __data.__clock.
3897         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3898         Define.
3899         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3900         internally.  Return non-zero if error, zero if success.
3901         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3902         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3903         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3904         Define.
3905         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3906         internally.  Return non-zero if error, zero if success.
3907         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3908         Add __data.__futex field, reshuffle __data.__clock.
3909         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3910         Define.
3911         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3912         internally.  Return non-zero if error, zero if success.
3913         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3914         Add __data.__futex field, reshuffle __data.__clock.
3915         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3916         Add __data.__futex field, reshuffle __data.__clock.
3917         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3918         Increment __futex at the same time as __wakeup_seq or __total_seq.
3919         Pass address of __futex instead of address of low 32-bits of
3920         __wakeup_seq to futex syscall.
3921         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3922         Pass __futex value from before releasing internal lock
3923         to FUTEX_WAIT.
3924         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3925         Likewise.  Avoid unnecessary shadowing of variables.
3926         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3927         Set __futex to 2 * __total_seq.  Pass __futex value from before the
3928         unlock and __futex address instead of address of low 32-bits of
3929         __wakeup_seq to futex_requeue macro, adjust for new return value
3930         meaning.
3931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3932         (__pthread_cond_signal): Increment __futex at the same time as
3933         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3934         address of low 32-bits of __wakeup_seq to futex syscall.
3935         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3936         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3937         releasing internal lock to FUTEX_WAIT.
3938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3939         (__pthread_cond_timedwait): Likewise.
3940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3941         (FUTEX_CMP_REQUEUE): Define.
3942         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3943         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3944         Pass __futex value from before the unlock and __futex address instead
3945         of address of low 32-bits of __wakeup_seq to futex syscall.
3946         Fallback to FUTEX_WAKE all on any errors.
3948 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3950         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3951         Add nop to align the end of critical section.
3952         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3954 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3956         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3957         Add __broadcast_seq field.
3958         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3959         all waiters as woken with woken_seq and bump broadcast counter.
3960         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3961         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
3962         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3963         Comment typo fixes.  Avoid returning -ETIMEDOUT.
3965 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
3967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3968         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3969         Reported by Kaz Kojima.
3971 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
3973         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3975 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3977         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3978         __broadcast_seq with bc_seq after acquiring internal lock instead of
3979         before it.
3981 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
3983         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3984         compilation.
3985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3986         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3987         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3988         (pthread_cond_t): Add __data.__broadcast_seq field.
3989         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3990         (FRAME_SIZE): Define.
3991         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
3992         Comment typo fixes.
3993         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3994         Define.
3995         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
3996         typo fixes.
3997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3998         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
3999         fixes.
4001 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4003         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4004         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4005         Add __broadcast_seq field.
4006         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4007         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4008         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4009         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4010         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4011         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4012         all waiters as woken with woken_seq and bump broadcast counter.
4013         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4014         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4015         __broadcast_seq field.
4016         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4017         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4018         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4019         * pthread_cond_init.c: Initialize __broadcast_seq field.
4020         * Makefile (tests): Add tst-cond17 and tst-cond18.
4021         Add .NOTPARALLEL goal.
4022         * tst-cond16.c: New file.  From Jakub.
4023         * tst-cond17.c: New file.  From Jakub.
4024         * tst-cond18.c: New file.  From Jakub.
4026 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4028         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4029         unwind info.
4031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4032         Parametrize frame size.  Correct some unwind info.
4033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4035 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4037         * tst-stack3.c: Note testing functionality beyond POSIX.
4039 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4041         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4042         Change conditional from ifdef to if.
4044 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4046         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4047         SYSDEP_CANCEL_ERROR): Define.
4048         (PSEUDO): Use it.
4050 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4052         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4054 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4056         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4058 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4060         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4061         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4062         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4063         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4065 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4067         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4068         thread has all signals blocked.
4070 2004-04-18  Andreas Jaeger  <aj@suse.de>
4072         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4073         (SEM_VALUE_MAX): Add missing brace.
4075 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4077         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4078         in rt subdir.
4079         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4080         * sysdeps/pthread/tst-mqueue8x.c: New test.
4081         * tst-cancel4.c: Update comment about message queues.
4083         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4084         return it_value { 0, 0 }.
4085         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4086         like SIGEV_SIGNAL.
4087         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4088         assertion for SIGEV_NONE.
4089         (thread_attr_compare): Compare all attributes, not just a partial
4090         subset.
4092 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4094         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4096 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4098         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4099         Just use a plain number.
4100         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4101         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4102         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4103         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4104         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4105         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4106         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4108 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4110         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4111         frame info.
4112         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4114 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4116         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4117         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4118         of calling sigwaitinfo.
4120 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4122         * allocatestack.c (allocate_stack): Set reported_guardsize
4123         unconditionally.
4124         * pthread_getattr_np.c (pthread_getattr_np): Use
4125         reported_guardsize instead of guardsize.
4126         * descr.h (struct pthread): Add reported_guardsize field.
4128 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4130         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4132 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4134         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4136 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4138         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4139         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4140         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4141         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4142         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4143         Define.
4144         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4145         (_POSIX_MESSAGE_PASSING): Define.
4146         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4147         (_POSIX_MESSAGE_PASSING): Define.
4148         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4149         (_POSIX_MESSAGE_PASSING): Define.
4151 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4153         * tst-context1.c (fct): Check whether correct stack is used.
4155 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4157         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4158         matching constraints for asm mem parameters.
4160         * tst-clock2.c (tf): Don't define unless needed.
4162 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4164         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4165         $(gnulib).
4167 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4169         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4170         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4171         * pthreadP.h: Declare __nptl_deallocate_tsd.
4172         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4173         Adjust caller.
4175         * Makefile (tests): Add tst-tsd5.
4176         * tst-tsd5.c: New file.
4178 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4180         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4181         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4182         is SHLIB_COMPAT check.
4183         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4184         (__pthread_attr_getaffinity_old): Likewise.
4185         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4186         (__pthread_getaffinity_old): Likewise.
4187         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4188         (__pthread_setaffinity_old): Likewise.
4190 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4192         * allocatestack.c (_make_stacks_executable): Call
4193         _dl_make_stack_executable first.
4195 2004-03-24  Roland McGrath  <roland@redhat.com>
4197         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4198         constraint instead of "0".
4200 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4202         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4203         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4205         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4206         code to avoid warning.
4208 2004-03-24  Andreas Jaeger  <aj@suse.de>
4210         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4211         (__pthread_attr_setaffinity_old): Remove const.
4213 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4215         * sysdeps/unix/sysv/linux/smp.h: New file.
4216         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4217         * init.c: Define __is_smp.
4218         (__pthread_initialize_minimal_internal): Call is_smp_system to
4219         initialize __is_smp.
4220         * pthreadP.h: Declare __is_smp.
4221         Define MAX_ADAPTIVE_COUNT is necessary.
4222         * pthread_mutex_init.c: Add comment regarding __spins field.
4223         * pthread_mutex_lock.c: Implement adaptive mutex type.
4224         * pthread_mutex_timedlock.c: Likewise.
4225         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4226         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4227         Add __spins field.
4228         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4229         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4230         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4231         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4232         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4233         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4234         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4235         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4236         lll_mutex_cond_trylock.
4237         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4238         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4239         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4240         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4241         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4242         Define BUSY_WAIT_NOP.
4243         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4244         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4246         * tst-mutex5.c: Add support for testing adaptive mutexes.
4247         * tst-mutex7.c: Likewise.
4248         * tst-mutex5a.c: New file.
4249         * tst-mutex7a.c: New file.
4250         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4253         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4254         vgettimeofday call might destroy the content.
4256         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4257         @pause in the loop.
4259         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4260         No need to restrict type of ret.  Make it int.  Add comment.
4262         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4263         Remove unnecessary setne instruction.
4265 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4267         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4268         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4269         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4270         If realloc fails, break out of the loop.
4272 2004-03-20  Andreas Jaeger  <aj@suse.de>
4274         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4275         (__pthread_setaffinity_old): Fix interface.
4276         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4277         (__pthread_getaffinity_old): Likewise.
4279         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4280         (__pthread_setaffinity_new): Remove duplicate declaration.
4282 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4284         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4285         the return value to a safe register.
4286         (CDISABLE): Set the function argument correctly.
4288 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4290         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4291         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4292         Rewrite so that only one locked memory operation per round is needed.
4293         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4294         (pthread_barrier_wait): After wakeup, release lock only when the
4295         last thread stopped using the barrier object.
4296         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4297         (__pthread_cond_wait): Don't store mutex address if the current
4298         value is ~0l.  Add correct cleanup support and unwind info.
4299         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4300         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4301         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4302         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4303         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4304         Add correct cleanup support and unwind info.
4305         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4306         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4307         information for syscall wrappers.
4309 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4311         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4312         cpusetsize field, remove next.
4313         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4314         parameter for size of the CPU set.
4315         (pthread_setaffinity_np): Likewise.
4316         (pthread_attr_getaffinity_np): Likewise.
4317         (pthread_attr_setaffinity_np): Likewise.
4318         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4319         interface change, keep compatibility code.
4320         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4321         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4322         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4323         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4324         __pthread_getaffinity_np.
4325         * Versions: Add version for changed interfaces.
4326         * tst-attr3.c: Adjust test for interface change.
4327         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4328         increasing buffer sizes.
4329         * pthread_attr_destroy.c: Remove unused list handling.
4330         * pthread_attr_init.c: Likewise.
4332 2004-03-17  Roland McGrath  <roland@redhat.com>
4334         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4335         first argument to clock_getres so we ever enable kernel timers.
4337 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4339         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4341 2004-03-12  Richard Henderson  <rth@redhat.com>
4343         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4344         oldvalue from CENABLE to CDISABLE.
4346 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4348         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4349         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4350         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4351         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4353 2004-03-11  Richard Henderson  <rth@redhat.com>
4355         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4356         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4357         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4359 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4361         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4362         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4363         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4365 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4367         * forward.c (__pthread_cond_broadcast_2_0,
4368         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4369         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4370         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4372 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4374         * sysdeps/sh/tcb-offsets.sym: Add PID.
4375         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4376         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4378 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4380         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4381         include <sysdep-cancel.h>, vfork is no cancellation point.
4382         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4383         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4384         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4386 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4388         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4389         libc_hidden_def.
4390         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4391         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4392         Likewise.
4393         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4394         Likewise.
4395         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4396         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4397         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4398         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4399         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4401         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4402         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4403         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4404         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4405         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4406         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4408         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4409         a local register for saving old PID.  Negate PID in parent upon exit.
4411         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4412         tcb-offsets.h.
4413         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4414         before syscall, set to the old value in the parent afterwards.
4415         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4416         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4417         tcb-offsets.h.
4418         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4419         before syscall, set to the old value in the parent afterwards.
4420         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4421         * sysdeps/s390/tcb-offsets.sym: Add PID.
4423         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4424         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4425         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4426         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4427         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4428         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4430 2004-03-10  Andreas Schwab  <schwab@suse.de>
4432         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4433         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4434         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4436 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4438         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4439         * tst-cancel21.c (do_one_test): Likewise.
4440         Reported by Gordon Jin <gordon.jin@intel.com>.
4442 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4444         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4445         if non-zero and set to INT_MIN if zero.
4446         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4447         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4448         (SAVE_PID, RESTORE_PID): Define.
4449         (__vfork): Use it.
4450         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4451         Use relative path to avoid including NPTL i386/vfork.S.
4452         (SAVE_PID, RESTORE_PID): Define.
4453         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4454         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4455         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4456         tst-vfork2x.
4457         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4458         * tst-vfork1.c: New test.
4459         * tst-vfork2.c: New test.
4460         * tst-vfork1x.c: New test.
4461         * tst-vfork2x.c: New test.
4463 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4465         * sysdeps/i386/tcb-offsets.sym: Add PID.
4466         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4467         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4468         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4470 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4472         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4474 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4476         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4477         _rtld_global_ro.
4479 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4481         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4482         _rtld_global_ro.
4484         * tst-once4.c: Remove unnecessary macro definition.
4486         * tst-mutex7.c (do_test): Limit thread stack size.
4487         * tst-once2.c (do_test): Likewise.
4488         * tst-tls3.c (do_test): Likewise.
4489         * tst-tls1.c (do_test): Likewise.
4490         * tst-signal3.c (do_test): Likewise.
4491         * tst-kill6.c (do_test): Likewise.
4492         * tst-key4.c (do_test): Likewise.
4493         * tst-join4.c (do_test): Likewise.
4494         * tst-fork1.c (do_test): Likewise.
4495         * tst-context1.c (do_test): Likewise.
4496         * tst-cond2.c (do_test): Likewise.
4497         * tst-cond10.c (do_test): Likewise.
4498         * tst-clock2.c (do_test): Likewise.
4499         * tst-cancel10.c (do_test): Likewise.
4500         * tst-basic2.c (do_test): Likewise.
4501         * tst-barrier4.c (do_test): Likewise.
4503 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4505         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4507 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4510         (__pthread_cond_timedwait): Optimize wakeup test.
4511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4512         (__pthread_cond_wait): Likewise.
4513         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4514         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4515         Likewise.
4517 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4519         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4520         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4521         the atomic instruction needed.
4522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4523         (__lll_mutex_lock_wait): Likewise.
4525 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4527         * Makefile (tests): Add tst-cond14 and tst-cond15.
4528         * tst-cond14.c: New file.
4529         * tst-cond15.c: New file.
4531 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4533         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4534         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4535         needs to be implemented differently to be useful.
4537 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4539         * pthread_attr_setschedparam.c: Don't test priority against limits
4540         here.  Set ATTR_FLAG_SCHED_SET flag.
4541         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4542         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4543         from parent thread to child.  If attribute is used and scheduling
4544         parameters are not inherited, copy parameters from attribute or
4545         compute them.  Check priority value.
4546         * pthread_getschedparam.c: If the parameters aren't known yet get
4547         them from the kernel.
4548         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4549         ATTR_FLAG_POLICY_SET flag for thread.
4550         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4551         and ATTR_FLAG_POLICY_SET.
4553         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4555         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4556         fail if stack address hasn't been set.  Just return 0.
4558 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4560         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4561         libpthread for the files in this list.
4562         (CFLAGS-tst-unload): Removed.
4563         * tst-unload.c (do_test): Don't use complete path for
4564         LIBPHREAD_SO.
4566         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4567         tst-_res1mod2.
4569 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4571         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4572         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4573         operation per round is needed.
4574         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4575         (__lll_mutex_lock_wait): Likewise.
4577 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4579         * tst-cancel9.c (cleanup): Don't print to stderr.
4581 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4583         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4585 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4587         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4588         (__syscall_error_handler2): Call CDISABLE.
4589         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4590         (__syscall_error_handler2): Call CDISABLE.
4592         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4593         Release lock before the loop, don't reacquire it.
4595         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4597 2004-02-19  Andreas Schwab  <schwab@suse.de>
4599         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4600         Fix last change.
4602 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4604         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4605         (pthread_barrier_wait): After wakeup, release lock only when the
4606         last thread stopped using the barrier object.
4607         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4608         (pthread_barrier_wait): Likewise.
4609         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4610         Likewise.
4611         * Makefile (tests): Add tst-barrier4.
4612         * tst-barrier4.c: New file.
4614         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4615         (__pthread_cond_timedwait): Perform timeout test while holding
4616         internal lock to prevent wakeup race.
4617         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4618         * sysdeps/pthread/pthread_cond_timedwait.c
4619         (__pthread_cond_timedwait): Likewise.
4620         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4621         (__pthread_cond_timedwait): Likewise.
4623 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4625         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4626         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4627         * Makefile (tests): Add tst-rwlock13.
4628         * tst-rwlock13.c: New test.
4630 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4633         (__condvar_tw_cleanup): Little optimization.
4634         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4636 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4638         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4639         libpthread as "lib" parameter to SHLIB_COMPAT.
4640         (__novmx_siglongjmp): Fix typo in function name.
4641         (__novmx_longjmp): Fix typo in function name.
4643 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4645         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4646         __builtin_expect.
4648         * sysdeps/generic/pt-longjmp.c: Moved to...
4649         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4651 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4653         * Makefile (libpthread-routines): Add pt-cleanup.
4654         * pt-longjmp.c: Removed.
4655         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4656         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4657         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4658         Version longjmp, siglongjmp for GLIBC_2.3.4.
4659         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4661 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4663         * sysdeps/pthread/pthread_cond_timedwait.c
4664         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4665         Reuse code.  Add __builtin_expects.
4667         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4668         (__pthread_cond_timedwait): Get internal lock in case timeout has
4669         passed before the futex syscall.
4670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4672 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4674         * allocatestack.c: Pretty printing.
4676         * sysdeps/pthread/createthread.c (create_thread): Don't add
4677         CLONE_DETACHED bit if it is not necessary.
4679 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4681         * pthread_getattr_np.c: Include ldsodefs.h.
4683 2004-01-16  Richard Henderson  <rth@redhat.com>
4685         * allocatestack.c: Don't declare __libc_stack_end.
4686         * init.c (__pthread_initialize_minimal_internal): Likewise.
4687         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4689 2004-01-15  Richard Henderson  <rth@redhat.com>
4691         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4692         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4693         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4694         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4695         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4696         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4697         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4698         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4700 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4702         * init.c (pthread_functions): Make array const.
4704 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4706         * allocatestack.c (__make_stacks_executable): Change interface.
4707         Check parameters.  Pass parameter on to libc counterpart.
4708         * pthreadP.h: Change declaration.
4710 2004-01-13  Richard Henderson  <rth@redhat.com>
4712         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4713         prototype form.
4714         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4715         Likewise.
4717         * sysdeps/alpha/Makefile: New file.
4718         * sysdeps/alpha/tcb-offsets.sym: New file.
4719         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4720         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4722         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4723         on powerpc version.
4725 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4727         * Makefile (tests): Add tst-backtrace1.
4728         * tst-backtrace1.c: New test.
4730 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4732         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4733         register as second parameter to the REGISTER macro.
4734         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4735         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4736         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4737         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4738         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4739         of thread register as second parameter to REGISTER macro in 64 case.
4741 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4744         (CFLAGS-getpid.o): Defined.
4745         (CFLAGS-getpid.os): Defined.
4747 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4749         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4750         returned for main thread does not overlap with any other VMA.
4751         Patch by Jakub Jelinek.
4753 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4755         * tst-raise1.c: Include stdio.h.
4757 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4759         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4760         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4761         If pid is 0, set it to selftid.
4762         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4763         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4764         != 0, return self->tid without doing a syscall.
4765         * descr.h (struct pthread): Move pid field after tid.
4767         * Makefile (tests): Add tst-raise1.
4768         * tst-raise1.c: New file.
4770 2003-12-23  Roland McGrath  <roland@redhat.com>
4772         * tst-oddstacklimit.c: New file.
4773         * Makefile (tests): Add it.
4774         (tst-oddstacklimit-ENV): New variable.
4776         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4777         value up to page size for __default_stacksize.
4779 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4781         * Makefile (tests): Add tst-eintr5.
4782         * tst-eintr5.c: New file.
4784         * eintr.c (eintr_source): Prevent sending signal to self.
4786         * tst-eintr2.c (tf1): Improve error message.
4788 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4790         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4791         * sysdeps/unix/sysv/linux/getpid.c: New file.
4792         * pthread_cancel.c: Add comment explaining use of PID field.
4793         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4794         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4795         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4796         temporarily to signal the field must not be relied on and updated
4797         by getpid().
4798         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4799         temporarily negative.
4800         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4802 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4804         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4805         (eintr_source): If ARG != NULL, use pthread_kill.
4806         * tst-eintr1.c: Adjust for this change.
4807         * tst-eintr2.c: Likewise.
4808         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4809         * tst-eintr3.c: New file.
4810         * tst-eintr4.c: New file.
4812 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4814         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4815         if CANCELSTATE_BITMASK is set.
4816         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4817         Likewise.
4819         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4820         (tests-reverse): Add tst-cancel23.
4821         * tst-cancel22.c: New test.
4822         * tst-cancel23.c: New test.
4824 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
4826         * tst-eintr1.c: Better error messages.
4828         * Makefile (tests): Add tst-eintr2.
4829         * tst-eintr2.c: New file.
4831 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
4833         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4834         (CFLAGS-tst-cancelx21.c): Set.
4835         * tst-cancel21.c: New test.
4836         * tst-cancelx21.c: New test.
4838         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
4839         comparison operand.
4840         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4841         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
4842         * pt-longjmp.c: Include jmpbuf-unwind.h.
4843         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4844         _JMPBUF_UNWINDS.  Adjust compared pointers.
4845         * init.c (__pthread_initialize_minimal_internal): Initialize
4846         pd->stackblock_size.
4847         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4848         * sysdeps/alpha/jmpbuf-unwind.h: New file.
4849         * sysdeps/i386/jmpbuf-unwind.h: New file.
4850         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4851         * sysdeps/s390/jmpbuf-unwind.h: New file.
4852         * sysdeps/sh/jmpbuf-unwind.h: New file.
4853         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4854         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4855         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4856         (_JMPBUF_CFA_UNWINDS): Remove.
4857         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4859 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
4861         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4862         (CFLAGS-tst-cancelx20.c): Set.
4863         * tst-cancel20.c: New test.
4864         * tst-cancelx20.c: New test.
4866 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
4868         * init.c (__pthread_initialize_minimal_internal): Don't treat
4869         architectures with separate register stack special here when
4870         computing default stack size.
4872 2003-12-17  Roland McGrath  <roland@redhat.com>
4874         * Makefile (tst-cancelx7-ARGS): New variable.
4875         Reportd by Greg Schafer <gschafer@zip.com.au>.
4877 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
4879         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
4880         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4881         (tst-stack3-ENV): Set.
4882         ($(objpfx)tst-stack3-mem): New.
4883         * tst-stack3.c: New test.
4885 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
4887         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4888         Add unwind directives.  Drop unused .regstk directive.
4889         (_fini_EPILOG_BEGINS): Add unwind directives.
4891 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
4893         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4894         Assume parameter is a pointer.
4895         (lll_futex_wake): Likewise.
4896         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4897         Likewise.
4898         (lll_futex_wake): Likewise.
4899         Reported by Boris Hu.
4900         * sysdeps/unix/sysv/linux/unregister-atfork.c
4901         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4903         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4905 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
4907         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4908         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4909         __rtld_lock_initialize for ld.so lock.
4910         Patch in part by Adam Li <adam.li@intel.com>.
4912 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
4914         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4915         in $(gnulib).  Also, remove stale comment.
4917 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
4919         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4920         advantage of new syscall stub and optimize accordingly.
4922         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4923         from SYS_futex, to match expectations of
4924         sysdep.h:DO_INLINE_SYSCALL.
4925         (lll_futex_clobbers): Remove.
4926         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4927         (lll_futex_wake): Likewise.
4928         (lll_futex_requeue): Likewise.
4929         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4930         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4931         Jelinek).
4932         (__lll_mutex_lock): Likewise.
4933         (__lll_mutex_cond_lock): Likewise.
4934         (__lll_mutex_timed_lock): Likewise.
4935         (__lll_mutex_unlock): Likewise.
4936         (__lll_mutex_unlock_force): Likewise.
4938         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4939         comes before the include of <sysdep.h>.
4940         (THREAD_SELF_SYSINFO): New macro.
4941         (THREAD_SYSINFO): Likewise.
4942         (INIT_SYSINFO): New macro.
4943         (TLS_INIT_TP): Call INIT_SYSINFO.
4945         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4947         * sysdeps/pthread/createthread.c (create_thread): Use
4948         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4949         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4950         THREAD_SELF_SYSINFO instead of open code.
4951         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4952         (THREAD_SYSINFO): Likewise.
4954         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4956         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4958 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
4960         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4961         instead of .init.  Patch by David Mosberger.
4963 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
4965         * sysdeps/pthread/configure.in: Remove broken declaration in C
4966         cleanup handling check.
4968 2003-11-30  Andreas Jaeger  <aj@suse.de>
4970         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4971         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4972         Likewise.
4974 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
4976         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4977         * pthread_attr_destroy.c: Include shlib-compat.h.
4978         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4979         is set in iattr->flags.
4980         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4982 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
4984         * Makefile (distribute): Add tst-cleanup4aux.c.
4986         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
4987         include.
4989 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
4991         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4992         pthread_cond_signal.
4994         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4995         store mutex address if the current value is ~0l.
4996         * sysdeps/pthread/pthread_cond_timedwait.c
4997         (__pthread_cond_timedwait): Likewise.
4998         * sysdeps/pthread/pthread_cond_broadcast.c
4999         (__pthread_cond_broadcast): Don't use requeue for pshared
5000         condvars.
5002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5003         (__pthread_cond_wait): Don't store mutex address if the current
5004         value is ~0l.
5005         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5006         (__pthread_cond_timedwait): Likewise.
5007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5008         (__pthread_cond_broadcast): Don't use requeue for pshared
5009         condvars.
5011         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5012         element with ~0l for pshared condvars, with NULL otherwise.
5014         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5015         (__pthread_cond_wait): Don't store mutex address if the current
5016         value is ~0l.
5017         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5018         (__pthread_cond_timedwait): Likewise.
5019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5020         (__pthread_cond_broadcast): Don't use requeue for pshared
5021         condvars.
5023         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5024         * tst-cond12.c: New file.
5025         * tst-cond13.c: New file.
5027 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5029         * sysdeps/pthread/configure.in: Make missing forced unwind support
5030         fatal.
5032 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5034         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5036 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5038         * Makefile: Add magic to clean up correctly.
5040 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5042         * unwind.c (FRAME_LEFT): Define.
5043         (unwind_stop): Handle old style cleanups here.
5044         (__pthread_unwind): Handle old style cleanups only if
5045         !HAVE_FORCED_UNWIND.
5046         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5047         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5048         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5049         ($(objpfx)tst-cleanupx4): Likewise.
5050         * tst-cleanup4.c: New test.
5051         * tst-cleanup4aux.c: New.
5052         * tst-cleanupx4.c: New test.
5054 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5056         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5057         lll_mutex_*lock macros to skip atomic operations on some archs.
5059 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5061         * sysdeps/pthread/tst-timer.c (main): Initialize
5062         sigev2.sigev_value as well.
5064 2003-10-15  Roland McGrath  <roland@redhat.com>
5066         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5067         is missing.
5068         * sysdeps/pthread/configure: Regenerated.
5070 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5072         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5073         locking macros.  No distinction between normal and mutex locking
5074         anymore.
5075         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5076         Merge bits from lowlevelmutex.S we still need.
5077         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5078         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5079         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5080         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5081         new mutex implementation.
5082         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5083         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5084         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5085         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5086         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5087         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5088         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5089         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5090         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5091         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5092         symbol for entry point to avoid cancellation.
5094 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5096         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5097         changes.
5098         (SAVE_OLDTYPE_0): Fix a typo.
5100 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5102         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5103         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5105 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5107         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5108         correct offset.
5110 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5112         * Makefile (tests): Add tst-cancel19.
5113         * tst-cancel19.c: New test.
5115 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5117         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5118         restoring of the old cancellation type.
5120 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5122         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5124 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5126         * sysdeps/pthread/malloc-machine.h: New file
5128 2003-09-24  Roland McGrath  <roland@redhat.com>
5130         * allocatestack.c (__make_stacks_executable): Don't ignore return
5131         value from _dl_make_stack_executable.
5133 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5135         * allocatestack.c (__make_stacks_executable): Also change
5136         permission of the currently unused stacks.
5138         * allocatestack.c (change_stack_perm): Split out from
5139         __make_stacks_executable.
5140         (allocate_stack): If the required permission changed between the time
5141         we started preparing the stack and queueing it, change the permission.
5142         (__make_stacks_executable): Call change_stack_perm.
5144         * Makefile: Build tst-execstack-mod locally.
5145         * tst-execstack-mod.c: New file.
5147 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5149         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5151 2003-09-23  Roland McGrath  <roland@redhat.com>
5153         * tst-execstack.c: New file.
5154         * Makefile (tests): Add it.
5155         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5156         (LDFLAGS-tst-execstack): New variable.
5158         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5159         whether to use PROT_EXEC for stack mmap.
5160         (__make_stacks_executable): New function.
5161         * pthreadP.h: Declare it.
5162         * init.c (__pthread_initialize_minimal_internal): Set
5163         GL(dl_make_stack_executable_hook) to that.
5165 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5167         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5168         recommendation from AMD re avoidance of lock prefix.
5170 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5172         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5173         lll_futex_timed_wait instead of lll_futex_wait.
5174         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5175         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5176         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5177         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5178         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5179         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5180         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5181         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5182         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5183         Completely revamp the locking macros.  No distinction between
5184         normal and mutex locking anymore.
5185         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5186         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5187         __lll_lock_timedwait): Fix prototypes.
5188         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5189         __lll_lock_timedwait): Likewise.
5190         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5191         macros, add __builtin_expect.
5192         (lll_mutex_timedlock): Likewise.  Fix return value.
5193         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5194         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5195         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5196         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5197         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5198         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5199         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5200         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5202 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5204         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5205         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5206         operation if possible.
5208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5209         like jumping over the lock prefix.
5211 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5213         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5214         locking macros.  No distinction between normal and mutex locking
5215         anymore.
5216         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5217         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5218         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5219         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5220         locking.  Merge bits from lowlevelmutex.S we still need.
5221         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5222         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5223         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5224         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5225         * Makefile (routines): Remove libc-lowlevelmutex.
5226         (libpthread-rountines): Remove lowlevelmutex.
5227         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5228         for new mutex implementation.
5229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5230         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5231         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5232         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5233         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5234         Likewise.
5235         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5236         Likewise.
5237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5238         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5239         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5240         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5241         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5243         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5244         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5245         Likewise.
5246         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5247         Likewise.
5248         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5251         Don't use requeue.
5252         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5253         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5255 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5257         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5258         in parameters of asm with output parameters.
5260         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5261         type of DECR parameter to int.
5262         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5264 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5266         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5267         guardsize for each thread.
5269 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5271         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5272         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5273         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5275         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5276         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5277         NULL.
5278         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5279         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5280         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5281         (pthread_getaffinity_np): Add hidden_def.
5283         * Makefile (tests): Add tst-attr3.
5284         * tst-attr3.c: New test.
5286         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5288 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5290         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5291         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5293 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5295         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5296         * tst-align.c: Include tst-stack-align.h.
5297         (tf, do_test): Use TEST_STACK_ALIGN macro.
5299 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5301         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5302         variable.
5304 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5306         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5307         stack-related values for the initial thread.
5309 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5311         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5313 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5315         * pthread_mutex_lock.c: Minor code rearrangements.
5317 2003-09-05  Roland McGrath  <roland@redhat.com>
5319         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5320         Instead, include ../nptl_db/db_info.c to do its magic.
5321         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5322         (__pthread_pthread_key_2ndlevel_size): Likewise.
5323         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5324         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5325         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5326         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5327         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5328         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5329         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5330         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5331         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5332         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5333         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5334         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5335         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5336         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5337         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5338         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5339         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5341 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5343         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5344         of pthread_t to be compatible with LT.
5345         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5346         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5347         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5348         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5349         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5350         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5351         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5353 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5355         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5357 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5359         * unwind-forcedunwind.c: Move to...
5360         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5361         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5362         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5363         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5364         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5365         * unwind.c: Include jmpbuf-unwind.h.
5366         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5368 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5370         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5371         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5372         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5373         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5374         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5375         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5376         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5377         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5378         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5379         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5380         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5381         function.
5382         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5383         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5384         * Makefile (tests): Add tst-stack2.
5385         * tst-stack2.c: New test.
5386         * tst-stack1.c: Include limits.h and sys/param.h.
5387         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5389         * pthread_condattr_setpshared.c: Include errno.h.
5390         (pthread_condattr_setpshared): Return EINVAL if pshared
5391         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5393         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5394         defined symbol for entry point to avoid cancellation.
5395         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5396         Likewise.
5397         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5398         Likewise.
5399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5400         Likewise.
5401         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5402         Likewise.
5403         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5404         Likewise.
5405         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5406         __close_nocancel, __read_nocancel, __write_nocancel,
5407         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5408         libpthread.so or librt.so, define to corresponding function
5409         without _nocancel suffix.
5410         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5411         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5412         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5414         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5416 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5418         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5419         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5421         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5422         in subsections has a symbol associated with it.
5424         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5425         defined symbol for entry point to avoid cancellation.
5426         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5428 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5430         * Makefile (tests): Add tst-tls5.
5431         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5432         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5433         ($(objpfx)tst-tls5): New.
5434         ($(objpfx)tst-tls6.out): Likewise.
5435         (tests): Depend on $(objpfx)tst-tls6.out.
5436         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5437         (do_test): Check pthread_self () return value alignment.
5438         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5439         (tf): Check pthread_self () return value alignment.
5440         * tst-tls5.c: New test.
5441         * tst-tls5.h: New.
5442         * tst-tls5mod.c: New.
5443         * tst-tls5moda.c: New.
5444         * tst-tls5modb.c: New.
5445         * tst-tls5modc.c: New.
5446         * tst-tls5modd.c: New.
5447         * tst-tls5mode.c: New.
5448         * tst-tls5modf.c: New.
5449         * tst-tls6.sh: New test.
5451         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5452         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5453         * init.c (pthread_functions): Initialize them.
5454         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5455         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5456         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5457         pthread_cond_timedwait@@GLIBC_2.3.2.
5459 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5461         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5462         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5463         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5464         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5465         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5466         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5468         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5470         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5471         _POSIX_THREAD_PRIORITY_SCHEDULING.
5472         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5474 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5476         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5477         nested function, use static inline function from libio.h.
5478         Code by Richard Henderson.
5480         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5481         weak.
5483 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5485         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5486         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5487         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5488         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5489         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5490         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5491         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5492         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5493         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5494         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5495         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5496         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5497         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5498         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5499         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5500         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5501         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5502         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5503         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5504         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5505         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5506         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5507         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5508         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5509         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5510         * sysdeps/sparc/tls.h: New file.
5511         * sysdeps/sparc/tcb-offsets.sym: New file.
5512         * sysdeps/sparc/Makefile: New file.
5513         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5514         * init.c [__sparc__] (__NR_set_tid_address): Define.
5516 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5518         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5519         _IO_release_lock): Define.
5521 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5523         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5524         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5526 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5528         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5529         (__pthread_cleanup_class): Add missing return types of member
5530         functions.
5532 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5534         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5535         (lll_mutex_unlock_force): Add memory barrier between store and futex
5536         syscall.
5538 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5540         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5541         tempmsg in first loop.
5543 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5545         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5546         _POSIX_THREAD_PRIORITY_SCHEDULING.
5547         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5549 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5551         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5552         (__rtld_lock_default_lock_recursive,
5553         __rtld_lock_default_unlock_recursive): Define.
5554         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5555         __rtld_lock_unlock_recursive): Define using
5556         GL(_dl_rtld_*lock_recursive).
5557         * init.c (__pthread_initialize_minimal_internal): Initialize
5558         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5559         Lock GL(_dl_load_lock) the same number of times as
5560         GL(_dl_load_lock) using non-mt implementation was nested.
5562         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5563         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5565 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5567         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5568         PIPE_BUF.
5570 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5572         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5574 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5576         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5577         to first syscall error check.  Move syscall error check for tkill
5578         into __ASSUME_CLONE_STOPPED #ifdef.
5580 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5582         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5583         is not defined, do explicit synchronization.
5584         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5585         is not defined also unlock pd->lock for non-debugging case in case
5586         it is necessary.
5587         * pthread_create.c (start_thread): Always get and release pd->lock
5588         if __ASSUME_CLONE_STOPPED is not defined.
5589         (start_thread_debug): Removed.  Adjust users.
5590         * allocatestack.c (allocate_stack): Always initialize lock if
5591         __ASSUME_CLONE_STOPPED is not defined.
5592         * Makefile (tests): Add tst-sched1.
5593         * tst-sched1.c: New file.
5595         * sysdeps/pthread/createthread.c (do_clone): Only use
5596         sched_setschduler and pass correct parameters.
5598 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5600         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5601         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5602         PTHREAD_STACK_MIN in comments.
5604 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5606         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5607         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5608         argument.
5609         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5610         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5611         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5612         (__pthread_cleanup_upto): Fix prototype.
5613         (_longjmp_unwind): Adjust caller.
5614         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5615         Change second argument to const struct pointer.
5616         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5617         * tst-sem9.c (main): Likewise.
5618         * unwind.c: Include string.h for strlen prototype.
5620 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5623         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5624         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5625         Define HAVE_CMOV.
5626         Patch by Nicholas Miell <nmiell@attbi.com>.
5628 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5630         * init.c (__pthread_initialize_minimal_internal): Initialize
5631         GL(dl_init_static_tls).
5632         * pthreadP.h (__pthread_init_static_tls): New prototype.
5633         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5634         New functions.
5635         * Makefile (tests): Add tst-tls4.
5636         (modules-names): Add tst-tls4moda and tst-tls4modb.
5637         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5638         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5639         tst-tls4modb.so.
5640         * tst-tls4.c: New file.
5641         * tst-tls4moda.c: New file.
5642         * tst-tls4modb.c: New file.
5644 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5646         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5647         before __timer_dealloc.
5648         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5649         Don't call list_unlink.
5651 2003-07-29  Roland McGrath  <roland@redhat.com>
5653         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5655 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5657         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5658         Don't reuse struct aiocb A if it failed.
5659         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5660         not just one byte, as that does not block.
5662 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5664         * sysdeps/pthread/unwind-resume.c: New file.
5665         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5666         unwind-resume in csu subdir.
5667         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5668         exceptions.
5669         (librt-sysdep_routines, librt-shared-only-routines): Add
5670         rt-unwind-resume.
5671         * sysdeps/pthread/rt-unwind-resume.c: New file.
5672         * unwind-forcedunwind.c: New file.
5673         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5674         (libpthread-shared-only-routines): Likewise.
5675         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5676         * pthreadP.h (pthread_cancel_init): New prototype.
5677         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5679         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5680         attr argument const struct pthread_attr *.
5682         * res.c (__res_state): Return __resp.
5683         * descr.h: Include resolv.h.
5684         (struct pthread): Add res field.
5685         * pthread_create.c: Include resolv.h.
5686         (start_thread): Initialize __resp.
5687         * Makefile (tests): Add tst-_res1.
5688         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5689         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5690         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5691         libpthread.
5692         * tst-_res1.c: New file.
5693         * tst-_res1mod1.c: New file.
5694         * tst-_res1mod2.c: New file.
5696 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5698         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5700         * Makefile: Define various *-no-z-defs variables for test DSOs
5701         which has undefined symbols.
5703 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5705         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5706         Retry if the stwcx fails to store once_control.
5708 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5710         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5711         pthread_attr_setaffinity.
5712         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5713         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5714         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5715         * pthread_attr_destroy.c: Free cpuset element if allocated.
5716         * pthread_create.c: Pass iattr as additional parameter to
5717         create_thread.
5718         * sysdeps/pthread/createthread.c: If attribute is provided and
5719         a new thread is created with affinity set or scheduling parameters,
5720         start thread with CLONE_STOPPED.
5721         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5722         pthread_attr_setaffinity.
5723         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5724         cpuset element.
5726 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5728         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5730 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5732         * sysdeps/pthread/configure.in: Require CFI directives also for
5733         ppc and s390.
5735 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5737         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5738         Add cfi directives.
5740 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5742         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5743         CLEANUP_JMP_BUF.
5744         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5745         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5746         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5747         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5748         not self pointer in __writer.  Compare with TID to determine
5749         deadlocks.
5750         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5751         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5752         Likewise.
5753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5754         Likewise.
5755         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5756         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5757         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5758         macros also when compiling librt.
5760 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5762         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5763         -fasynchronous-unwind-tables.
5764         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5765         (PSEUDO): Add cfi directives.
5766         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5767         Likewise.
5768         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5769         Likewise.
5771 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5773         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5774         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5775         * unwind.c (__pthread_unwind_next): Add hidden_def.
5776         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5777         Likewise.
5778         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5779         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5780         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5781         Likewise.
5782         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5783         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5784         Likewise.
5785         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5786         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5787         __pthread_unregister_cancel and __pthread_unwind_next.
5789 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5791         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5792         different symbol for the cancellation syscall wrapper and
5793         non-cancellation syscall wrapper.
5794         (PSEUDO_END): Define.
5796 2003-07-05  Richard Henderson  <rth@redhat.com>
5798         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5799         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5800         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5801         return actual return value from the syscall, not 0.
5803 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5805         * descr.h (struct pthread): Add pid field.
5806         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5807         (__reclaim_stacks): Likewise.
5808         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5809         also check for PID of the signal source.
5810         (__pthread_initialize_minimal_internal): Also initialize pid field
5811         of initial thread's descriptor.
5812         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5813         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5814         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5815         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5816         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5818 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
5820         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5821         Fix use of parameter.
5822         (__libc_cleanup_pop): Likewise.
5824 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
5826         * init.c (sigcancel_handler): Change parameters to match handler
5827         for SA_SIGACTION.  Check signal number and code to recognize
5828         invalid invocations.
5830 2003-07-03  Roland McGrath  <roland@redhat.com>
5832         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5833         Apply sizeof (struct pthread) bias to r13 value.
5835 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
5837         * sysdeps/pthread/configure.in: Require CFI directives.
5839         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5840         definition.
5841         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5842         libpthread compilation.
5843         * unwind.c (__pthread_unwind): Add hidden_def.
5844         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5846 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5848         * libc-cancellation.c (__libc_cleanup_routine): Define.
5849         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5850         (__pthread_cleanup_pop): Define.
5852 2003-07-01  Richard Henderson  <rth@redhat.com>
5854         * sysdeps/alpha/elf/pt-initfini.c: New file.
5855         * sysdeps/alpha/pthread_spin_lock.S: New file.
5856         * sysdeps/alpha/pthread_spin_trylock.S: New file.
5857         * sysdeps/alpha/pthreaddef.h: New file.
5858         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5859         * sysdeps/alpha/tls.h: New file.
5860         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5861         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5862         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5863         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5864         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5865         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5866         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5867         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5868         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5869         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5871 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5873         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5874         cleanup support and unwind info.
5876 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
5878         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5879         Use correct cleanup handler registration.  Add unwind info.
5880         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5881         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5882         * tst-once3.c: Add cleanup handler and check it is called.
5883         * tst-once4.c: Likewise.
5884         * tst-oncex3.c: New file.
5885         * tst-oncex4.c: New file.
5886         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5888 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
5890         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5892 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
5894         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5895         (tf_msgsnd): Likewise.
5897         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5898         premature returns a bit more.
5900 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
5902         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5903         definition to the front.
5905         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5906         the cleanup functions to make the names unique.  Fix dwarf opcode
5907         un unwind table.
5908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5909         functions to make the names unique.  Fix CFA offset for two blocks.
5911 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
5913         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5914         missing closing braces.
5915         Patch by Christophe Saout <christophe@saout.de>.
5917 2003-06-24  Roland McGrath  <roland@redhat.com>
5919         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5921 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
5923         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5924         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5926         * pthreadP.h: Declare __find_thread_by_id.
5927         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5928         * pthread_clock_gettime.c: Allow using other thread's clock.
5929         * pthread_clock_settime.c: Likewise.
5930         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5931         * Makefile: Add rules to build and run tst-clock2.
5932         * tst-clock2.c: New file.
5934 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
5936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5937         to use exception-based cleanup handler.
5938         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5940         * tst-cond8.c (ch): Announce that we are done.
5942         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5944         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5945         Also test aio_suspend with timeout value.
5947 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
5949         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5950         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5951         attribute_hidden.
5953         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5954         (__pthread_mutex_lock_internal): Likewise.
5955         (__pthread_mutex_unlock_internal): Likewise.
5956         (__pthread_mutex_unlock_usercnt): Declare.
5957         * pthread_mutex_destroy.c: Always fail if used in any way.
5958         * pthread_mutex_init.c: Update comment.
5959         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5960         * pthread_mutex_timedlock.c: Adjust __nusers.
5961         * pthread_mutex_trylock.c: Adjust __nusers.
5962         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5963         and public interfaces are wrapper with pass additional parameter.
5964         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5965         parameter zero.
5966         * tst-mutex8.c: New file.
5967         * Makefile (tests): Add tst-mutex8.
5968         * sysdeps/pthread/pthread_cond_timedwait.c: Call
5969         __pthread_mutex_unlock_usercnt.
5970         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5973         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5974         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5975         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5976         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5977         Add __nusers.
5978         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5979         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5980         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5981         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5982         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5984         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5985         * pthread_mutex_timedlock.c: Likewise.
5986         * pthread_mutex_trylock.c: Adjust __nusers.
5987         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5988         * tst-mutex9.c: New file.
5989         * Makefile (tests): Add tst-mutex9.
5990         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5991         * sysdeps/ia64/tls.h: Likewise.
5992         * sysdeps/powerpc/tls.h: Likewise.
5993         * sysdeps/s390/tls.h: Likewise.
5994         * sysdeps/sh/tls.h: Likewise.
5995         * sysdeps/x86_64/tls.h: Likewise.
5996         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5997         Change type of __owner.
5998         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5999         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6000         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6001         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6002         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6004 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6006         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6007         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6009         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6010         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6011         instead of nr to lll_futex_wake.  Only set errno and return -1
6012         if err < 0.
6014         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6015         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6016         return actual return value from the syscall, not 0.
6018 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6020         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6021         find a random value.
6022         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6023         errno==EIDRM.
6025         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6026         compat_timer_settime.
6027         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6028         compat_timer_gettime.
6029         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6030         compat_timer_getoverrun.
6031         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6032         compat_timer_delete.
6034         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6035         error-checking mutex detect busy mutexes.
6037 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6039         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6040         Add ax to clobber list.
6041         (lll_mutex_cond_lock): Likewise.
6042         (lll_mutex_unlock): Likewise.
6043         (lll_lock): Likewise.
6044         (lll_unlock): Likewise.
6046         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6047         * tst-cancel18.c: New file.
6048         * tst-cancelx18.c: New file.
6050         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6051         and tcdrain.
6053         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6054         * tst-cancel17.c: New file.
6055         * tst-cancelx17.c: New file.
6057         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6058         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6059         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6061         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6063 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6065         * sysdeps/pthread/createthread.c (create_thread): Set
6066         header.multiple_threads unconditionally.
6067         * allocatestack.c (allocate_stack): Likewise.
6068         * descr.h (struct pthread): Add header.multiple_threads
6069         unconditionally.
6070         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6071         Define for librt.  #error if neither libpthread, libc nor librt.
6072         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6073         Likewise.
6074         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6075         CDISABLE): Likewise.
6076         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6077         CDISABLE): Likewise.
6078         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6079         CDISABLE): Likewise.
6080         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6081         CDISABLE): Likewise.  Access header.multiple_threads outside of
6082         libc and libpthread.
6083         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6084         Likewise.
6085         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6086         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6088 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6090         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6091         Also test early cancellation before the thread reaches the cancellation
6092         point.
6094         * Makefile: Compile forward.c with exceptions.
6096         * sysdeps/unix/sysv/linux/sleep.c: New file.
6098 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6100         * Makefile: Add CFLAGS definition to compile function wrappers
6101         duplicated from libc with exceptions.
6102         * tst-cancel4.c: Also check cancellation handlers.
6104         * Makefile: Add rules to build and run tst-cancel16 and
6105         tst-cancelx16.  Add missing CFLAGS definitions.
6106         * tst-cancel16.c: New file.
6107         * tst-cancelx16.c: New file.
6109 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6111         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6112         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6113         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6114         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6116         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6117         (LIBC_CANCEL_RESET): Likewise.
6118         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6119         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6120         librt-cancellation.
6121         (CFLAGS-libcrt-cancellation.c): Define.
6122         * sysdeps/pthread/librt-cancellation.c: New file.
6123         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6124         macros also when compiling librt.
6125         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6126         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6127         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6128         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6129         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6130         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6131         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6133         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6134         compat_timer_create.
6136 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6138         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6140         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6141         __register_atfork.
6142         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6143         Add libc_hidden_def.
6145 2003-06-13  Roland McGrath  <roland@redhat.com>
6147         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6148         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6150 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6152         * allocatestack.c (queue_stack): Always inline.
6153         * ptreadhP.h (__do_cancel): Likewise.
6155 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6157         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6158         a typo.
6160 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6163         (__pthread_cond_signal): Remove incorrect second addition for
6164         cond_lock!=0.
6166 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6169         (__pthread_cond_signal): Use correct futex pointer in
6170         __lll_mutex_lock_wait call.
6172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6173         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6175 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6177         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6178         cancelable.
6179         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6180         Likewise.
6182         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6183         hand-written CFI generation code.  Since ENTRY/END also initiated
6184         CFI frames this caused two CFI sets to be generated.
6186 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6188         * cleanup_routine.c: New file.
6189         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6190         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6191         cleanup handling.
6192         * Makefile (libpthread-routines): Add cleanup_routine.
6193         Add more CFLAGS variables to compile with exceptions.  Add comments
6194         why which file needs unwind tables.
6195         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6196         tests.
6197         * tst-cancelx1.c: New file.
6198         * tst-cancelx2.c: New file.
6199         * tst-cancelx3.c: New file.
6200         * tst-cancelx4.c: New file.
6201         * tst-cancelx5.c: New file.
6202         * tst-cancelx6.c: New file.
6203         * tst-cancelx7.c: New file.
6204         * tst-cancelx8.c: New file.
6205         * tst-cancelx9.c: New file.
6206         * tst-cancelx10.c: New file.
6207         * tst-cancelx11.c: New file.
6208         * tst-cancelx12.c: New file.
6209         * tst-cancelx13.c: New file.
6210         * tst-cancelx14.c: New file.
6211         * tst-cancelx15.c: New file.
6212         * tst-cleanupx0.c: New file.
6213         * tst-cleanupx0.expect: New file.
6214         * tst-cleanupx1.c: New file.
6215         * tst-cleanupx2.c: New file.
6216         * tst-cleanupx3.c: New file.
6218         * tst-cleanup0.c: Make standard compliant.
6219         * tst-cleanup1.c: Likewise.
6221         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6222         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6223         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6224         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6225         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6226         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6227         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6228         CLEANUP_JMP_BUF.
6229         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6230         * tst-cancel12.c: New file.
6231         * tst-cancel13.c: New file.
6232         * tst-cancel14.c: New file.
6233         * tst-cancel15.c: New file.
6234         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6235         and tst-cancel15.
6237         * tst-cancel1.c: Add some comments.
6239         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6240         timeout correctly.
6242 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6244         * Makefile (CFLAGS-pthread_cancel.c): Define.
6246 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6248         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6249         Change type of __writer element to int.
6250         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6251         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6252         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6253         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6254         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6255         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6256         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6257         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6258         Compare with TID to determine deadlocks.
6259         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6260         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6261         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6262         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6265         Likewise.
6266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6267         Likewise.
6268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6269         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6270         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6271         Likewise.
6272         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6273         Likewise.
6274         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6275         * Makefile (tests): Add tst-rwlock12.
6276         * tst-rwlock12.c: New file.
6278 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6280         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6281         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6282         Remove bogus hidden_proto.
6283         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6284         Likewise.
6285         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6286         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6287         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6288         ___lll_mutex_timedlock): Likewise.
6290 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6293         (__pthread_cond_signal): Add some code to eventually handle
6294         cond_lock!=0.
6296 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6298         * Makefile (tests): Add tst-exec4.
6299         (tst-exec4-ARGS): Define.
6300         * tst-exec4.c: New file.
6302 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6304         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6305         Also fail if tv_nsec < 0.
6306         (__lll_timedwait_tid): Likewise.
6307         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6308         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6309         Likewise.
6310         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6311         Likewise.
6312         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6313         Likewise.
6314         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6315         Likewise.
6316         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6317         Likewise.
6318         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6319         Likewise.
6321         * Makefile (tests): Add tst-sem8 and tst-sem9.
6322         * tst-sem8.c: New file.
6323         * tst-sem9.c: New file.
6324         * sem_open.c: Fix creation of in_use record if the file exists but
6325         no internal record.
6327         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6328         definitions.
6330         * sysdeps/pthread/timer_create.c (timer_create): In case
6331         evp==NULL, assign timer ID to sival_ptr.
6333         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6334         struct pthread_unwind_buf *.
6335         (struct pthread): Likewise for cleanup_jmp_buf element.
6337         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6338         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6339         * unwind.c (__pthread_unwind_next): Likewise.
6341 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6343         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6344         (lll_futex_timed_wait): Use int for futex value parameter.
6345         (lll_futex_wake): Likewise.
6346         (lll_futex_requeue): Likewise.
6348         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6349         Replace one memory operation with one register operation.
6351         * tst-join4.c (do_test): Fix error message.
6353         * tst-rwlock6.c (do_test): Use correct format specifier.
6355         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6356         (__lll_mutex_lock_wait): Replace one memory operation with one
6357         register operation.
6358         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6359         (__lll_mutex_lock_wait): Likewise.
6361         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6362         (__lll_mutex_cond_lock): Add one to value parameter of
6363         __lll_lock_wait to reflect reality in the futex syscall.
6364         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6365         (lll_mutex_cond_lock): Likewise.
6367 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6369         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6370         New function.
6371         (lll_mutex_cond_lock): Define.
6373 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6375         * Makefile (tests): Add tst-signal6.
6376         * tst-signal6.c: New file.
6378         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6379         (__lll_mutex_unlock_force): New function
6380         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6382         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6383         (__lll_mutex_unlock_force): New function.
6384         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6386         * tst-rwlock7.c (do_test): Use correct format specifier.
6388         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6389         Find break parameter in correct asm argument.
6391 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6393         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6394         Remove out4.
6395         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6396         error occured.
6397         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6398         Add __mutex.
6399         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6400         lll_futex_requeue, lll_mutex_unlock_force): Define.
6402 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6404         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6405         (pthread_cond_t): Add __mutex.
6406         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6407         lll_futex_requeue, lll_mutex_unlock_force): Define.
6409 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6411         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6412         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6413         Add __mutex field.
6414         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6415         Define.
6416         (lll_futex_wait, lll_futex_wake): Define.
6417         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6418         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6419         FUTEX_REQUEUE instead of FUTEX_WAIT.
6420         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6421         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6422         mutex which was used in condvar structure.  Call
6423         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6424         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6427         include tcb-offsets.h.  Read wakeup value in locked region.
6428         Use the value of gbr register as THREAD_ID.
6429         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6430         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6431         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6433         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6434         macros.
6436 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6438         * sysdeps/pthread/pthread_cond_broadcast.c
6439         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6441 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6443         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6444         typo in register name.
6445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6446         correctly.  Actually use requeue.  Little optimization.
6447         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6448         mutex address early.  Handle cancellation state as 32-bit value.
6449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6450         Remove unnecessary label.
6452 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6454         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6455         instead of FUTEX_WAIT.
6456         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6458         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6461         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6462         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6463         of __pthread_mutex_lock_internal.
6464         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6465         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6466         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6467         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6468         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6469         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6470         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6471         Add pthread_mutex_cond_lock.
6472         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6473         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6474         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6475         lll_mutex_cond_lock.
6476         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6477         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6478         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6479         Add __mutex field.
6480         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6481         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6483         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6484         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6486         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6487         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6488         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6489         macro don't define aliases.
6491         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6492         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6493         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6494         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6496         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6497         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6498         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6499         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6501 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6503         * sem_open.c: Fix one endless loop.  Implement correct semantics
6504         wrt opening the same semaphore more then once.
6505         * sem_close.c: Adjust for sem_open change.
6506         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6507         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6508         * Makefile (tests): Add tst-sem7.
6509         * tst-sem7.c: New file.
6511 2003-05-16  Roland McGrath  <roland@redhat.com>
6513         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6514         uninitialized variable braino.
6516 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6518         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6519         test for syscall availability.
6521         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6522         __no_posix_timers to -1 if the syscalls don't exist.
6524         * pthread_join.c (pthread_join): Set tid field of the joined
6525         thread to -1.  This isn't necessary but helps to recognize some
6526         error conditions with almost no cost.
6528         * allocatestack.c (FREE_P): Also negative values indicate an
6529         unused stack.
6531         * unwind.c: Include <unistd.h>.
6533 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6535         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6537 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6539         * Makefile (crti-objs, crtn-objs): New variables.
6540         (omit-deps, extra-objs): Add crtn.
6541         ($(objpfx)libpthread.so): Depend on both crti and crtn
6542         and links to them in multidir.
6543         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6545 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6547         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6548         (lll_mutex_unlock): Use atomic_exchange_rel.
6550 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6552         * cond-perf.c (cons): Add missing locking around setting of alldone.
6554 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6557         related macros.
6558         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6560 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6562         * tst-sem6.c: New file.
6563         * Makefile (tests): Add tst-sem6.
6565         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6566         Use atomic_exchange_rel instead of atomic_exchange.
6567         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6568         Likewise.
6570         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6571         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6572         vsyscall is possible.
6574         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6575         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6576         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6577         pthread_setaffinity_np.
6578         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6579         and pthread_setaffinity_np.
6580         * Makefile (libpthread-routines): Add pthread_getaffinity and
6581         pthread_setaffinity.
6583         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6584         use it in case mmap to allocate the stack fails.
6585         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6586         ARCH_MAP_FLAGS here.
6587         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6588         ARCH_RETRY_MMAP.
6590 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6592         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6593         handler implementation.  It is now lockless in fork().
6594         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6595         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6596         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6597         declare the __fork_*_lists.
6598         (struct fork_handler): Include pointers to all three functions.
6599         Add next, refcntr and need_signal elements.
6600         (__fork_handlers): New declaration.
6601         (__register_atfork_malloc): Remove declaration.
6602         (HAVE_register_atfork_malloc): Remove definition.
6603         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6604         __pthread_child_handler variable.
6605         (__libc_pthread_init): Use __register_atfork instead of explicitly
6606         adding to the list.
6607         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6608         and lll_futex_wake.
6609         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6611         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6612         function must never be reached.
6614         * cond-perf.c: New file.
6616 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6618         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6620 2003-05-04  Roland McGrath  <roland@redhat.com>
6622         * Makefile ($(objpfx)../libc.so): New target.
6624 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6626         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6627         (pthread_condattr_t): Size is only an int, don't use long for
6628         alignment.
6629         (pthread_mutexattr_t): Likewise.
6630         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6631         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6632         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6634 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6636         * sysdeps/i386/tls.h: Define THREAD_ID.
6637         * sysdeps/ia64/tls.h: Likewise.
6638         * sysdeps/powerpc/tls.h: Likewise.
6639         * sysdeps/s390/tls.h: Likewise.
6640         * sysdeps/sh/tls.h: Likewise.
6641         * sysdeps/x86_64/tls.h: Likewise.
6642         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6643         record ownership.
6644         * pthread_mutex_timedlock.c: Likewise.
6645         * pthread_mutex_trylock.c: Likewise.
6646         * pthread_mutex_unlock.c: Likewise.
6647         * pthread_rwlock_trywrlock.c: Likewise.
6648         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6649         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6650         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6651         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6653         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6654         flag.
6656 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6658         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6659         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6660         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6661         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6662         Make __align long long instead of long.
6663         (pthread_rwlock_t): Formatting.
6664         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6665         (pthread_rwlock_t): Formatting.
6666         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6667         (pthread_cond_t): Make __align long long instead of long.
6668         (pthread_rwlock_t): Move __flags field to the same position as in
6669         linuxthreads.
6671 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6673         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6674         * tst-rwlock7.c (do_test): Likewise.
6676 2003-04-26  Roland McGrath  <roland@redhat.com>
6678         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6680 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6682         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6683         sizeof (struct pthread).
6684         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6685         1 struct pthread.
6686         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6687         to 0.
6688         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6689         struct pthread.
6690         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6691         to 32-bit bytes.
6692         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6693         tcbp.
6694         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6695         unneccessarily.
6696         (NO_TLS_OFFSET): Define.
6697         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6698         add TLS_TCB_SIZE unnecessarily.
6700 2003-04-22  Roland McGrath  <roland@redhat.com>
6702         * Makeconfig (shared-thread-library): Reverse link order to work
6703         around linker bug.
6705 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6707         * semaphore.h: Fix typo in comment.
6709 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6711         * sysdeps/pthread/sigfillset.c: New file.
6713         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6714         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6715         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6716         * sysdeps/pthread/sigaction.c: Likewise.
6717         * sysdeps/pthread/sigprocmask.c: New file.
6718         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6719         __SIGRTMIN+1.
6720         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6721         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6722         in this case.
6724 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6726         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6727         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6729         * sysdeps/unix/sysv/linux/unregister-atfork.c
6730         (__unregister_atfork): Don't free memory not allocated dynamically.
6732         * semaphore.h: Remove __THROW marker from cancellation points.
6733         * nptl/sysdeps/pthread/pthread.h: Likewise.
6735 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6737         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6738         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6739         __THROW.
6741 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6743         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6745 2003-04-15  Roland McGrath  <roland@redhat.com>
6747         * forward.c (__pthread_unwind): Tweak to avoid warning.
6749 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6751         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6753 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6755         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6756         overflow CFA advance instructions.
6757         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6759 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6761         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6762         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6763         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6764         defined.
6766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6767         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6769         DW_CFA_advance_loc for .Laddl-.Lsubl.
6771 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6773         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6774         position-independent unwind data for static libraries.
6775         Add missing unwind info.  Add comments.
6777         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6778         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6780         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6782 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6784         * Makefile: Make sure all cancellation points are compiled with
6785         exception and asynchronous unwind tables.
6787         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6788         which mishandles loading of global object addresses in PIC.
6789         (THREAD_SETMEM_NC): Likewise.
6791 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6793         * pthread.h: Define new data structure for cleanup buffer.  Declare
6794         new cleanup handler interfaces.
6795         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6796         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6797         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6798         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6799         it.  Declare old cleanup handler installation functions.
6800         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6801         handling.
6802         * cleanup_defer.c: Likewise.
6803         * cleanup_compat.c: New file.  Old cleanup code.
6804         * cleanup_def_compat.c: New file.  Old cleanup code.
6805         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6806         if own thread descriptor.
6807         * unwind.c: New file.
6808         * forward.c: Add __pthread_unwind.
6809         * init.c (pthread_functions): Add __pthread_unwind.
6810         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6811         Add ptr___pthread_unwind.
6812         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6813         and unwind function.
6814         * Makefile (libpthread-routines): Add cleanup_compat,
6815         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6816         table generation if necessary.
6817         * version.c: Record whether unwind support is compiled in.
6818         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6819         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6820         handler interfaces.
6821         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6822         complication to generate unwind information for syscall wrappers.
6823         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6824         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6825         __cleanup_fct_attribute.
6827         * Makefile: Add rules to build and run tst-cleanup0.
6828         * tst-cleanup0.c: New file.
6829         * tst-cleanup0.expect: New file.
6831         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
6832         caller.  Optimize to avoid often unecessary local variable.
6834 2003-04-11  Roland McGrath  <roland@redhat.com>
6836         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6837         sets variable `multidir'; include that.
6838         (generated): Add it.
6839         ($(objpfx)$(multidir)/crti.o): New target.
6840         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6842 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6844         * tst-attr2.c (do_test): Add cast to avoid warning.
6845         * tst-mutex4.c (do_test): Likewise.
6847 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
6849         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6850         in child.
6852 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
6854         * Makefile (tests): Add tst-detach1.
6855         * tst-detach1.c: New file.
6857 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
6859         * sysdeps/pthread/pthread.h: Remove duplicate
6860         pthread_cleanup_{push,pop} definitions.
6862         * tst-barrier2.c: Eliminate warnings.
6863         * tst-cancel4.c: Likewise.
6864         * tst-cond4.c: Likewise.
6865         * tst-cond6.c: Likewise.
6866         * tst-detach1.c: Likewise.
6867         * tst-rwlock4.c: Likewise.
6868         * tst-rwlock6.c: Likewise.
6869         * tst-rwlock7.c: Likewise.
6870         * tst-sem3.c: Likewise.
6871         * tst-spin2.c: Likewise.
6872         * tst-umask1.c: Likewise.
6874 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
6876         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6878 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
6880         * descr.h (struct pthread): Move cancelhandling member to the front.
6882 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
6884         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6885         malloc_parent, and malloc_child statically.
6886         (__register_atfork_malloc): New function.
6887         (free_mem): Don't free any of the malloc_* variables on the list.
6888         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6889         Define HAVE_register_atfork_malloc.
6891 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
6893         * sysdeps/pthread/createthread.c (create_thread): Add some more
6894         comments explaining when to set multiple_threads and when not.
6896         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6897         THREAD_ATOMIC_BIT_SET if not already defined.
6898         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6899         THREAD_ATOMIC_BIT_SET:
6900         * sysdeps/x86_64/tls.h: Likewise.
6901         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6902         THREAD_ATOMIC_CMPXCHG_VAL.
6903         (_pthread_cleanup_pop_restore): Likewise.
6904         * cancellation.c (__pthread_enable_asynccancel): Likewise.
6905         (__pthread_enable_asynccancel_2): Likewise.
6906         (__pthread_disable_asynccancel): Likewise.
6907         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6908         (__libc_disable_asynccancel): Likewise.
6909         * init.c (sigcancel_handler): Likewise.
6910         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6911         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6913 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
6915         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6916         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6917         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6918         * Makefile (tests): Add tst-cancel11.
6919         * tst-cancel11.c: New file.
6921 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
6923         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6924         round, not the first.  Use specific_used flag instead of local
6925         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
6926         (__free_tcb): Don't call deallocate_tsd here.
6927         (start_thread): Call deallocate_tsd here.
6928         * pthread_setspecific.c: Set specific_used flag really only when
6929         needed.
6930         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6931         * tst-tsd3.c: New file.
6932         * tst-tsd4.c: New file.
6934 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6936         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6937         Use atomic_exchange_and_add instead of __lll_add.
6938         (__lll_mutex_timedlock): Likewise.
6939         Patch by Ian Wienand.
6941 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
6943         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6944         (SINGLE_THREAD_P): Fix typo.
6945         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6947 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6949         * Makefile (tests): Add tst-align.
6950         * tst-align.c: New file.
6951         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6953         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6954         function correctly.
6956         * tst-tsd2.c: Add casts to avoid warnings.
6958 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
6960         * descr.h (struct pthread): Move most often used elements to the front.
6962 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
6964         * Makefile (libpthread-routines): Add pthread_atfork.
6965         (libpthread-static-only-routines): Add pthread_atfork.
6967 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6969         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6970         of TLS_DTV_AT_TP.
6971         (INSTALL_DTV): Add parens.
6972         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6973         Use passed descr instead of THREAD_SELF.
6974         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6975         (__lll_mutex_timedlock_wait): Correct expected value after
6976         spurious wakeup.
6977         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6978         Release lock before waking up the waiters.
6979         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6980         criteria.  Reorderstruct passed to cleanup handler.  Fix
6981         handling of cancellation and failung pthread_mutex_unlock call.
6982         Use __pthread_enable_asynccancel_2 instead of
6983         __pthread_enable_asynccancel.
6984         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6985         Return result of lock re-get if it fails.
6986         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6987         for __pthread_cleanup_push.
6988         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6989         completely broken rwlock implementation.
6990         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6991         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6992         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6993         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6994         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6995         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
6996         versioned_symbol macro.
6997         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6998         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7000 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7002         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7003         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7004         and __helper_tid.
7005         (struct timer): Remove th and bar field.
7006         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7007         debugging code.  Create only one helper thread.
7008         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7009         helper thread.
7010         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7011         Renamed.  Define statically.  Use thread info from siginfo.
7012         (__helper_once): New variable.
7013         (__helper_tid): New variable.
7014         (__reset_helper_control): New function.
7015         (__start_helper_thread): New function.
7017         * pthread_create.c (start_thread): Don't use setjmp inside
7018         __builtin_expect to work around gcc bug.
7020         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7021         timer_delete syscall fails, but not with ENOSYS, set
7022         __no_posix_timers.
7024         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7025         (timer_settime): Fix typo.
7026         * sysdeps/unix/sysv/linux/timer_getoverr.c
7027         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7029 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7032         offset of cleanupbuf.__prev.
7034 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7036         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7037         of included file.
7039 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7042         NULL provide default definition to syscall.
7044 2003-03-25  Roland McGrath  <roland@redhat.com>
7046         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7047         (timer_id2ptr): Fix typo.
7049 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7051         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7052         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7053         * sysdeps/ia64/pthreaddef.h: Likewise.
7054         * sysdeps/powerpc/pthreaddef.h: Likewise.
7055         * sysdeps/s390/pthreaddef.h: Likewise.
7056         * sysdeps/sh/pthreaddef.h: Likewise.
7057         * sysdeps/x86_64/pthreaddef.h: Likewise.
7058         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7059         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7060         being changed.
7061         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7062         SIGTIMER is not unblocked.
7063         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7064         RT signal taken.
7065         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7066         be send.
7067         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7068         pass pointer through as ID.
7069         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7070         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7071         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7072         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7073         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7074         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7075         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7076         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7077         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7078         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7079         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7080         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7081         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7082         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7083         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7084         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7085         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7086         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7087         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7088         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7089         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7090         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7091         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7092         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7093         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7094         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7095         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7096         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7097         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7098         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7099         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7100         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7101         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7103         * pthreadP.h: Remove FRAME_LEFT definition.
7104         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7105         already left frame.  Programs which have this problem are not POSIX
7106         compliant.
7107         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7109 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7111         * sysdeps/pthread/tst-timer.c: Check return values of the
7112         functions we test.
7114 2003-03-23  Roland McGrath  <roland@redhat.com>
7116         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7117         * tst-tls3mod.c: Likewise.
7118         * tst-tls1.c: Likewise.
7119         * tst-tls2.c: Likewise.
7121         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7122         undefined behavior.
7124         * tst-join5.c (tf1, tf2): Add a cast.
7126         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7128         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7129         Don't test anything.
7130         * tst-cond4.c: Likewise.
7131         * tst-cond6.c: Likewise.
7132         * tst-flock2.c: Likewise.
7133         * tst-mutex4.c: Likewise.
7134         * tst-rwlock4.c: Likewise.
7135         * tst-signal1.c: Likewise.
7136         * tst-spin2.c: Likewise.
7137         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7139         * tst-mutex4.c: Use test-skeleton.c.
7140         * tst-spin2.c: Likewise.
7141         * tst-sysconf.c: Likewise.
7142         * tst-barrier2.c: Likewise.
7143         * tst-cond4.c: Likewise.
7144         * tst-cond6.c: Likewise.
7145         * tst-rwlock4.c: Likewise.
7146         * tst-unload.c: Likewise.
7147         * tst-flock2.c (do_test): Use return instead of exit.
7149 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7151         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7153 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7155         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7156         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7157         instead of __lll_compare_and_swap.
7158         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7159         Likewise.
7160         Removed definition if __lll_compare_and_swap.
7162         * cancellation.c: Adjust for new form of compare&exchange macros.
7163         * cleanup_defer.c: Likewise.
7164         * init.c: Likewise.
7165         * libc-cancellation.c: Likewise.
7166         * old_pthread_cond_broadcast.c: Likewise.
7167         * old_pthread_cond_signal.c: Likewise.
7168         * old_pthread_cond_timedwait.c: Likewise.
7169         * old_pthread_cond_wait.c: Likewise.
7170         * pthread_cancel.c: Likewise.
7171         * pthread_create.c: Likewise.
7172         * pthread_detach.c: Likewise.
7173         * pthread_join.c: Likewise.
7174         * pthread_key_delete.c: Likewise.
7175         * pthread_setcancelstate.c: Likewise.
7176         * pthread_setcanceltype.c: Likewise.
7177         * pthread_timedjoin.c: Likewise.
7178         * pthread_tryjoin.c: Likewise.
7179         * sysdeps/pthread/createthread.c: Likewise.
7181 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7183         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7184         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7185         definitions.  Replace uses with calls to atomic_* functions.
7186         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7187         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7188         __lll_test_and_set calls with atomic_exchange_and_add and
7189         atomic_exchange calls respectively.
7190         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7191         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7192         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7193         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7194         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7195         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7196         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7198         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7199         returns the old value.
7201 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7203         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7204         int for variable OLDVAL and correct inline assembler contraint.
7205         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7206         type int for variable OLD.
7208         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7209         only for s390-32.
7210         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7211         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7212         instead of multiple_threads field in the TCB.
7214 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7216         * sysdeps/i386/i686/bits/atomic.h: Removed.
7217         * sysdeps/i386/i586/bits/atomic.h: Removed.
7218         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7219         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7220         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7221         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7222         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7223         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7224         * atomic.h: Removed.  Moved to glibc.
7226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7227         support for clock selection.
7229         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7230         signalling waiters.
7232 2003-03-18  Roland McGrath  <roland@redhat.com>
7234         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7235         Add __lll_rel_instr first.  Add memory clobber.
7236         (lll_mutex_unlock): Use __lll_test_and_set.
7237         From Paul Mackerras <paulus@samba.org>.
7239         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7240         unconditionally.
7241         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7242         (SINGLE_THREAD_P):  Add `header.' prefix.
7243         From Paul Mackerras <paulus@samba.org>.
7245         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7246         pthread_timedjoin_np to ...
7247         (libpthread: GLIBC_2.3.3): ... here.
7248         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7250         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7251         Avoid shadowing VAL variable.
7253         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7254         New macro.
7256 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7258         * Makefile (tests): Add tst-cond11.
7259         * tst-cond11.c: New file.
7261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7262         struct passed to cleanup handler to eliminate one more
7263         instruction.
7264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7266         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7267         (pthrad_cond_t): Replace __unused field with __clock.
7269         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7270         waken all waiters in cleanup handler.
7271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7274         * pthread_condattr_getclock.c: New file.
7275         * pthread_condattr_setclock.c: New file.
7276         * sysdeps/pthread/pthread.h: Declare these new functions.
7277         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7278         * Makefile (libpthread-routines): Add the new functions.
7279         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7280         Renamed field to value.  Document use of the bits.
7281         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7282         change.
7283         * pthread_condattr_setpshared.c: Likewise.
7284         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7285         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7286         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7287         Add __clock field.
7288         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7289         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7290         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7291         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7293         Implement clock selection.
7294         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7295         * pthread-errnos.sym: Add ENOSYS.
7296         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7297         _POSIX_CLOCK_SELECTION.
7298         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7300         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7301         invalid .size directive.
7303 2003-03-17  Roland McGrath  <roland@redhat.com>
7305         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7306         Formatting tweaks.
7308 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7310         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7311         Use __lll_add instead of spelling it out.  Use protected symbol names.
7312         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7313         Use __lll_add.
7314         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7315         Renamed from lll_compare_and_swap.  Use new name where necessary.
7316         (__lll_add): Defined.
7317         (__lll_dec_if_positive): Defined.
7318         (__lll_test_and_set): Defined.
7319         * sysdeps/ia64/pthread_spin_init.c: Removed.
7320         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7321         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7322         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7323         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7324         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7325         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7326         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7327         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7328         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7329         __sync_lock_release_si.
7330         Patch by Jakub Jelinek.
7332         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7333         Fix timeout handling.
7334         (__lll_timedwait_tid): Likewise.
7335         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7336         Patch by Jakub Jelinek.
7338         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7340 2003-03-17  Roland McGrath  <roland@redhat.com>
7342         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7343         * sysdeps/pthread/pthread_spin_init.c: New file.
7344         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7345         * sysdeps/powerpc/Makefile: New file.
7346         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7347         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7348         * sysdeps/powerpc/pthreaddef.h: New file.
7349         * sysdeps/powerpc/tcb-offsets.sym: New file.
7350         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7351         * sysdeps/powerpc/tls.h: New file.
7352         * sysdeps/powerpc/bits/atomic.h: New file.
7353         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7354         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7355         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7357         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7358         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7359         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7360         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7361         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7362         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7363         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7364         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7365         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7366         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7367         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7368         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7369         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7370         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7371         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7373         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7374         not gettimeofday.
7375         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7376         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7377         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7378         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7379         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7381 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7383         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7384         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7387         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7389 2003-03-16  Roland McGrath  <roland@redhat.com>
7391         * tst-fork4.c: Include <string.h>.
7392         * tst-signal2.c: Likewise.
7393         * tst-mutex5.c (do_test): exit -> return.
7394         * tst-mutex2.c: Include <stdlib.h>.
7396 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7398         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7399         (__lll_mutex_timedlock_wait): Correct expected value after
7400         spurious wakeup.  Otherwise we would never wait again.
7402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7403         zone versus inline asm stupidity.  Use correct instructions.
7405         * tst-rwlock6.c: Add some more status output.
7407 2003-03-15  Roland McGrath  <roland@redhat.com>
7409         * sysdeps/pthread/configure.in: New file.
7410         * sysdeps/pthread/configure: New file (generated).
7412 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7414         * allocatestack.c (allocate_stack): Store the exact stack size of
7415         user allocated stacks.
7417 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7419         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7420         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7421         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7422         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7423         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7424         Use `header.' prefix.
7425         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7427 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7429         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7430         __builtin_frame_address, use stack pointer.
7432         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7433         instead of __builtin_frame_pointer.
7435 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7437         * tst-basic1.c (do_test): Add cast to avoid warning.
7438         * tst-basic2.c (do_test): Likewise.
7440         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7441         amount of stack correction.
7443         * tst-fork4.c: Use test-skeleton.c.
7445 2003-03-14  Roland McGrath  <roland@redhat.com>
7447         * init.c: Fix typo "#eli" for "#else".
7449 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7451         * allocatestack.c (__stack_user): Use hidden_data_def.
7452         * pthread_create.c (__pthread_keys): Likewise.
7454         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7456 2003-03-14  Roland McGrath  <roland@redhat.com>
7458         * tst-fork4.c: New file.
7459         * Makefile (tests): Add it.
7461         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7462         we always define the padding space.
7463         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7464         stopped supporting its own extensions fully.
7465         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7466         struct also called `header', so `header.multiple_threads' is the field
7467         name to use on all machines.
7468         * allocatestack.c (allocate_stack): Use `header.' prefix.
7469         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7470         * pthread_create.c (__pthread_create_2_1): Likewise.
7471         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7472         (THREAD_SELF): Likewise.
7473         * sysdeps/x86_64/tls.h: Likewise.
7474         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7475         (SINGLE_THREAD_P): Likewise.
7476         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7477         (SINGLE_THREAD_P): Likewise.
7478         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7479         (SINGLE_THREAD_P): Likewise.
7481         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7482         value directly.
7484 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7486         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7487         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7489         * pthread_create.c (start_thread): setjmp is expected to return 0.
7491         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7492         (THREAD_GETMEM_NC): Likewise.
7494 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7496         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7497         and the size of the stack which must be allocated is a multiple,
7498         allocate one more page.
7499         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7500         MULTI_PAGE_ALIASING.
7502 2003-03-13  Roland McGrath  <roland@redhat.com>
7504         * pthread_create.c (start_thread): Set EXITING_BIT after the
7505         event-reporting (and destructors), not before.
7507 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7509         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7510         lll_futex_wake): Declare register variables as long int instead of
7511         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7512         Make syscall arguments clobbered by the syscall.
7513         (lll_futex_wait): Define using lll_futex_timed_wait.
7515         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7516         to void *.
7518         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7519         PPID if [! NDEBUG].
7521         * allocatestack.c (nptl_ncreated): Only declare if
7522         COLORING_INCREMENT != 0.
7524         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7525         (__libc_enable_asynccancel_2): Remove prototype.
7527         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7528         ctid to match kernel.
7530 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7532         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7533         libc_multiple_threads.
7534         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7535         __libc_multiple_threads to...
7536         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7538         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7539         versioning.
7540         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7541         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7543         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7544         (__pthread_once_internal): Define.
7546         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7547         macros instead of .symver directly.
7548         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7549         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7551         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7552         * sysdeps/x86_64/tcb-offsets.sym: New file.
7553         * sysdeps/x86_64/Makefile: New file.
7555         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7556         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7557         to access own pthread_t in TCB.
7558         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7559         Likewise.
7560         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7561         Likewise.
7562         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7564 2003-03-12  Roland McGrath  <roland@redhat.com>
7566         * pthread-errnos.sym: New file.
7567         * Makefile (gen-as-const-headers): New variable, list that file.
7568         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7569         header <pthread-errnos.h> instead of defining errno values here.
7570         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7571         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7572         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7573         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7575         Likewise.
7576         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7577         Likewise.
7578         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7580         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7581         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7582         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7583         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7584         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7585         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7586         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7587         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7588         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7589         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7590         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7591         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7592         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7593         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7594         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7595         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7596         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7597         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7598         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7599         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7600         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7601         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7602         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7603         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7604         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7606         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7607         CLONE_CHILD_SETTID worked.
7609 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7611         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7612         file.
7613         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7614         file.
7616         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7617         (pthread_cond_t): Add padding.
7619         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7620         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7621         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7624         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7626         (__pthread_rwlock_timedrdlock): Likewise.
7627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7628         (__pthread_rwlock_wrlock): Likewise.
7629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7630         (__pthread_rwlock_rdlock): Likewise.
7632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7635         result of lock re-get if it fails.
7637 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7639         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7640         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7641         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7642         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7643         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7644         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7645         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7646         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7647         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7648         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7650         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7651         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7653         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7654         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7655         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7656         (create_thread): Likewise.
7657         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7658         * init.c (__pthread_initialize_minimal_internal): Initialize
7659         __libc_multiple_threads_ptr if necessary.
7660         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7661         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7662         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7663         __libc_multiple_threads.
7664         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7665         necessary.
7667         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7668         (THREAD_SETMEM_NC): Likewise.
7670         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7671         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7672         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7673         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7675         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7676         Eliminate one entire instruction.
7678         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7679         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7681         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7682         instead of __pthread_enable_asynccancel.
7683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7684         (__pthread_cond_wait): Likewise.
7685         * sysdeps/pthread/pthread_cond_timedwait.c
7686         (__pthread_cond_timedwait): Likewise.
7687         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7690         (__condvar_cleanup): Wake up all waiters in case we got signaled
7691         after being woken up but before disabling asynchronous
7692         cancellation.
7693         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7694         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7695         (__condvar_cleanup): Likewise.
7697         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7698         Make it an error if architecture has no #if case.  Add x86-64.
7700         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7701         pt-initfini.s generation.
7703         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7704         (TLS_INIT_TP): Fix typo.
7706 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7708         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7709         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7711         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7712         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7713         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7714         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7715         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7716         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7717         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7718         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7720 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7722         * sysdeps/pthread/pthread_cond_timedwait.c
7723         (__pthread_cond_timedwait): Return the result of the final
7724         locking.  If it succeeds, the regular function return value.
7726         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7727         Return result of the final locking.
7728         * version.c (__nptl_main): Work around problems with the strange
7729         INTERNAL_SYSCALL macro on ppc32.
7730         * init.c (__pthread_initialize_minimal_internal): Unblock
7731         SIGCANCEL in case the parent blocked it.
7732         Reported by Paul Mackerras <paulus@samba.org>.
7734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7735         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7736         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7738 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7740         * sysdeps/pthread/pthread_cond_timedwait.c
7741         (__pthread_cond_timedwait): Unlock and fail if
7742         __pthread_mutex_unlock_internal failed.
7744         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7745         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7746         Use ARCH_CLONE.
7747         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7748         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7749         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7750         ALLOCATE_STACK): New macros.
7751         (TLS_TPADJ): New macro.
7752         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7753         (allocate_stack): Handle TLS_DTV_AT_TP and
7754         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7755         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7756         Don't set PD->self.
7757         * init.c [__ia64__] (__NR_set_tid_address): Define.
7759         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7760         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7761         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7762         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7763         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7764         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7765         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7766         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7767         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7768         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7769         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7770         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7771         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7772         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7773         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7774         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7775         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7776         * sysdeps/ia64/bits/atomic.h: New file.
7777         * sysdeps/ia64/Makefile: New file.
7778         * sysdeps/ia64/pthread_spin_init.c: New file.
7779         * sysdeps/ia64/pthread_spin_lock.c: New file.
7780         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7781         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7782         * sysdeps/ia64/pthreaddef.h: New file.
7783         * sysdeps/ia64/tcb-offsets.sym: New file.
7784         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7785         * sysdeps/ia64/tls.h: New file.
7787         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7788         to syscall instead of no arguments.
7790 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7792         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7793         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7794         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7795         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7797         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7798         unused code.
7800         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7802         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7803         lowlevelbarrier.sym.
7804         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7805         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7806         Include lowlevelbarrier.h and don't define offsets locally.
7807         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7809         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7810         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7811         (__lll_mutex_timedlock_wait): Likewise.
7812         (lll_mutex_lock): Adjust asm for that.
7813         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7814         (lll_lock): Adjust asm for operand order change.
7815         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7816         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7818         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7819         Reverse order of parameters.
7820         (__lll_timedwait_tid): Remove regparms attribute.
7821         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7822         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7824         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7825         (__lll_timedwait_tid): Remove one unnecessary instruction.
7827         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7828         __lll_mutex_timedlock_wait only for NOT_IN_libc.
7829         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7830         lowlevelmutex.S.
7832         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7833         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7834         for NOT_IN_libc.
7835         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7836         lowlevellock.S.
7838         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7839         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
7840         for libc.so.
7841         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7842         define LOCK here (if UP is not defined).  The actual code is in
7843         lowlevelmutex.S.
7845         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7846         LOCK is already defined.  Don't define lll_unlock_wake_cb and
7847         __lll_timedwait_tid for libc.so.
7848         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7849         define LOCK here (if UP is not defined).  The actual code is in
7850         lowlevellock.S.
7852         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7853         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7854         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7855         instead of lowlevelsem.h.
7856         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7857         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7858         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7860         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7861         lowlevelrwlock.sym.
7862         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7863         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7864         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7866         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7867         register loading.
7868         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7869         last changed.  D'oh.
7871         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7873         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7874         of __libc_locking_needed.
7875         (lll_trylock): Initialize %eax to zero.
7877         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7878         pthread_cond_t definition.
7880 2003-03-10  Roland McGrath  <roland@redhat.com>
7882         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7883         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7884         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7885         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7886         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7888         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7889         Instead of setting PD->multiple_threads, set globals
7890         __pthread_multiple_threads and __libc_multiple_threads.
7891         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7892         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7893         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7895         * descr.h (struct pthread): Conditionalize first member on
7896         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
7897         containing an anonymous tcbhead_t.  Move `list' member out.
7898         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7899         * allocatestack.c: Remove use of `header.data.' prefix.
7900         * pthread_create.c: Likewise.
7901         * init.c (__pthread_initialize_minimal_internal): Likewise.
7902         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7903         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7904         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7905         * sysdeps/x86_64/tls.h: Likewise.
7906         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7907         (SINGLE_THREAD_P): Likewise.
7908         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7909         (SINGLE_THREAD_P): Likewise.
7910         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7911         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7913 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
7915         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7917         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7918         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7920         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7921         leftovers from the ia32 code.
7923         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7924         memory load.
7925         (clear_once_control): Don't load %esi.
7927         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7928         handling.
7930         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7932         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7933         * sysdeps/unix/sysv/linux/createthread.c: ...here.
7935         * Makefile (tests): Add tst-cond10.
7936         * tst-cond10.c: New file.
7938 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
7940         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7941         * tst-signal3.c (do_test): Likewise.
7942         * tst-sem5.c (do_test): Likewise.
7943         * tst-kill6.c (do_test): Likewise.
7944         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
7946         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7947         of inc/dec.
7948         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7949         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7950         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7951         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7952         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7953         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7954         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7955         Likewise.
7956         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7957         Likewise.
7958         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7960         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7962         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7963         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7964         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7965         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7967         * allocatestack.c (allocate_stack): If mprotect() fails free the
7968         TLS memory.
7970 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
7972         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7974         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7975         lll_wake_tid.  This was used only to work around kernel limits in
7976         the early days.
7977         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7978         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7979         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7980         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7982         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7983         (__pthread_initialize_minimal_internal): Change initialization of
7984         __static_tls_align_m1 appropriately.
7985         * pthreadP.h (__static_tls_align_m1): Renamed from
7986         __static_tls_align.
7987         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7988         instead of __static_tls_align-1.
7990 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
7992         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7994         * pthread_create.c: Define __pthread_keys using nocommon
7995         attribute, not by placing it explicitly in bss.
7996         Remove DEFINE_DEALLOC definition.  Not needed anymore.
7998         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7999         Use it in mmap call to allocate stacks.
8001         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8003         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8004         result of the thread function.
8006 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8008         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8009         version is just fine.
8011         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8012         (__pthread_child_handler): Renamed from pthread_child_handler,
8013         exported, and marked hidden.  Change all users.
8014         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8015         free __pthread_child_handler from child list.
8017 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8019         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8021         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8022         Fix handling of cancellation and failing pthread_mutex_unlock call.
8023         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8024         (__pthread_cond_wait): Likewise.
8026         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8027         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8028         lll_futex_timed_wait call.
8029         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8030         (pthread_rwlock_timedwrlock): Likewise.
8032         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8033         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8034         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8036         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8037         check of lll_futex_wake return value.
8039 2003-03-03  Roland McGrath  <roland@redhat.com>
8041         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8043         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8044         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8045         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8047 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8049         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8050         error for CPU clocks.
8052         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8053         _POSIX_MONOTONIC_CLOCK.
8054         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8056         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8057         recent kernels.
8059 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8061         * descr.h (struct pthread): Move cleanup field to the front.
8063 2003-03-01  Roland McGrath  <roland@redhat.com>
8065         * sem_open.c (sem_open): Braino fix.
8067 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8069         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8071         __pthread_cleanup_pop functionality.
8072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8074         * descr.h (struct pthread): Move tid field to the front now that
8075         it is often used.
8077         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8078         (__lll_mutex_timedlock_wait): Remove.
8079         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8080         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8081         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8082         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8083         (lll_unlock_wake_cb): Don't save and restore %esi.
8084         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8085         %esi.
8086         (__lll_timedwait_tid): Add alignment.
8087         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8088         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8089         %esi.
8090         (__lll_timedwait_tid): Removed.
8091         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8092         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8093         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8094         (pthread_barrier_wait): Don't save, load, and restore %esi for
8095         last thread.
8096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8097         (__pthread_cond_signal): Don't save, load, and restore %esi.
8098         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8099         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8100         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8101         Don't save, load, and restore %esi.
8103 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8106         Release lock before waking up the waiters.
8108         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8110         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8111         (reader_thread): Likewise.
8113         * sysdeps/pthread/pthread_rwlock_unlock.c
8114         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8115         to wake up readers if there are none.
8117         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8118         Release internal lock before wake threads.
8120 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8122         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8123         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8124         predefined.
8125         * tst-rwlock9.c: Likewise.
8126         * tst-rwlock10.c: New file.
8127         * tst-rwlock11.c: New file.
8129         * Makefile (tests): Add tst-dlsym1.
8130         * tst-dlsym1.c: New file.
8132         * init.c (__pthread_initialize_minimal_internal): Set
8133         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8134         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8136 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8138         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8140         * tst-cond2.c: Fix sychronization with child.
8142         * tst-rwlock8.c (reader_thread): Remove unused variable.
8144         * Makefile: Add rules to build and run tst-tls3.
8145         * tst-tls3.c: New file.
8146         * tst-tls3mod.c: New file.
8148         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8149         * tst-rwlock8.c: New file.
8150         * tst-rwlock9.c: New file.
8151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8152         complete broken rwlock implementation.
8153         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8154         Likewise.
8155         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8156         Likewise.
8157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8159         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8160         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8161         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8162         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8163         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8165 2003-02-23  Roland McGrath  <roland@redhat.com>
8167         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8169 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8171         * Makefile (tests): Add tst-context1.
8172         * tst-context1.c: New file.
8174         * Makefile (tests): Add tst-tls1 and tst-tls2.
8175         * tst-tls1.c: New file.
8176         * tst-tls2.c: New file.
8178         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8179         for failed cmpxchg.
8181         * pthread_create.c (start_thread): Set EXITING_BIT early.
8183         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8184         (THREAD_GETMEM_NC): Likewise.
8186 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8188         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8189         off 3 more bytes by using offset-less instructions when possible.
8191         * Makefile: Add dependency for $(objpfx)version.d.
8193         * eintr.c (eintr_source): Add unnecessary return but the compiler
8194         insists.
8196         * tst-kill3.c: Include <unistd.h>.
8198 2003-02-21  Roland McGrath  <roland@redhat.com>
8200         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8202 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8204         * Makefile (tests): Add tst-eintr1.
8205         (distribute): Add eintr.c.
8206         * tst-eintr1.c: New file.
8207         * eintr.c: New file.
8209         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8211         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8212         Disallow sending SIGCANCEL.
8214         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8215         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8216         * tst-kill1.c: New file.
8217         * tst-kill2.c: New file.
8218         * tst-kill3.c: New file.
8219         * tst-kill5.c: New file.
8220         * tst-kill6.c: New file.
8221         * tst-basic7.c: Renamed to...
8222         * tst-kill4.c: ...this.
8224 2003-02-21  Roland McGrath  <roland@redhat.com>
8226         * Makefile (install-lib-ldscripts): New variable.
8228 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8230         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8231         * pthread_cancel.c: Use INVALID_TD_P.
8232         * pthread_detach.c: Likewise.
8233         * pthread_getschedparam.c: Likewise.
8234         * pthread_setschedparam.c: Likewise.
8235         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8236         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8237         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8238         * pthread_timedjoin.c: Likewise.
8240         * tst-basic7.c: Include <signal.h>.
8242         * pthread_join.c (pthread_join): Limited checking for invalid
8243         descriptors.
8244         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8246 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8248         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8249         beginning of the loop.  Clear the entire first block of TSD.
8250         * Makefile (tests): Add tst-key4.
8251         * tst-key4.c: New file.
8253 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8255         * Makefile (tests): Add tst-basic7.
8256         * tst-basic7.c: New file.
8258         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8259         Add some more __builtin_expect.
8261         * pthreadP.h: Define dummy version of DEBUGGING_P.
8263 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8265         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8266         _POSIX_THREAD_PRIORITY_SCHEDULING.
8267         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8268         _XOPEN_REALTIME_THREADS.
8269         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8271         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8272         kernel returns EINVAL for PID <= 0, work around it.
8274         * Makefile (tests): Add tst-signal5.
8275         * tst-signal5.c: New file.
8277         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8278         and LOGIN_NAME_MAX.
8280         * tst-cancel1.c (tf): Block all signals.
8282         * Makefile (tests): Add tst-basic6.
8283         * tst-basic6.c: New file.
8285         * tst-basic1.c: Add test for process ID.
8287         * Makefile (tests): Add tst-cancel10.
8288         * tst-cancel10.c: New file.
8290         * Makefile (tests): Add tst-signal4.
8291         * tst-signal4.c: New file.
8293         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8294         __sigismember instead of sigismember.  Add __builtin_expect.
8296 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8298         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8299         pthread_setcancelstate, and pthread_rwlock_setpshared.
8301         * tst-cancel7.c (do_test): Make sure the pid file exists before
8302         canceling the thread.
8304         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8305         pthread_rwlock_timedrdlock tests.
8306         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8307         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8308         Check for invalid tv_nsec field.
8309         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8310         Likewise.
8312         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8313         recursive mutex of overflow.
8315         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8317         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8318         going into an endless loop.
8319         * Makefile (tests): Add tst-cancel9.
8320         * tst-cancel9.c: New file.
8322         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8324 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8326         * tst-mutex5.c (do_test): Add more timedlock tests.
8328         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8329         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8331         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8332         use INLINE_SYSCALL.  Error number is returned, not -1.
8334         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8335         and __deallocate_stack with internal_function.
8336         * pthread_create.c: Adjust definitions appropriately.
8337         * allocatestack.c: Likewise.
8339         * pthread_join.c: Add one more __builtin_expect.
8340         * pthread_timedjoin.c: Likewise.
8342         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8343         not data of sequence number does not match.
8344         Add one __builtin_expect.
8346         * Makefile (tests): Add tst-clock1.
8347         * tst-clock1.c: New file.
8349         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8350         negative arguments.
8351         * Makefile (tests): Add tst-basic5.
8352         * tst-basic5.c: New file.
8354 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8356         * Makefile (tests): Add tst-basic4.
8357         * tst-basic4.c: New file.
8359         * pthreadP.h: Add declaraction for __nptl_nthreads.
8360         * pthread_create.c: Define __nptl_nthreads
8361         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8362         after thread is done.  If then zero, call exit(0).
8363         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8364         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8365         * init.c (pthread_functions): Initialize ptr_nthreads.
8366         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8367         (__reclaim_stacks): Decrement __nptl_nthreads.
8368         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8369         Define.
8370         * Makefile (tests): Add tst-basic3.
8371         * tst-basic3.c: New file.
8373         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8374         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8375         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8376         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8377         if asynchronous canceling is enabled.
8378         * pthread_join.c (pthread_join): When recognizing circular joins,
8379         take into account the other thread might be already canceled.
8380         * Makefile (tests): Add tst-join5.
8381         * tst-join5.c: New file.
8383         * Makefile (tests): Add tst-join4.
8384         * tst-join4.c: New file.
8386 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8388         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8390 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8392         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8393         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8394         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8395         warning.
8396         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8397         to avoid warning.
8398         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8399         error if lll_futex_wake failed.
8401 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8404         handling of cancellation and failung pthread_mutex_unlock call.
8405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8406         * Makefile (tests): Add tst-cond8 and tst-cond9.
8407         * tst-cond8.c: New file.
8408         * tst-cond9.c: New file.
8410         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8412         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8413         non-standard initializers with __USE_GNU.
8415         * Makefile (tests): Add tst-cleanup3.
8416         * tst-cleanup3.c: New file.
8418 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8420         * Makefile (tests): Add tst-attr1 and tst-attr2.
8421         * tst-attr1.c: New file.
8422         * tst-attr2.c: New file.
8424         * Makefile: Add rules to build and run tst-atfork2 test.
8425         * tst-atfork2.c: New file.
8426         * tst-atfork2mod.c: New file.
8428         * sysdeps/unix/sysv/linux/unregister-atfork.c
8429         (__unregister_atfork): Free the memory allocated for the handlers
8430         after removing them from the lists.
8432         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8433         cleanup function.
8435         * tst-atfork1.c (do_test): Wait for the child we forked.
8436         Report error in child.
8438         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8440         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8442 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8444         * Makefile (tests): Add tst-cancel8.
8445         * tst-cancel8.c: New file.
8447         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8448         clearing of control variable.
8449         * Makefile (tests): Add tst-once3 and tst-once4.
8450         * tst-once3.c: New file.
8451         * tst-once4.c: New file.
8453 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8455         * sysdeps/sh/Makefile: New file.
8456         * sysdeps/sh/bits/atomic.h: New file.
8457         * sysdeps/sh/pthread_spin_init.c: New file.
8458         * sysdeps/sh/pthread_spin_lock.c: New file.
8459         * sysdeps/sh/pthread_spin_trylock.S: New file.
8460         * sysdeps/sh/pthread_spin_unlock.S: New file.
8461         * sysdeps/sh/pthreaddef.h: New file.
8462         * sysdeps/sh/tcb-offsets.sym: New file.
8463         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8464         * sysdeps/sh/tls.h: New file.
8465         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8466         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8467         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8468         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8469         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8470         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8471         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8472         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8473         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8474         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8475         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8476         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8477         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8478         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8479         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8480         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8481         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8482         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8483         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8484         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8485         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8486         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8487         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8488         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8489         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8490         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8491         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8492         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8493         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8494         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8496 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8498         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8499         according to POSIX.
8501         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8503 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8505         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8506         (TLS_GET_FS): New #define.
8507         (TLS_SET_FS): New #define.
8508         Correct value of __NR_set_thread_area.
8510         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8512 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8514         * Makefile (tests): Add tst-popen1.
8515         * tst-popen1.c: New file.
8517         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8518         but inactive generalization.
8519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8520         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8521         Minor optimization, remove one instruction.
8522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8524 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8526         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8528 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8530         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8531         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8532         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8533         * sysdeps/pthread/pthread_cond_signal.c: New file.
8534         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8535         * sysdeps/pthread/pthread_cond_wait.c: New file.
8536         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8537         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8538         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8539         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8540         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8541         * sysdeps/s390/Makefile: New file.
8542         * sysdeps/s390/bits/atomic.h: New file.
8543         * sysdeps/s390/pthread_spin_init.c: New file.
8544         * sysdeps/s390/pthread_spin_lock.c: New file.
8545         * sysdeps/s390/pthread_spin_trylock.c: New file.
8546         * sysdeps/s390/pthread_spin_unlock.c: New file.
8547         * sysdeps/s390/pthreaddef.h: New file.
8548         * sysdeps/s390/tcb-offsets.sym: New file.
8549         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8550         * sysdeps/s390/tls.h: New file.
8551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8552         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8553         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8554         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8555         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8556         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8557         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8558         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8559         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8560         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8561         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8562         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8563         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8564         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8565         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8566         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8567         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8568         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8569         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8570         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8571         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8572         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8573         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8575 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8577         * atomic.h: Add a couple more default implementations.
8578         (atomic_compare_and_exchange_acq): Use
8579         __arch_compare_and_exchange_32_acq in return value definition.  It
8580         always exists.
8581         (atomic_bit_set): Renamed from atomic_set_bit.
8582         Add missing atomic_ prefixes.
8584         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8585         thread library is available, use correct value to mark initialized
8586         once variable.
8588 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8590         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8591         __sysconf to determine pagesize.
8593         * pthread_create.c: Include <atomic.h>.
8594         * allocatestack.c (allocate_stack): Implement coloring of the
8595         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8596         size minus one.  Adjust users.
8597         * sysdeps/i386/i686/Makefile: New file.
8599 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8601         * allocatestack.c: Improve comment throughout the file.
8603         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8604         (__lll_lock_wait): Add branch prediction.
8605         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8606         (__lll_lock_wait): Likewise.
8607         (lll_unlock_wake_cb): Removed.
8609 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8611         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8612         _POSIX_THREAD_PRIORITY_SCHEDULING.
8614 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8616         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8617         Fix return type of ptr___pthread_getspecific.
8619 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8621         * Makefile (tests): Add tst-umask1.
8622         (tst-umask1-ARGS): Define.
8623         * tst-umask1.c: New file.
8625 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8627         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8628         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8629         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8630         pthread_rwlock_unlock.
8631         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8632         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8633         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8635         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8636         New file.
8637         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8638         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8639         New file.
8640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8641         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8642         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8643         New file.
8644         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8645         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8646         New file.
8647         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8648         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8649         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8650         New file.
8651         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8652         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8653         New file.
8654         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8656         * Makefile (libpthread-routines): Remove lowlevelcond and
8657         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8658         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8659         and pthread_cond_broadcast.
8660         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8661         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8662         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8663         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8664         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8665         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8666         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8667         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8668         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8669         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8674         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8675         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8676         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8677         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8678         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8679         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8680         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8681         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8682         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8683         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8684         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8685         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8686         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8687         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8688         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8689         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8690         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8692         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8693         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8694         of the code is moved to ...
8695         * sysdeps/pthread/createthread.c: ...here.  New file.
8697 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8699         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8700         (__new_sem_post): Clear %eax before returning.
8701         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8703         * Makefile (tests): Add tst-cleanup2.
8704         * tst-cleanup2.c: New file.
8706         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8707         Interpret first parameter correctly.
8709 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8711         * Makefile (headers): Add bits/semaphore.h.
8713 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8715         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8716         if not SHARED.
8718 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8720         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8721         must be used and mapping failed.
8722         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8724         * Makefile (CFLAGS-pthread_self.os): Define this, not
8725         CFLAGS-pthread_self.c.
8727 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8729         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8730         lll_unlock_wake_cb.
8732         * Makefile (libpthread-routines): Add version.  Add rules to build
8733         version.os and banner.h.
8734         * version.c: New file.
8736 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8738         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8739         the alias unconditional.
8740         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8742 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8744         * Makefile (CFLAGS-pthread_self.c): New definition.
8746 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8748         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8749         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8750         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8751         * init.c (__pthread_initialize_minimal_internal): Likewise.
8753 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8755         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8757         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8758         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8759         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8760         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8761         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8762         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8764 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8766         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8767         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8768         * tst-cancel-wrappers.sh: Remove all exceptions.
8770 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8772         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8773         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8775         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8776         Use __libc_pthread_functions array if SHARED.
8778         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8779         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8781         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8782         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8783         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8784         __libc_ptf_call instead of __libc_maybe_call.
8785         (PTF): New #define.
8786         (__libc_cleanup_region_start): Wrap function name with PTF call.
8787         (__libc_cleanup_region_end): Likewise.
8788         (__libc_cleanup_end): Likewise.
8790         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8791         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8792         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8793         * pthreadP.h: Add prototypes.
8795         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8796         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8797         __pthread_rwlock_unlock aliases.
8798         * pthreadP.h: Add prototypes for new aliases.
8800         * pthreadP.h (struct pthead_functions): Moved to...
8801         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8802         * init.c (pthread_functions): Add initializers for new elements.
8804         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8805         __pthread_cleanup_pop_restore aliases.
8806         * pthreadP.h: Add prototypes.
8808         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8809         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8810         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8811         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8812         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8813         * pthreadP.h: Adjust prototypes and callers.
8815 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
8817         * Makefile (tests): Add tst-cancel7.
8818         (tst-cancel7-ARGS): New variable.
8819         * tst-cancel7.c: New file.
8821         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8822         around gcc defficiencies.
8823         * old_pthread_cond_signal.c: Likewise.
8824         * old_pthread_cond_timedwait.c: Likewise.
8825         * old_pthread_cond_wait.c: Likewise.
8827         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8829 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8831         * Makefile (tests): Add tst-cond7.
8832         * tst-cond7.c: New file.
8834         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8835         (condvar_cleanup): Get condvar address from the right place.
8837         * atomic.h: Correct definitions of atomic_full_barrier,
8838         atomic_read_barrier, atomic_write_barrier.
8840         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8841         race-free.
8842         * old_pthread_cond_signal.c: Likewise.
8843         * old_pthread_cond_timedwait.c: Likewise.
8844         * old_pthread_cond_wait.c: Likewise.
8846 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
8848         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8850 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8852         * pthreadP.h (pthread_cond_2_0_t): New type.
8853         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8854         Use new type for the 2.0 condvar function prototypes.
8855         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8856         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8857         parameter.
8858         * old_pthread_cond_destroy.c: Likewise.
8859         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
8860         * old_pthread_cond_signal.c: Likewise.
8861         * old_pthread_cond_timedwait.c: Likewise.
8862         * old_pthread_cond_wait.c: Likewise.
8864         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8865         (__pthread_cond_wait): Don't save cancellation mode and seq value
8866         in same location.
8868         * herrno.c (__h_errno_location): Don't define as weak.
8870 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8872         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8873         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8874         and pthread_cond_wait.
8875         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8876         Renamed to...
8877         (__pthread_cond_broadcast_2_0): ... this.
8878         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8879         Renamed to...
8880         (__pthread_cond_destroy_2_0): ... this.
8881         * old_pthread_cond_init.c (__old_pthread_cond_init):
8882         Renamed to...
8883         (__pthread_cond_init_2_0): ... this.
8884         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8885         Renamed to...
8886         (__pthread_cond_signal_2_0): ... this.
8887         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8888         Renamed to...
8889         (__pthread_cond_wait_2_0): ... this.
8890         * pthread_cond_destroy.c: Include shlib-compat.h.
8891         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8892         * pthread_cond_init.c: Include shlib-compat.h.
8893         (pthread_cond_init): Change strong_alias into versioned_symbol.
8894         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8895         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8896         fields.
8897         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8898         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8899         __pthread_cond_wait_2_0): New prototypes.
8900         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8901         __old_pthread_cond_init, __old_pthread_cond_signal,
8902         __old_pthread_cond_wait): Removed.
8903         * init.c: Include shlib-compat.h.
8904         (pthread_functions): Guard ptr___pthread_attr_init_2_0
8905         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8906         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8907         ptr___pthread_cond_*_2_0 fields.
8908         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8909         pthread_cond_*@GLIBC_2.0 compatibility symbols.
8911         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8912         LIBC_SIGACTION was not yet defined.
8913         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8914         [!defined LIBC_SIGACTION] (__sigaction): New function and
8915         libc_hidden_weak.
8916         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8917         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8919 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8921         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8923 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
8925         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8926         New, larger type definition.
8927         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8928         implementation.
8929         * Versions [libpthread]: Add definitions for new pthread_cond_*
8930         interfaces for version GLIBC_2.3.2.
8931         * pthread_cond_init.c: Update initialization for new type definition.
8932         * Makefile (libpthread-routines): Remove pthread_cond_wait,
8933         pthread_cond_timedwait, pthread_cond_signal, and
8934         pthread_cond_broadcast.  Add old_pthread_cond_init,
8935         old_pthread_cond_destroy, old_pthread_cond_wait,
8936         old_pthread_cond_timedwait, old_pthread_cond_signal, and
8937         old_pthread_cond_broadcast.
8938         * old_pthread_cond_broadcast.c: New file.
8939         * old_pthread_cond_destroy.c: New file.
8940         * old_pthread_cond_init.c: New file.
8941         * old_pthread_cond_signal.c: New file.
8942         * old_pthread_cond_timedwait.c: New file.
8943         * old_pthread_cond_wait.c: New file.
8944         * pthreadP.h: Add prototypes for the compatibility interfaces.
8946         * pthread_cond_destroy.c: Don't include <errno.h>.
8948 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
8950         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8951         unnecessary zero offset when addressing MUTEX.
8953 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8955         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8956         __register_atfork.
8957         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8958         for __register_atfork.
8960 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8962         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8963         instead of ASSEMBLER test macro.
8965         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8966         __libc_current_sigrtmax): Add libc_hidden_def.
8968         * sysdeps/pthread/list.h: Remove assert.h include.
8970 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8972         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8973         __pthread_initialize_minimal_internal not
8974         __pthread_initialize_minimal.
8976 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
8978         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8979         __pthread_initialize_minimal as hidden.
8981         * init.c (__pthread_initialize_minimal_internal): Don't mark as
8982         constructor.
8984 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8986         * Makefile ($(inst_libdir)/libpthread.so): Depend on
8987         $(common-objpfx)format.lds, include that into the output script.
8988         Fix comment.
8989         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8991 2002-12-28  Andreas Jaeger  <aj@suse.de>
8993         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8994         nsec resolution changes.
8995         (xstat64_conv): Likewise.
8996         (xstat32_conv): Likewise.
8997         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8998         struct kernel_stat.
8999         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9000         structs stat and stat64.
9001         * time/time.h (__timespec_defined): Define for __USE_MISC.
9002         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9004 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9006         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9007         argument.
9008         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9009         (pthread_exit): Use strong_alias to avoid warnings.
9010         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9011         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9012         ptr___pthread_attr_init_2_*.
9013         * init.c (pthread_functions): Adjust.
9015 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9017         * forward.c: Make all functions available by default again.  It
9018         caused too much trouble.
9020         * pt-siglongjmp.c: Removed.
9022 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9024         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9025         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9026         * sysdeps/i386/Makefile: New file.
9027         * sysdeps/i386/tcb-offsets.sym: New file.
9028         * sysdeps/pthread/tcb-offsets.h: New file.
9029         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9030         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9032         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9033         __register_atfork...
9034         (GLIBC_2.3.2): ...here.
9036 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9038         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9039         pthread_attr_setstackaddr with __attribute_deprecated__.
9041 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9043         * pt-system.c (system): Remove cancellation handling.
9044         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9045         cancellation routines.
9047 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9049         * descr.h: Include <dl-sysdep.h>.
9050         (struct pthread): Move header.data.list to the back of the struct.
9051         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9052         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9053         (SYSINFO_OFFSEET): Likewise.
9055 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9057         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9058         Define.
9059         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9060         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9061         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9062         (USE_DL_SYSINFO): Undef.
9064 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9066         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9067         $(common-objpfx)libc.so.
9068         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9069         it is bigger than pipe buffer size even on arches with bigger
9070         page size.
9071         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9073 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9075         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9076         correct errno access for case that USE___THREAD is not defined.
9078 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9080         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9081         Patch by Marijn Ros <marijn@mad.scientist.com>.
9083 2002-12-22  Roland McGrath  <roland@redhat.com>
9085         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9087 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9089         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9091 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9093         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9094         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9095         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9097         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9098         of int $0x80.
9099         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9100         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9101         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9102         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9103         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9104         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9105         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9106         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9108         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9109         sysenter.
9110         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9112         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9114         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9115         in new TCB.
9116         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9117         that sysinfo is properly initialized.
9118         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9119         to 1 only for ld.so.
9121         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9122         RTLD_CORRECT_DYNAMIC_WEAK.
9124 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9126         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9127         Use return 0 as 6th argument to FORWARD4.
9128         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9130 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9132         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9133         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9134         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9135         (INIT_SYSINFO): New #define.
9136         (TLS_TP_INIT): Use INIT_SYSINFO.
9137         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9138         At test to make sure SYSINFO_OFFSET value is correct.
9139         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9141 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9143         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9144         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9145         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9146         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9147         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9148         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9149         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9151 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9153         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9154         macro instead of using int $0x80 directly.
9156         * sysdeps/pthread/bits/stdio-lock.h: New file.
9157         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9158         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9159         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9160         * Makefile (routines): Add libc-lowlevelmutex.
9162         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9163         __i686.get_pc_thunk.dx.
9165 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9167         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9168         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9169         ($(objpfx)tst-cancel-wrappers.out): New rule.
9170         * tst-cancel-wrappers.sh: New test.
9171         * tst-locale1.c: Include signal.h.
9172         (uselocale): Test static linking of __libc_current_sigrt*.
9174 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9176         * Makefile (tests): Add tst-cancel6.
9177         * tst-cancel6.c: New file
9179 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9181         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9182         Define meaningfully for assembler as well.
9183         * pthreadP.h (struct pthread_functions): Remove
9184         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9185         and ptr_pthread_attr_init_2_1 fields.
9186         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9187         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9188         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9189         (FORWARD3): Define using FORWARD4.
9190         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9191         versions.
9192         * pt-system.c: Remove duplicate stdlib.h include.
9194 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9196         * sem_init.c: Define sem_init@GLIBC_2.0.
9197         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9198         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9200         * flockfile.c: Moved to...
9201         * sysdeps/pthread/flockfile.c: ...here.  New file.
9202         * funlockfile.c: Moved to...
9203         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9204         * ftrylockfile.c: Moved to...
9205         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9207 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9209         * libc-cancellation.c: Guard both function with
9210         #if !defined NOT_IN_libc.
9211         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9212         automatically provided pthread wrappers.
9213         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9214         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9215         nor in libpthread.
9216         * pt-open.c: Removed.
9217         * pt-fcntl.c: Removed.
9218         * pt-fsync.c: Removed.
9219         * pt-lseek.c: Removed.
9220         * pt-msgrcv.c: Removed.
9221         * pt-msgsnd.c: Removed.
9222         * pt-msync.c: Removed.
9223         * pt-nanosleep.c: Removed.
9224         * pt-open64.c: Removed.
9225         * pt-pause.c: Removed.
9226         * pt-pread.c: Removed.
9227         * pt-pread64.c: Removed.
9228         * pt-pwrite.c: Removed.
9229         * pt-pwrite64.c: Removed.
9230         * pt-read.c: Removed.
9231         * pt-recv.c: Removed.
9232         * pt-recvfrom.c: Removed.
9233         * pt-recvmsg.c: Removed.
9234         * pt-send.c: Removed.
9235         * pt-sendto.c: Removed.
9236         * pt-sigtimedwait.c: Removed.
9237         * pt-sigwait.c: Removed.
9238         * pt-wait.c: Removed.
9239         * pt-waitpid.c: Removed.
9240         * pt-write.c: Removed.
9241         * pt-accept.c: Removed.
9242         * pt-close.c: Removed.
9243         * pt-connect.c: Removed.
9244         * pt-lseek64.c: Removed.
9245         * pt-sendmsg.c: Removed.
9246         * pt-tcdrain.c: Removed.
9248 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9250         * init.c (__pthread_initialize_minimal_internal): Renamed from
9251         __pthread_initialize_minimal.  Make old name an alias.  This
9252         converts a normal relocation into a relative relocation.
9254         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9256         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9257         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9258         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9259         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9260         pt-sigwaitinfo, pt-waitid, and pt-writev.
9261         * pt-creat.c: Removed.
9262         * pt-poll.c: Removed.
9263         * pt-pselect.c: Removed.
9264         * pt-readv.c: Removed.
9265         * pt-select.c: Removed.
9266         * pt-sigpause.c: Removed.
9267         * pt-sigsuspend.c: Removed.
9268         * pt-sigwaitinfo.c: Removed.
9269         * pt-waitid.c: Removed.
9270         * pt-writev.c: Removed.
9272         * init.c (pthread_functions): New variable.
9273         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9274         (or NULL) to __libc_pthread_init.
9275         * forward.c: Rewrite to use __libc:pthread_functions array to get
9276         function addresses.
9277         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9278         prototype.
9279         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9280         Take new parameter.  Copy content of variable pointed to by it
9281         to __libc_pthread_init.
9283         * pthreadP.h (struct pthread_functions): New type.
9284         (__libc_pthread_init): Declare.
9286         * pthread_attr_destroy.c: Add namespace protected alias.
9287         * pthread_attr_getdetachstate.c: Likewise.
9288         * pthread_attr_getinheritsched.c: Likewise.
9289         * pthread_attr_getschedparam.c: Likewise.
9290         * pthread_attr_getschedpolicy.c: Likewise.
9291         * pthread_attr_getscope.c: Likewise.
9292         * pthread_attr_setdetachstate.c: Likewise.
9293         * pthread_attr_setinheritsched.c: Likewise.
9294         * pthread_attr_setschedparam.c: Likewise.
9295         * pthread_attr_setschedpolicy.c: Likewise.
9296         * pthread_attr_setscope.c: Likewise.
9297         * pthread_cond_broadcast.c: Likewise.
9298         * pthread_cond_destroy.c: Likewise.
9299         * pthread_cond_init.c: Likewise.
9300         * pthread_cond_signal.c: Likewise.
9301         * pthread_cond_wait.c: Likewise.
9302         * pthread_condattr_destroy.c: Likewise.
9303         * pthread_condattr_init.c: Likewise.
9304         * pthread_equal.c: Likewise.
9305         * pthread_exit.c: Likewise.
9306         * pthread_getschedparam.c: Likewise.
9307         * pthread_self.c: Likewise.
9308         * pthread_setcancelstate.c: Likewise.
9309         * pthread_setschedparam.c: Likewise.
9310         * pthread_mutex_destroy.c: Likewise.
9311         * pthread_mutex_init.c: Likewise.
9312         * pthreadP.h: Add prototypes for the aliases.
9314         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9315         multiple_threads member in correct TCB to 1.
9317         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9318         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9319         member of thread decriptor, otherwise return unconditionally 1.
9321 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9323         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9324         regular Linux version.  Remove file.
9325         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9326         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9327         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9328         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9329         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9330         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9331         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9332         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9333         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9334         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9335         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9336         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9337         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9338         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9339         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9340         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9341         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9342         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9343         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9344         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9345         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9346         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9347         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9348         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9349         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9350         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9351         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9352         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9353         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9354         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9356 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9358         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9359         * sysdeps/unix/sysv/linux/open.c: Removed.
9360         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9361         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9362         * sysdeps/unix/sysv/linux/msync.c: Removed.
9363         * sysdeps/unix/sysv/linux/read.c: Removed.
9364         * sysdeps/unix/sysv/linux/close.c: Removed.
9365         * sysdeps/unix/sysv/linux/creat.c: Removed.
9366         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9367         * sysdeps/unix/sysv/linux/pause.c: Removed.
9368         * sysdeps/unix/sysv/linux/select.c: Removed.
9369         * sysdeps/unix/sysv/linux/write.c: Removed.
9371 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9373         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9374         element in TCB to see whether locking is needed.
9376         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9377         MULTIPLE_THREADS_OFFSET value is correct.
9379         * sysdeps/unix/sysv/linux/close.c: New file.
9380         * sysdeps/unix/sysv/linux/connect.S: New file.
9381         * sysdeps/unix/sysv/linux/creat.c: New file.
9382         * sysdeps/unix/sysv/linux/fsync.c: New file.
9383         * sysdeps/unix/sysv/linux/llseek.c: New file.
9384         * sysdeps/unix/sysv/linux/lseek.c: New file.
9385         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9386         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9387         * sysdeps/unix/sysv/linux/msync.c: New file.
9388         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9389         * sysdeps/unix/sysv/linux/open.c: New file.
9390         * sysdeps/unix/sysv/linux/open64.c: New file.
9391         * sysdeps/unix/sysv/linux/pause.c: New file.
9392         * sysdeps/unix/sysv/linux/poll.c: New file.
9393         * sysdeps/unix/sysv/linux/pread.c: New file.
9394         * sysdeps/unix/sysv/linux/pread64.c: New file.
9395         * sysdeps/unix/sysv/linux/pselect.c: New file.
9396         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9397         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9398         * sysdeps/unix/sysv/linux/readv.c: New file.
9399         * sysdeps/unix/sysv/linux/recv.S: New file.
9400         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9401         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9402         * sysdeps/unix/sysv/linux/select.c: New file.
9403         * sysdeps/unix/sysv/linux/send.S: New file.
9404         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9405         * sysdeps/unix/sysv/linux/sendto.S: New file.
9406         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9407         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9408         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9409         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9410         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9411         * sysdeps/unix/sysv/linux/system.c: New file.
9412         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9413         * sysdeps/unix/sysv/linux/wait.c: New file.
9414         * sysdeps/unix/sysv/linux/waitid.c: New file.
9415         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9416         * sysdeps/unix/sysv/linux/writev.c: New file.
9417         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9419         * pt-readv.c: Fix comment.
9421 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9423         * tst-cleanup1.c: Include stdlib.h.
9425         * tst-cancel5.c: New test.
9426         * Makefile (tests): Add tst-cancel5.
9427         (tst-cancel5): Link against libc.so libpthread.so in that order.
9429 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9431         * forward.c (test_loaded): Prevent recursive calls.
9433         * Makefile (routines): Add libc-cancellation.
9434         * libc-cancellation.c: New file.
9435         * descr.h (struct pthread): Add multiple_threads field.
9436         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9437         new thread descriptor to 1.
9438         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9439         Initialize multiple_thread field after successful thread creation.
9440         * cancellation.c (__do_cancel): Move to pthreadP.h.
9441         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9442         (__pthread_disable_asynccancel): Add internal_function attribute.
9443         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9444         * pthread_setcancelstate.c: Likewise.
9445         * pthread_setcanceltype.c: Likewise.
9446         * pthread_exit.c: Likewise.
9447         * pthreadP.h (CANCELLATION_P): Likewise.
9448         (__do_cancel): Define as static inline.
9449         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9450         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9451         declarations.
9452         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9453         fields.  Define MULTIPLE_THREADS_OFFSET.
9454         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9455         declaration.
9456         * sysdeps/unix/sysv/linux/accept.S: New file.
9457         * sysdeps/unix/sysv/linux/read.c: New file.
9458         * sysdeps/unix/sysv/linux/write.c: New file.
9459         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9460         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9461         initialization of __libc_locking_needed.
9462         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9463         __libc_locking_needed, use multiple_threads field in TCB.
9464         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9466 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9468         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9469         version.
9470         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9472         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9473         access to __libc_locking_needed for PIC.
9475 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9477         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9478         declare for libc.so.
9479         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9480         expression.
9481         (__libc_lock_lock): Put into statement expression.
9482         (__libc_lock_unlock): Remove trailing semicolon.
9483         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9485 2002-12-12  Roland McGrath  <roland@redhat.com>
9487         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9488         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9490 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9492         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9493         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9494         Initialize __libc_locking_needed.
9495         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9496         instead of __register_pthread_fork_handler.
9497         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9498         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9499         fork-gen with libc_pthread_init.
9500         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9501         of __register_pthread_fork_handler.
9502         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9503         of __register_pthread_fork_handler.
9504         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9505         __libc_locking_needed to determine whether lock prefix can be avoided.
9506         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9508 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9510         * Makefile (tests): Add tst-cleanup1.
9511         * tst-cleanup1.c: New file.
9512         * cancellation.c (__cleanup_thread): Removed.
9513         (__do_cancel): Remove call to __cleanup_thread.
9514         * pthreadP.h: Remove __cleanup_thread prorotype.
9516         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9517         Remember function and argument even if cancellation handler
9518         function is not available.
9519         (__libc_cleanup_region_end): Execute registered function directly if
9520         pthread functions are not available.
9521         (__libc_cleanup_end): Likewise.
9523         * init.c (__pthread_initialize_minimal): Fix initialization in
9524         static lib by preventing gcc from being too clever.
9526 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9528         * init.c (__pthread_initialize_minimal): Remove unneccesary
9529         sigaddset call.
9531         * Makefile (tests): We can run tst-locale2 now.
9533 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9535         * Versions: Remove duplicated sigwait entry.
9537 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9539         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9540         inside libpthread.
9542         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9544         * pthreadP.h: Declare __pthread_enable_asynccancel and
9545         __pthread_disable_asynccancel.
9546         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9547         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9548         * cancellation.c (__pthread_enable_asynccancel): New function.
9549         (__pthread_disable_asynccancel): New function.
9550         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9551         * pt-close.c: Likewise.
9552         * pt-connect.c: Likewise.
9553         * pt-creat.c: Likewise.
9554         * pt-fcntl.c: Likewise.
9555         * pt-fsync.c: Likewise.
9556         * pt-lseek.c: Likewise.
9557         * pt-lseek64.c: Likewise.
9558         * pt-msgrcv.c: Likewise.
9559         * pt-msgsnd.c: Likewise.
9560         * pt-msync.c: Likewise.
9561         * pt-nanosleep.c: Likewise.
9562         * pt-open.c: Likewise.
9563         * pt-open64.c: Likewise.
9564         * pt-pause.c: Likewise.
9565         * pt-poll.c: Likewise.
9566         * pt-pread.c: Likewise.
9567         * pt-pread64.c: Likewise.
9568         * pt-pselect.c: Likewise.
9569         * pt-pwrite.c: Likewise.
9570         * pt-pwrite64.c: Likewise.
9571         * pt-read.c: Likewise.
9572         * pt-readv.c: Likewise.
9573         * pt-recv.c: Likewise.
9574         * pt-recvfrom.c: Likewise.
9575         * pt-recvmsg.c: Likewise.
9576         * pt-select.c: Likewise.
9577         * pt-send.c: Likewise.
9578         * pt-sendmsg.c: Likewise.
9579         * pt-sendto.c: Likewise.
9580         * pt-sigpause.c: Likewise.
9581         * pt-sigsuspend.c: Likewise.
9582         * pt-sigtimedwait.c: Likewise.
9583         * pt-sigwait.c: Likewise.
9584         * pt-sigwaitinfo.c: Likewise.
9585         * pt-system.c: Likewise.
9586         * pt-tcdrain.c: Likewise.
9587         * pt-wait.c: Likewise.
9588         * pt-waitid.c: Likewise.
9589         * pt-waitpid.c: Likewise.
9590         * pt-write.c: Likewise.
9591         * pt-writev.c: Likewise.
9592         * pthread_join.c: Likewise.
9593         * pthread_timedjoin.c: Likewise.
9595         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9596         (__xpg_sigpause): New function.
9597         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9599 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9601         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9603         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9604         _GI_pthread_cleanup_pop to pthreadP.h.
9606         * ftrylockfile.c: Use _IO_lock_trylock instead of
9607         pthread_mutex_trylock.
9609         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9610         (CANCEL_RESET): Likewise.
9611         (__pthread_setcanceltype_): Declare.
9612         (__pthread_mutex_lock_internal): Declare.
9613         (__pthread_mutex_unlock_internal): Declare.
9614         (__pthread_once_internal): Declare.
9615         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9616         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9618         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9619         and pthread_mutex_unlock.
9620         * pthread_cond_wait.c: Likewise.
9621         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9622         * pthread_mutex_unlock.c: Likewise.
9624         * pthread_setcanceltype.c: Add additional alias
9625         __pthread_setcanceltype.
9627         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9628         * sem_open.c (sem_open): Likewise.
9629         Use __libc_open, __libc_write, and __libc_close instead of
9630         open, write, and close respectively.
9632         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9633         Rewrite as statement expression since it must return a value.
9635         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9636         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9637         __pthread_kill.
9639         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9640         alias __pthread_once_internal.
9642         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9644 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9646         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9647         * tst-stdio1.c: New file.
9648         * tst-stdio2.c: New file.
9650         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9652         * Makefile (tests): Comment out tst-locale2 for now.
9653         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9655         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9656         -D_IO_MTSAFE_IO.
9657         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9658         Use _IO_lock_init instead of explicit assignment.
9660         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9661         Define __libc_lock_* and __libc_lock_recursive macros with
9662         lowlevellock macros, not pthread mutexes.
9664         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9665         of pthread_mutex_lock.
9666         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9667         instead of pthread_mutex_unlock.
9669 2002-12-06  Roland McGrath  <roland@redhat.com>
9671         * allocatestack.c (__stack_user): Use uninitialized defn.
9672         * init.c (__pthread_initialize_minimal): Initialize it here.
9674 2002-12-05  Roland McGrath  <roland@redhat.com>
9676         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9677         string.
9678         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9680         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9681         missing & here too.
9683 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9685         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9686         lowlevellock.
9687         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9688         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9689         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9690         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9691         for __libc_lock_* macros.
9692         * Makefile (routines): Add libc-lowlevellock.
9694 2002-10-09  Roland McGrath  <roland@redhat.com>
9696         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9697         Under [__PIC__], call the function via the pointer fetched for
9698         comparison rather than a call by name that uses the PLT.
9699         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9700         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9701         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9702         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9703         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9705 2002-12-04  Roland McGrath  <roland@redhat.com>
9707         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9709         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9710         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9712         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9714 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9716         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9717         a completely opaque, non-integer type.
9718         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9720 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9722         * sysdeps/i386/tls.h: Include stdlib.h.
9723         * sysdeps/x86_64/tls.h: Likewise.
9725 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9727         * Makefile (tests): Add tst-locale2.
9728         (tests-static): Likewise.
9729         * tst-locale2.c: New file.
9731         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9732         volatile and add memory clobbers to lock operations.
9734 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9736         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9737         * sysdeps/i386/i486/bits/atomic.h: New file.
9738         * sysdeps/i386/i586/bits/atomic.h: New file.
9739         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9740         include i486 version.
9741         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9742         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9743         Patch by Marijn Ros <marijn@mad.scientist.com>.
9745         * allocatestack.c (get_cached_stack): Don't crash if we first
9746         found a stack with a larger size then needed.
9747         Reported by Hui Huang <hui.huang@sun.com>.
9749         * Makefile (tests): Add tst-sysconf.
9750         * tst-sysconf.c: New file.
9752         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9753         PTHREAD_THREADS_MAX.
9755 2002-12-02  Roland McGrath  <roland@redhat.com>
9757         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9758         Declare using hidden_proto instead of attribute_hidden, so there are
9759         non-.hidden static symbols for gdb to find.
9760         (__pthread_keys): Likewise.
9761         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9762         * allocatestack.c (__stack_user): Likewise.
9763         * pthread_create.c (__pthread_keys): Likewise.
9764         (__nptl_threads_events, __nptl_last_event): Make these static instead
9765         of hidden.
9766         * pthread_key_create.c (__pthread_pthread_keys_max,
9767         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9769 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9771         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9772         statically.
9773         * tst-locale1.c: New file.
9775         * pthread_cond_timedwait.c: Include <stdlib.h>.
9777         * Makefile (tests): Add tst-fork2 and tst-fork3.
9778         * tst-fork2.c: New file.
9779         * tst-fork3.c: New file.
9781 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9783         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9785         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9786         require it to 200112L.
9788         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9789         instruction only if HAVE_CMOV is defined.
9790         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9792         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9794         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9796         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9798         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9800 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9802         * sysdeps/x86_64/bits/atomic.h: New file.
9804         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9805         16-bit operations.
9807         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9808         possible since gettid cannot fail.
9810         * sysdeps/x86_64/pthreaddef.h: New file.
9812         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9814         * sysdeps/x86_64/pthread_spin_init.c: New file.
9815         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9816         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9817         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9819         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9820         Add missing lock prefix.  Minute optimization.
9822         * tst-spin2.c (main): Also check successful trylock call.
9824         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9825         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
9827         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9828         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
9830         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
9831         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9832         value in case of an error.  Add support for INTERNAL_SYSCALL.
9834         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9835         value in case of an error.
9837         * sysdeps/x86_64/tls.h: New file.
9839 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9841         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
9842         takes the array member name and the index as parameters.
9843         (THREAD_SETMEM_NC): Likewise.
9844         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9845         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9846         interfaces.
9848         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9849         to decide which code to use.
9850         (THREAD_SETMEM_NC): Likewise.
9852         * allocatestack.c (queue_stack): Don't remove stack from list here.
9853         Do it in the caller.  Correct condition to prematurely terminate
9854         loop to free stacks.
9855         (__deallocate_stack): Remove stack from list here.
9857 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9859         * Makefile (tests): Add tst-stack1.
9860         * tst-stack1.c: New file.
9862         * allocatestack.c (allocate_stack): Initialize the TCB on a user
9863         provided stack.
9865         * pthread_attr_getstack.c: Return bottom of the thread area.
9867 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
9869         * Makefile (libpthread-routines): Add pt-allocrtsig and
9870         pthread_kill_other_threads.
9871         * pt-allocrtsig.c: New file.
9872         * pthread_kill_other_threads.c: New file.
9873         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9874         all three functions.
9875         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9876         allocrtsig.
9877         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9878         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9879         and __libc_allocate_rtsig_private.
9880         * Versions (libpthread): Export pthread_kill_other_threads_np,
9881         __libc_current_sigrtmin, and __libc_current_sigrtmax.
9883 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
9885         * allocatestack.c (allocate_stack): stackaddr in attribute points to
9886         the end of the stack.  Adjust computations.
9887         When mprotect call fails dequeue stack and free it.
9888         * pthread_attr_setstack.c: Store top of the stack in stackaddr
9889         attribute.
9890         * pthread_getattr_np.c: Likewise.
9892         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9893         surprises.
9895 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
9897         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9898         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9900 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
9902         * pthread_getspecific.c: Optimize access to first 2nd-level array.
9903         * pthread_setspecific.c: Likewise.
9905 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
9907         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9908         definitions.  Get them from the official place.
9909         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9911         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9912         Use new CLONE_ flags in clone() calls.
9914         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9915         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9917         * Versions: Add pthread_* functions for libc.
9918         * forward.c: New file.
9920         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9921         errno-loc.
9922         * herrno.c: New file.
9923         * res.c: New file.
9925         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9926         sem_trywait, and sem_timedwait.  Add herrno and res.
9927         * sem_init.c: Don't initialize lock and waiters members.
9928         * sem_open.c: Likewise.
9929         * sem_post.c: Removed.
9930         * sem_wait.c: Removed.
9931         * sem_trywait.c: Removed.
9932         * sem_timedwait.c: Removed.
9933         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9934         Includes full implementations of sem_post, sem_wait, sem_trywait,
9935         and sem_timedwait.
9936         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9937         for new implementation.
9938         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9939         and waiters fields.
9941         * tst-sem3.c: Improve error message.
9942         * tst-signal3.c: Likewise.
9944         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9945         to tell the kernel about the termination futex and to initialize tid
9946         member.  Don't initialize main_thread.
9947         * descr.h (struct pthread): Remove main_thread member.
9948         * cancelllation.c (__do_cancel): Remove code handling main thread.
9949         The main thread is not special anymore.
9951         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
9952         size of the stacks to stack_cache_actsize.
9954         * pt-readv.c: Add missing "defined".
9955         * pt-sigwait.c: Likewise.
9956         * pt-writev.c: Likewise.
9958 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
9960         * Versions: Export __connect from libpthread.
9961         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9963         * Makefile (libpthread-routines): Add pt-raise.
9964         * sysdeps/unix/sysv/linux/raise.c: New file.
9965         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9966         * sysdeps/generic/pt-raise.c: New file.
9968         * pthread_cond_init.c: Initialize all data elements of the condvar
9969         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9971         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9972         * pthread_create.c: Likewise.
9974         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9975         * tst-key1.c: New file.
9976         * tst-key2.c: New file.
9977         * tst-key3.c: New file.
9979         * Versions: Export pthread_detach for version GLIBC_2.0.
9980         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9982 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
9984         * pthread_key_create.c: Terminate search after an unused key was found.
9985         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9987         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9988         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9990 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
9992         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9993         dynamic lookup for errno in PIC.
9995         * allocatestack.c (get_cached_stack): Rearrange code slightly to
9996         release the stack lock as soon as possible.
9997         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9998         the static TLS block.
9999         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10001         * cancellation.c: Renamed from cancelation.c.
10002         * Makefile: Adjust accordingly.
10003         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10004         * cleanup_defer.c: Use CANCELLATION_P.
10005         * pthread_testcancel.c: Likewise.
10006         * descr.h: Fix spelling in comments.
10007         * init.c: Likewise.
10008         * pthread_getattr_np.c: Likewise.
10009         * pthread_getschedparam.c: Likewise.
10010         * pthread_setschedparam.c: Likewise.
10011         * Versions: Likewise.
10013         * pt-pselect.c: New file.
10014         * Makefile (libpthread-routines): Add pt-pselect.
10015         * Versions: Add pselect.
10017         * tst-cancel4.c: New file.
10018         * Makefile (tests): Add tst-cancel4.
10020 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10022         * pthread_mutex_lock.c: Always record lock ownership.
10023         * pthread_mutex_timedlock.c: Likewise.
10024         * pthread_mutex_trylock.c: Likewise.
10026         * pt-readv.c: New file.
10027         * pt-writev.c: New file.
10028         * pt-creat.c: New file.
10029         * pt-msgrcv.c: New file.
10030         * pt-msgsnd.c: New file.
10031         * pt-poll.c: New file.
10032         * pt-select.c: New file.
10033         * pt-sigpause.c: New file.
10034         * pt-sigsuspend.c: New file.
10035         * pt-sigwait.c: New file.
10036         * pt-sigwaitinfo.c: New file.
10037         * pt-waitid.c: New file.
10038         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10039         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10040         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10041         * Versions: Add all the new functions.
10043         * tst-exit1.c: New file.
10044         * Makefile (tests): Add tst-exit1.
10046         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10048 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10050         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10052         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10053         call.  pthread_join is an official cancellation point.
10054         * pthread_timedjoin.c: Likewise.
10056         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10057         and the condvar's mutex are retrieved.
10058         * pthread_cond_timedwait.c: Likewise.
10059         Reported by dice@saros.East.Sun.COM.
10061 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10063         * pthreadP.h: Cut out all type definitions and move them...
10064         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10065         * pthreadP.h: Include <internaltypes.h>.
10067         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10068         performance tweaks.
10070         * sem_trywait.c: Shuffle #includes around to get right order.
10071         * sem_timedwait.c: Likewise.
10072         * sem_post.c: Likewise.
10073         * sem_wait.c: Likewise.
10075         * nptl 0.3 released.
10077         * Makefile (tests): Add tst-signal3.
10078         * tst-signal3.c: New file.
10080 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10082         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10083         the asms modify the sem object.
10084         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10086         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10087         the actual members.
10088         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10089         * semaphoreP.h: Include pthreadP.h.
10090         * sem_getvalue.c: Adjust to sem_t change.
10091         * sem_init.c: Likewise.
10092         * sem_open.c: Likewise.
10093         * sem_post.c: Likewise.
10094         * sem_timedwait.c: Likewise.
10095         * sem_trywait.c: Likewise.
10096         * sem_wait.c: Likewise.
10098 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10100         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10101         * tst-basic2.c: New file.
10102         * tst-exec1.c: New file.
10103         * tst-exec2.c: New file.
10104         * tst-exec3.c: New file.
10106         * tst-fork1.c: Remove extra */.
10108         * nptl 0.2 released.  The API for IA-32 is complete.