* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): No
[glibc.git] / nptl / ChangeLog
blobaff4a915dac74fc15772bf51efc8b23d65ea208e
1 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
3         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
4         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
5         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
6         lll_futex_timed_wait.
8         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
9         __lll_robust_unlock): Rewrite as macros instead of inline functions.
10         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
11         __lll_robust_unlock, __lll_wait_tid): Likewise.
13 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
15         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
16         Fix a pasto.
17         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
18         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
19         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
20         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
21         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
22         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
23         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
24         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
25         kernel-features.h.
26         (__pthread_cond_wait, __condvar_w_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_loc1 and some
29         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
30         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
31         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
32         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
33         process private.  Switch DW_CFA_advance_loc{1,2} and some
34         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
35         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
36         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
37         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
38         Likewise.
39         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
40         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
41         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
42         Likewise.
43         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
44         (__pthread_cond_broadcast): Compare %r8 instead of
45         dep_mutex-cond_*(%rdi) with $-1.
46         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
47         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
48         of oring.
50 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
52         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
54 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
56         * allocatestack.c: Include kernel-features.h.
57         * pthread_create.c: Likewise.
58         * pthread_mutex_init.c: Likewise.
59         * init.c: Likewise.
60         * pthread_cond_timedwait.c: Likewise.
61         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
62         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
63         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
64         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
65         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
66         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
67         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
68         Likewise.
69         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
70         Likewise.
71         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
72         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
73         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
74         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
76 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
78         * sysdeps/unix/sysv/linux/sparc/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/s390/bits/pthreadtypes.h
84         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
85         byte elements.  One of them is the new __shared element.
86         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
87         adjust names of other padding elements.
88         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
89         Renamed __pad1 element to __shared, adjust names of other padding
90         elements.
91         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
92         (pthread_rwlock_t): Likewise.
93         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
94         typo.
96 2007-08-09  Anton Blanchard  <anton@samba.org>
98         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
100 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
102         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
103         <kernel-features.h>.
104         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
106 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
108         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
109         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
110         dealing with robust mutexes.
111         * pthread_mutex_timedlock.c: Likewise.
112         * pthread_mutex_trylock.c: Likewise.
113         * pthread_mutex_unlock.c: Likewise.
114         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
116 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
118         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
119         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
120         (PTHREAD_MUTEX_PSHARED): Define.
121         * pthread_mutex_init.c (__pthread_mutex_init): Set
122         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
123         mutexes.
124         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
125         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
126         as second argument to lll_lock.
127         (LLL_MUTEX_TRYLOCK): Take mutex as argument
128         instead of its __data.__lock field.
129         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
130         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
131         to lll_robust_lock.
132         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
133         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
134         instead of mutex->__data.__kind directly, pass
135         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
136         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
137         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
138         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
139         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
140         to lll_timedlock, lll_robust_timedlock, lll_unlock and
141         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
142         of mutex->__data.__kind directly.
143         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
144         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
145         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
146         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
147         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
148         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
149         and lll_futex_wake.
150         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
151         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
152         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
153         directly.
154         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
155         Take mutex as argument instead of its __data.__lock field, pass
156         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
157         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
158         __data.__lock field.
159         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
160         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
161         to lll_robust_cond_lock.
162         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
163         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
164         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
165         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
166         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
167         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
168         lll_futex_wait.
169         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
170         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
171         lll_futex_wake.
172         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
173         pshared variable, pass it to lll_lock, lll_unlock,
174         lll_futex_timedwait and lll_futex_wake.
175         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
176         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
177         and lll_futex_wake.
178         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
179         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
180         macro.
181         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
182         lll_futex_wake_unlock): Likewise.
183         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
184         Likewise.
185         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
186         lll_futex_wake_unlock): Likewise.
187         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
188         Likewise.
189         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
190         lll_futex_wake_unlock): Likewise.
191         (lll_futex_wake): Fix a typo.
192         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
194         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
195         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
196         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
198         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
199         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
201         (__pthread_cond_timedwait): Likewise.
202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
203         (__condvar_cleanup, __pthread_cond_wait): Likewise.
205 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
207         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
208         Don't use CGOTSETUP and CGOTRESTORE macros.
209         (CGOTSETUP, CGOTRESTORE): Remove.
210         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
211         @local symbol.
213 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
215         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
216         definitions for private futexes.
217         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
218         kernel-features.h and lowlevellock.h.  Use private futexes if
219         they are available.
220         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
221         (__lll_mutex_lock_wait): Rename to
222         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
223         (__lll_mutex_timedlock_wait): Rename to ...
224         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
225         Don't compile in for libc.so.
226         (__lll_mutex_unlock_wake): Rename to ...
227         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
228         (__lll_timedwait_tid): Use __NR_gettimeofday.
229         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
230         the header from assembler.  Renamed all lll_mutex_* resp.
231         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
232         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
233         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
234         Define.
235         (__lll_lock_wait_private): Add prototype.
236         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
237         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
238         __lll_unlock_wake): Likewise.
239         (lll_lock): Add private argument.  Call __lll_lock_wait_private
240         if private is constant LLL_PRIVATE.
241         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
242         lll_timedlock, lll_robust_timedlock): Add private argument.
243         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
244         if private is constant LLL_PRIVATE.
245         (lll_robust_unlock, lll_robust_dead): Add private argument.
246         (lll_lock_t): Remove.
247         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
248         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
249         lll_cond_wake, lll_cond_broadcast): Remove.
250         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
251         kernel-features.h and lowlevellock.h.
252         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
253         (LOAD_FUTEX_WAIT): Define.
254         (__lll_robust_mutex_lock_wait): Rename to ...
255         (__lll_robust_lock_wait): ... this.  Add private argument.
256         Use LOAD_FUTEX_WAIT macro.
257         (__lll_robust_mutex_timedlock_wait): Rename to ...
258         (__lll_robust_timedlock_wait): ... this.    Add private argument.
259         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
260         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
261         lowlevellock.h.
262         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
263         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
264         __lll_mutex_{lock,unlock}_*.
265         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
266         lowlevellock.h and pthread-errnos.h.
267         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
268         FUTEX_CMP_REQUEUE, EINVAL): Remove.
269         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
270         __lll_mutex_{lock,unlock}_*.
271         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
272         lowlevellock.h and pthread-errnos.h.
273         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
274         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
275         __lll_mutex_{lock,unlock}_*.
276         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
277         lowlevellock.h.
278         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
279         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
280         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
281         (__condvar_tw_cleanup): Likewise.
282         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
283         lowlevellock.h.
284         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
285         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
286         __lll_mutex_{lock,unlock}_*.
287         ( __condvar_w_cleanup): Likewise.
288         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
289         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
291         lowlevellock.h.
292         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
293         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
294         __lll_mutex_{lock,unlock}_*.
295         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
296         lowlevellock.h.
297         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
298         FUTEX_PRIVATE_FLAG): Remove.
299         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
300         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
302         lowlevellock.h.
303         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
304         FUTEX_PRIVATE_FLAG): Remove.
305         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
306         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
308         lowlevellock.h.
309         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
310         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
311         __lll_mutex_{lock,unlock}_*.
312         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
313         lowlevellock.h.
314         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
315         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
316         __lll_mutex_{lock,unlock}_*.
317         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
318         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
319         (__new_sem_post): Use standard initial exec code sequences.
320         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
321         lowlevellock.h.
322         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
323         FUTEX_PRIVATE_FLAG): Remove.
324         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
325         exec code sequences.
326         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
327         (__new_sem_trywait): Use standard initial exec code sequences.
328         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
329         (__new_sem_wait): Use standard initial exec code sequences.
331 2007-07-31  Anton Blanchard  <anton@samba.org>
333         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
334         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
335         atomic_full_barrier.
337 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
339         * allocatestack.c (stack_cache_lock): Change type to int.
340         (get_cached_stack, allocate_stack, __deallocate_stack,
341         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
342         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
343         as second argument to lll_lock and lll_unlock macros on
344         stack_cache_lock.
345         * pthread_create.c (__find_in_stack_list): Likewise.
346         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
347         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
348         as second argument.
349         * descr.h (struct pthread): Change lock and setxid_futex field
350         type to int.
351         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
352         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
353         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
354         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
355         Likewise.
356         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
357         * pthread_cond_init.c (__pthread_cond_init): Likewise.
358         * pthreadP.h (__attr_list_lock): Change type to int.
359         * pthread_attr_init.c (__attr_list_lock): Likewise.
360         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
361         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
362         lll_{,un}lock.
363         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
364         also for lll_futex_{wake,wait}.
365         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
366         a pointer to const.
367         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
368         LLL_SHARED as second argument to lll_{,un}lock.
369         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
370         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
371         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
372         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
373         Likewise.
374         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
375         as second argument to lll_{,un}lock macros on pd->lock.
376         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
377         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
378         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
379         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
380         Likewise.
381         * sysdeps/pthread/createthread.c (do_clone, create_thread):
382         Likewise.
383         * pthread_once.c (once_lock): Change type to int.
384         (__pthread_once): Pass LLL_PRIVATE as second argument to
385         lll_{,un}lock macros on once_lock.
386         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
387         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
388         rwlock->__data.__shared as second argument to them and similarly
389         for lll_futex_w*.
390         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
391         Likewise.
392         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
393         Likewise.
394         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
395         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
396         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
397         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
398         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
399         to lll_{,un}lock macros on __sem_mappings_lock.
400         * sem_open.c (check_add_mapping): Likewise.
401         (__sem_mappings_lock): Change type to int.
402         * semaphoreP.h (__sem_mappings_lock): Likewise.
403         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
404         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
405         instead of lll_*mutex_*, pass LLL_SHARED as last
406         argument.
407         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
408         pass LLL_SHARED as last argument.
409         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
410         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
411         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
412         pass LLL_SHARED as last argument.
413         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
414         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
415         LLL_SHARED as last argument.
416         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
417         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
418         Similarly.
419         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
420         __libc_lock_lock_recursive, __libc_lock_unlock,
421         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
422         argument to lll_{,un}lock.
423         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
424         _IO_lock_unlock): Likewise.
425         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
426         compound literal.
427         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
428         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
429         __fork_lock.
430         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
431         free_mem): Likewise.
432         (__fork_lock): Change type to int.
433         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
434         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
435         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
436         lll_futex_wake.
437         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
438         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
439         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
440         New function.
441         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
442         pass it through to lll_futex_*wait, only compile in when
443         IS_IN_libpthread.
444         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
445         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
446         argument and pass it through to lll_futex_*wait.
447         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
448         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
449         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
450         inline functions to __lll_* resp. __lll_robust_*.
451         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
452         (lll_mutex_dead): Add private argument.
453         (__lll_lock_wait_private): New prototype.
454         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
455         __lll_robust_lock_timedwait): Add private argument to prototypes.
456         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
457         call __lll_lock_wait_private, otherwise pass private to
458         __lll_lock_wait.
459         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
460         __lll_robust_timedlock): Add private argument, pass it to
461         __lll_*wait functions.
462         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
463         call __lll_unlock_wake_private, otherwise pass private to
464         __lll_unlock_wake.
465         (__lll_robust_unlock): Add private argument, pass it to
466         __lll_robust_unlock_wake.
467         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
468         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
469         argument, pass it through to __lll_* inline function.
470         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
471         (lll_lock_t): Remove.
472         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
473         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
474         lll_cond_wake, lll_cond_broadcast): Remove.
475         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
476         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
477         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
478         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
479         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
480         the header from assembler.  Renamed all lll_mutex_* resp.
481         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
482         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
483         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
484         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
485         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
486         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
487         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
488         Remove prototype.
489         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
490         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
491         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
492         (lll_trylock): Likewise, use __lll_trylock_asm, pass
493         MULTIPLE_THREADS_OFFSET as another asm operand.
494         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
495         MULTIPLE_THREADS_OFFSET as last asm operand, call
496         __lll_lock_wait_private if private is constant LLL_PRIVATE,
497         otherwise pass private as another argument to __lll_lock_wait.
498         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
499         lll_timedlock, lll_robust_timedlock): Add private argument, pass
500         private as another argument to __lll_*lock_wait call.
501         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
502         MULTIPLE_THREADS_OFFSET as another asm operand, call
503         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
504         otherwise pass private as another argument to __lll_unlock_wake.
505         (lll_robust_unlock): Add private argument, pass private as another
506         argument to __lll_unlock_wake.
507         (lll_robust_dead): Add private argument, use __lll_private_flag
508         macro.
509         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
510         LLL_MUTEX_LOCK_INITIALIZER.
511         (lll_lock_t): Remove.
512         (LLL_LOCK_INITIALIZER_WAITERS): Define.
513         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
514         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
515         lll_cond_wake, lll_cond_broadcast): Remove.
516         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
517         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
518         2007-05-2{3,9} changes.
519         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
520         kernel-features.h and lowlevellock.h.
521         (LOAD_PRIVATE_FUTEX_WAIT): Define.
522         (LOAD_FUTEX_WAIT): Rewritten.
523         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
524         define.
525         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
526         (__lll_mutex_lock_wait): Rename to ...
527         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
528         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
529         (__lll_mutex_timedlock_wait): Rename to ...
530         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
531         contains private argument.  Don't compile in for libc.so.
532         (__lll_mutex_unlock_wake): Rename to ...
533         (__lll_unlock_wake): ... this.  %ecx contains private argument.
534         Don't compile in for libc.so.
535         (__lll_timedwait_tid): Use __NR_gettimeofday.
536         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
537         kernel-features.h and lowlevellock.h.
538         (LOAD_FUTEX_WAIT): Define.
539         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
540         define.
541         (__lll_robust_mutex_lock_wait): Rename to ...
542         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
543         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
544         macro.
545         (__lll_robust_mutex_timedlock_wait): Rename to ...
546         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
547         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
548         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
549         lowlevellock.h.
550         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
551         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
552         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
553         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
554         to __lll_lock_wait in %edx.
555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
556         Include lowlevellock.h and pthread-errnos.h.
557         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
558         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
559         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
560         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
561         pass LLL_SHARED in %ecx to both __lll_lock_wait and
562         __lll_unlock_wake.
563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
564         Include lowlevellock.h and pthread-errnos.h.
565         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
566         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
567         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
568         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
569         pass LLL_SHARED in %ecx to both __lll_lock_wait and
570         __lll_unlock_wake.
571         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
572         Include lowlevellock.h.
573         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
574         Don't define.
575         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
576         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
577         pass LLL_SHARED in %ecx to both __lll_lock_wait and
578         __lll_unlock_wake.  Use __NR_gettimeofday.
579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
580         Include lowlevellock.h.
581         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
582         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
583         to __lll_*, pass cond_lock address in %edx rather than %ecx to
584         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
585         and __lll_unlock_wake.
586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
587         Include lowlevellock.h.
588         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
589         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
590         MUTEX(%ebx) address in %edx rather than %ecx to
591         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
592         and __lll_unlock_wake.  Move return value from %ecx to %edx
593         register.
594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
595         Include lowlevellock.h.
596         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
597         Don't define.
598         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
599         MUTEX(%ebp) address in %edx rather than %ecx to
600         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
601         and __lll_unlock_wake.  Move return value from %ecx to %edx
602         register.  Use __NR_gettimeofday.
603         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
604         Include lowlevellock.h.
605         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
606         Don't define.
607         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
608         MUTEX(%ebp) address in %edx rather than %ecx to
609         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
610         and __lll_unlock_wake.  Move return value from %ecx to %edx
611         register.  Use __NR_gettimeofday.
612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
613         Include lowlevellock.h.
614         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
615         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
616         MUTEX(%edi) address in %edx rather than %ecx to
617         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
618         and __lll_unlock_wake.
619         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
620         Include lowlevellock.h.
621         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
622         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
623         MUTEX(%ebx) address in %edx rather than %ecx to
624         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
625         and __lll_unlock_wake.  Move return value from %ecx to %edx
626         register.
627         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
628         lowlevellock.h.
629         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
630         define.
631         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
632         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
633         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
634         lowlevellock.h.
635         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
636         (sem_timedwait): Use __NR_gettimeofday.
637         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
638         lowlevellock.h.
639         (LOCK): Don't define.
640         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
641         lowlevellock.h.
642         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
643         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
644         are waiters.
645         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
646         2007-05-2{3,9} changes.
647         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
648         kernel-features.h and lowlevellock.h.
649         (LOAD_PRIVATE_FUTEX_WAIT): Define.
650         (LOAD_FUTEX_WAIT): Rewritten.
651         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
652         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
653         (__lll_mutex_lock_wait): Rename to ...
654         (__lll_lock_wait): ... this.  %esi is now private argument.
655         Don't compile in for libc.so.
656         (__lll_mutex_timedlock_wait): Rename to ...
657         (__lll_timedlock_wait): ... this.  %esi contains private argument.
658         Don't compile in for libc.so.
659         (__lll_mutex_unlock_wake): Rename to ...
660         (__lll_unlock_wake): ... this.  %esi contains private argument.
661         Don't compile in for libc.so.
662         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
663         kernel-features.h and lowlevellock.h.
664         (LOAD_FUTEX_WAIT): Define.
665         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
666         (__lll_robust_mutex_lock_wait): Rename to ...
667         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
668         Use LOAD_FUTEX_WAIT macro.
669         (__lll_robust_mutex_timedlock_wait): Rename to ...
670         (__lll_robust_timedlock_wait): ... this. %esi argument contains
671         private, use LOAD_FUTEX_WAIT macro.
672         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
673         lowlevellock.h.
674         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
675         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
676         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
677         __lll_lock_wait and __lll_unlock_wake.
678         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
679         Include lowlevellock.h and pthread-errnos.h.
680         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
681         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
682         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
683         pass LLL_SHARED in %esi to both __lll_lock_wait and
684         __lll_unlock_wake.
685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
686         Include lowlevellock.h and pthread-errnos.h.
687         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
688         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
689         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
690         pass LLL_SHARED in %esi to both __lll_lock_wait and
691         __lll_unlock_wake.
692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
693         Include lowlevellock.h.
694         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
695         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
696         pass LLL_SHARED in %esi to both __lll_lock_wait and
697         __lll_unlock_wake.
698         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
699         Include lowlevellock.h.
700         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
701         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
702         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
703         and __lll_unlock_wake.
704         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
705         Include lowlevellock.h.
706         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
707         Don't define.
708         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
709         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
710         and __lll_unlock_wake.
711         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
712         Include lowlevellock.h.
713         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
714         Don't define.
715         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
716         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
717         and __lll_unlock_wake.
718         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
719         Include lowlevellock.h.
720         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
721         Don't define.
722         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
723         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
724         and __lll_unlock_wake.
725         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
726         Include lowlevellock.h.
727         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
728         Don't define.
729         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
730         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
731         and __lll_unlock_wake.
732         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
733         Include lowlevellock.h.
734         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
735         Don't define.
736         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
737         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
738         and __lll_unlock_wake.
739         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
740         lowlevellock.h.
741         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
742         define.
743         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
744         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
745         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
746         lowlevellock.h.
747         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
748         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
749         lowlevellock.h.
750         (LOCK): Don't define.
751         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
752         lowlevellock.h.
753         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
754         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
755         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
756         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
757         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
758         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
759         (__lll_lock_wait_private): New function.
760         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
761         it to lll_futex_*wait.  Don't compile in for libc.so.
762         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
763         Remove.
764         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
765         (struct sparc_pthread_barrier): Remove.
766         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
767         struct sparc_pthread_barrier.  Pass
768         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
769         and lll_futex_wait macros.
770         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
771         Remove.
772         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
773         Include sparc pthread_barrier_wait.c instead of generic one.
775 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
777         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
779         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
780         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
781         %ecx.
782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
783         (pthread_rwlock_timedwrlock): Likewise.
784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
785         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
787 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
789         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
791 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
793         * tst-locale2.c (useless): Add return statement.
795 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
797         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
798         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
799         * pthread_create.c (start_thread): Likewise.
800         * init.c (sighandler_setxid): Likewise.
801         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
802         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
803         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
804         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
805         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
806         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
807         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
808         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
809         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
810         Likewise.
811         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
812         Likewise.
813         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
814         Likewise.
815         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
816         __rtld_notify): Likewise.
817         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
818         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
819         __pthread_once): Likewise.
820         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
821         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
822         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
823         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
824         (lll_futex_wait): Add private argument, define as wrapper around
825         lll_futex_timed_wait.
826         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
827         use __lll_private_flag macro.
828         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
829         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
830         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
831         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
832         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
833         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
834         (lll_futex_wait): Add private argument, define as wrapper around
835         lll_futex_timed_wait.
836         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
837         use __lll_private_flag macro.
838         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
839         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
840         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
841         Define.
842         (lll_futex_timed_wait, lll_futex_wake): Use it.
843         (lll_private_futex_wait, lll_private_futex_timed_wait,
844         lll_private_futex_wake): Removed.
845         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
846         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
847         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
848         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
849         (lll_futex_wait): Add private argument, define as wrapper around
850         lll_futex_timed_wait.
851         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
852         use __lll_private_flag macro.
853         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
854         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
855         to lll_futex_*.
856         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
857         (lll_private_futex_wait, lll_private_futex_timed_wait,
858         lll_private_futex_wake): Removed.
859         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
860         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
861         (lll_private_futex_wait, lll_private_futex_timed_wait,
862         lll_private_futex_wake): Removed.
863         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
864         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
865         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
866         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
867         (lll_futex_wait): Add private argument, define as wrapper around
868         lll_futex_timed_wait.
869         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
870         use __lll_private_flag macro.
871         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
872         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
873         to lll_futex_*.
874         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
875         Define.
876         (lll_futex_timed_wait, lll_futex_wake): Use it.
877         (lll_private_futex_wait, lll_private_futex_timed_wait,
878         lll_private_futex_wake): Removed.
880 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
882         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
883         of the structure for sparc32.
885 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
887         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
889 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
891         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
892         code used when private futexes are assumed.
893         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
894         Likewise.
896 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
898         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
899         (__lll_private_flag): Define.
900         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
901         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
902         __lll_private_flag.
903         (lll_private_futex_wait, lll_private_futex_timedwait,
904         lll_private_futex_wake): Define as wrapper around non-_private
905         macros.
906         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
907         (__lll_private_flag): Define.
908         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
909         (lll_private_futex_wait, lll_private_futex_timedwait,
910         lll_private_futex_wake): Define as wrapper around non-_private
911         macros.
913 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
915         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
916         parameter to lll_futex_wait call.
917         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
919         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
920         Replace lll_futex_wait with lll_private_futex_wait.
921         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
922         Add LLL_SHARED parameter to lll_futex_wake().
924         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
925         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
926         lll_private_futex_wake.
927         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
928         bit from private parm before syscall.
929         (lll_futex_timed_wait): Likewise.
930         (lll_futex_wake): Likewise.
931         (lll_futex_wake_unlock): Likewise.
932         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
933         (lll_robust_mutex_unlock): Likewise.
934         (lll_mutex_unlock_force): Likewise.
935         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
937 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
939         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
940         compilation when unconditionally using private futexes.
941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
942         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
943         Likewise.
944         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
945         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
947 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
949         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
950         Define.
952 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
954         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
955         kernel-features.h.
957 2007-05-16  Roland McGrath  <roland@redhat.com>
959         * init.c (__nptl_initial_report_events): New variable.
960         (__pthread_initialize_minimal_internal): Initialize pd->report_events
961         to that.
963 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
965         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
966         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
968 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
970         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
971         implementation.
973 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
975         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
976         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
977         * pthread_mutex_timedlock.c: Likewise.
978         * pthread_mutex_trylock.c: Likewise.
979         * pthread_mutex_unlock.c: Likewise.
981 2007-06-17  Andreas Schwab  <schwab@suse.de>
983         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
984         sections.
986 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
988         * allocatestack.c (allocate_stack): Make code compile if
989         __ASSUME_PRIVATE_FUTEX is set.
991 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
993         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
994         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
995         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
996         (__pthread_rwlock_wrlock): Likewise.
997         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
998         (pthread_rwlock_timedrdlock): Likewise.
999         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1000         (pthread_rwlock_timedwrlock): Likewise.
1001         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1002         (__pthread_rwlock_unlock): Likewise.
1004 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1006         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1007         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1008         Split __flags into __flags, __shared, __pad1 and __pad2.
1009         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1010         futexes if they are available.
1011         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1012         in libc-lowlevellock.S allow using private futexes.
1013         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1014         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1015         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1016         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1017         lll_private_futex_timed_wait and lll_private_futex_wake.
1018         (lll_robust_mutex_unlock): Fix typo.
1019         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1020         field in futex command setup.
1021         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1022         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1023         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1024         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1025         if they are available.  Remove clear_once_control.
1026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1027         futexes if they are available.
1028         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1029         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1030         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1031         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1032         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1033         Wake only when there are waiters.
1034         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1035         support.  Indicate that there are waiters.  Remove unnecessary
1036         extra cancellation test.
1037         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1038         left-over duplication of __sem_wait_cleanup.
1040 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1042         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1043         parameter to lll_futex_wait, lll_futex_timed_wait, and
1044         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1045         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1046         lll_private_futex_wake.
1047         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1048         * allocatestack.c: Adjust use of lll_futex_* macros.
1049         * init.c: Likewise.
1050         * lowlevellock.h: Likewise.
1051         * pthread_barrier_wait.c: Likewise.
1052         * pthread_cond_broadcast.c: Likewise.
1053         * pthread_cond_destroy.c: Likewise.
1054         * pthread_cond_signal.c: Likewise.
1055         * pthread_cond_timedwait.c: Likewise.
1056         * pthread_cond_wait.c: Likewise.
1057         * pthread_create.c: Likewise.
1058         * pthread_mutex_lock.c: Likewise.
1059         * pthread_mutex_setprioceiling.c: Likewise.
1060         * pthread_mutex_timedlock.c: Likewise.
1061         * pthread_mutex_unlock.c: Likewise.
1062         * pthread_rwlock_timedrdlock.c: Likewise.
1063         * pthread_rwlock_timedwrlock.c: Likewise.
1064         * pthread_rwlock_unlock.c: Likewise.
1065         * sysdeps/alpha/tls.h: Likewise.
1066         * sysdeps/i386/tls.h: Likewise.
1067         * sysdeps/ia64/tls.h: Likewise.
1068         * sysdeps/powerpc/tls.h: Likewise.
1069         * sysdeps/pthread/aio_misc.h: Likewise.
1070         * sysdeps/pthread/gai_misc.h: Likewise.
1071         * sysdeps/s390/tls.h: Likewise.
1072         * sysdeps/sh/tls.h: Likewise.
1073         * sysdeps/sparc/tls.h: Likewise.
1074         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1075         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1076         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1077         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1078         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1079         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1080         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1081         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1082         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1083         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1084         Likewise.
1085         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1086         * sysdeps/x86_64/tls.h: Likewise.
1088 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1090         * pthread_getattr_np.c: No need to install a cancellation handler,
1091         this is no cancellation point.
1092         * pthread_getschedparam.c: Likewise.
1093         * pthread_setschedparam.c: Likewise.
1094         * pthread_setschedprio.c: Likewise.
1095         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1096         lll_unlock_wake_cb.
1097         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1098         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1099         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1100         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1101         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1102         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1103         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1104         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1105         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1106         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1107         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1108         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1110         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1111         whether there are more than one thread makes no sense here since
1112         we only call the slow path if the locks are taken.
1113         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1115         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1116         COND_NWAITERS_SHIFT.
1117         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1118         COND_CLOCK_BITS.
1119         * pthread_cond_init.c: Likewise.
1120         * pthread_cond_timedwait.c: Likewise.
1121         * pthread_cond_wait.c: Likewise.
1122         * pthread_condattr_getclock.c: Likewise.
1123         * pthread_condattr_setclock.c: Likewise.
1124         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1126         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1130 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1132         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1133         unistd.h.
1135         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1136         insn suffix.
1137         (THREAD_GSCOPE_GET_FLAG): Remove.
1138         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1139         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1140         changes.
1141         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1142         (THREAD_GSCOPE_GET_FLAG): Remove.
1143         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1144         instead of THREAD_GSCOPE_GET_FLAG.
1145         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1146         it.
1147         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1148         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1149         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1150         THREAD_GSCOPE_WAIT): Define.
1151         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1152         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1153         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1154         THREAD_GSCOPE_WAIT): Define.
1155         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1156         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1157         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1158         THREAD_GSCOPE_WAIT): Define.
1159         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1160         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1161         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1162         THREAD_GSCOPE_WAIT): Define.
1164 2007-05-24  Richard Henderson  <rth@redhat.com>
1166         * descr.h (struct pthread): Add header.gscope_flag.
1167         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1168         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1169         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1170         THREAD_GSCOPE_WAIT): Define.
1172 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1174         * init.c: Make it compile with older kernel headers.
1176         * tst-initializers1.c: Show through exit code which test failed.
1178         * pthread_rwlock_init.c: Also initialize __shared field.
1179         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1180         element in rwlock structure into four byte elements.  One of them is
1181         the new __shared element.
1182         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1183         Likewise.
1184         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1185         __shared, adjust names of other padding elements.
1186         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1187         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1188         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1189         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1190         FUTEX_PRIVATE_FLAG.
1191         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1192         futex to use private operations if possible.
1193         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1194         Likewise.
1195         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1196         Likewise.
1197         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1198         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1201         Likewise.
1202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1203         Likewise.
1204         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1207 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1209         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1210         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1211         * pthread_rwlock_timedrdlock.c: Likewise.
1212         * pthread_rwlock_tryrdlock.c: Likewise.
1214         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1215         optimization.
1217         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1218         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1219         duplication of __sem_wait_cleanup.
1221         * allocatestack.c: Revert last change.
1222         * init.c: Likewise.
1223         * sysdeps/i386/tls.h: Likewise.
1224         * sysdeps/x86_64/tls.h: Likewise.
1225         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1226         header structure.
1227         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1229         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1230         Add private field.
1231         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1232         * pthread_barrier_init.c: Set private flag if pshared and private
1233         futexes are supported.
1234         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1235         private field in futex command setup.
1236         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1238 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1240         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1241         support.
1242         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1243         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1244         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1245         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1246         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1248         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1249         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1250         fields in the structure.
1251         (__old_sem_init): New function.
1252         * sem_open.c: Initialize all fields of the structure.
1253         * sem_getvalue.c: Adjust for renamed element.
1254         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1255         (gen-as-const-headers): Add structsem.sym.
1256         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1257         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1258         struct new_sem.  Add struct old_sem.
1259         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1260         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1261         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1262         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1263         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1264         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1265         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1266         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1267         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1268         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1269         * tst-sem10.c: New file.
1270         * tst-sem11.c: New file.
1271         * tst-sem12.c: New file.
1272         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1273         of struct sem.
1275 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1276             Jakub Jelinek  <jakub@redhat.com>
1278         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1279         Move __pthread_enable_asynccancel right before futex syscall.
1280         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1281         Likewise.
1283 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1285         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1286         THREAD_COPY_PRIVATE_FUTEX): Define.
1287         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1288         THREAD_COPY_PRIVATE_FUTEX): Define.
1289         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1290         * init.c (__pthread_initialize_minimal_internal): Use
1291         THREAD_SET_PRIVATE_FUTEX.
1293         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1294         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1295         THREAD_GSCOPE_FLAG_WAIT): Define.
1296         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1297         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1298         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1299         PTR_DEMANGLE.
1300         (THREAD_GSCOPE_GET_FLAG): Define.
1301         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1302         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1303         instead of ->header.gscope_flag directly.
1305 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1307         * init.c (__pthread_initialize_minimal_internal): Check whether
1308         private futexes are available.
1309         * allocatestack.c (allocate_stack): Copy private_futex field from
1310         current thread into the new stack.
1311         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1312         futexes if they are available.
1313         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1314         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1315         in libc-lowlevellock.S allow using private futexes.
1316         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1317         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1318         FUTEX_PRIVATE_FLAG.
1319         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1320         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1321         if they are available.
1322         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1323         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1324         * sysdeps/i386/tcb-offsets.sym: Likewise.
1325         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1326         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1328 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1330         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1331         Remove ptr_wait_lookup_done again.
1332         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1333         (__pthread_initialize_minimal_internal): Initialize
1334         _dl_wait_lookup_done pointer in _rtld_global directly.
1335         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1336         Remove code to code _dl_wait_lookup_done.
1337         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1338         encrypted for now.
1340 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1342         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1343         pthread_mutex_init failed with ENOTSUP.
1345 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1347         * allocatestack.c (__wait_lookup_done): New function.
1348         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1349         Add ptr_wait_lookup_done.
1350         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1351         * pthreadP.h: Declare __wait_lookup_done.
1352         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1353         Define macros to implement reference handling of global scope.
1354         * sysdeps/x86_64/tls.h: Likewise.
1355         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1356         Initialize GL(dl_wait_lookup_done).
1358 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1360         [BZ #4512]
1361         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1362         is detected.
1363         * pthread_mutex_timedlock.c: Likewise.
1364         * pthread_mutex_trylock.c: Likewise.
1365         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1367         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1368         * tst-robust9.c: New file.
1369         * tst-robustpi9.c: New file.
1371         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1372         unnecessary extra cancellation test.
1374 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1376         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1377         extra cancellation test.
1378         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1380 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1382         * descr.h (struct pthread): Rearrange members to fill hole in
1383         64-bit layout.
1385         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1386         (__pthread_setaffinity_new): If syscall was successful and
1387         RESET_VGETCPU_CACHE is defined, use it before returning.
1388         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1390 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1392         [BZ #4455]
1393         * tst-align2.c: Include stackinfo.h.
1394         * tst-getpid1.c: Likewise.
1396 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1398         [BZ #4455]
1399         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1400         * tst-getpid1.c (do_test): Likewise.
1402         [BZ #4456]
1403         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1404         (allocate_stack): Likewise.
1406 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1408         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1409         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1410         (__lll_robust_timedlock_wait): Likewise.
1411         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1413 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1415         [BZ #4465]
1416         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1417         * tst-cancel4.c (tf_fdatasync): New test.
1419 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1421         [BZ #4392]
1422         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1423         check mutexes like normal mutexes.
1425         [BZ #4306]
1426         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1427         Initialize the whole sigevent structure to appease valgrind.
1429 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1431         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1432         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1434 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1436         * tst-locale1.c: Avoid warnings.
1437         * tst-locale2.c: Likewise.
1439 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1441         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1442         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1444 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1446         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1447         __extern_always_inline where appropriate.
1448         * sysdeps/pthread/pthread.h: Likewise.
1450 2007-03-13  Richard Henderson  <rth@redhat.com>
1452         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1453         separate cfi regions for the two subsections.
1455 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1457         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1458         new thread, don't just decrement it.
1459         Patch by Suzuki K P <suzuki@in.ibm.com>.
1461 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1463         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1464         PTHFCT_CALL definition.
1466 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1468         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1469         available, don't use it.
1471 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1473         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1474         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1475         call into the kernel to delay.
1477 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1479         * tst-initializers1.c: We want to test the initializers as seen
1480         outside of libc, so undefined _LIBC.
1482         * pthread_join.c (cleanup): Avoid warning.
1484 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1486         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1487         (__lll_timedwait_tid): Add unwind info.
1489         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1490         function table, mangle the pointers.
1491         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1492         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1493         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1494         demangle pointers before use.
1495         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1496         demangle pointer.
1497         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1498         * sysdeps/pthread/setxid.h: Likewise.
1500 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1502         * tst-rwlock7.c: Show some more information in case of correct
1503         behavior.
1505 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1507         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1508         (lll_futex_timed_wait): Undo part of last change, don't negate
1509         return value.
1511 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1514         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1516 2006-12-28  David S. Miller  <davem@davemloft.net>
1518         * shlib-versions: Fix sparc64 linux target specification.
1520 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1522         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1523         Adjust include path for pthread_barrier_wait.c move.
1525 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1527         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1528         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1530 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1532         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1533         6 argument cancellable syscalls.
1534         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1535         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1536         6 argument cancellable syscalls.
1537         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1539 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1541         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1542         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1544 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1546         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1547         __sync_lock_release instead of __sync_lock_release_si.
1549 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1551         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1552         Define.
1553         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1554         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1555         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1556         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1557         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1558         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1559         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1560         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1561         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1562         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1563         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1565 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1567         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1568         * pthread_barrier_wait.c: ...here.
1569         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1570         * pthread_cond_broadcast.c: ...here.
1571         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1572         * pthread_cond_signal.c: ...here.
1573         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1574         * pthread_cond_timedwait.c: ...here.
1575         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1576         * pthread_cond_wait.c: ...here.
1577         * sysdeps/pthread/pthread_once.c: Move to...
1578         * pthread_once.c: ...here.
1579         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1580         * pthread_rwlock_rdlock.c: ...here.
1581         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1582         * pthread_rwlock_timedrdlock.c: ...here.
1583         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1584         * pthread_rwlock_timedwrlock.c: ...here.
1585         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1586         * pthread_rwlock_unlock.c: ...here.
1587         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1588         * pthread_rwlock_wrlock.c: ...here.
1589         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1590         * pthread_spin_destroy.c: ...here.
1591         * sysdeps/pthread/pthread_spin_init.c: Move to...
1592         * pthread_spin_init.c: ...here.
1593         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1594         * pthread_spin_unlock.c: ...here.
1595         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1596         * pthread_getcpuclockid.c: ...here.
1598         * init.c: USE_TLS support is now always enabled.
1599         * tst-tls5.h: Likewise.
1600         * sysdeps/alpha/tls.h: Likewise.
1601         * sysdeps/i386/tls.h: Likewise.
1602         * sysdeps/ia64/tls.h: Likewise.
1603         * sysdeps/powerpc/tls.h: Likewise.
1604         * sysdeps/s390/tls.h: Likewise.
1605         * sysdeps/sh/tls.h: Likewise.
1606         * sysdeps/sparc/tls.h: Likewise.
1607         * sysdeps/x86_64/tls.h: Likewise.
1609 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1611         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1612         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1613         failed.
1615         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1616         Define to THREAD_SELF->header.multiple_threads.
1617         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1618         Likewise.
1619         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1620         Likewise.
1621         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1622         (SINGLE_THREAD_P): Likewise.
1623         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1624         (SINGLE_THREAD_P): Likewise.
1625         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1626         (SINGLE_THREAD_P): Likewise.
1627         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1628         (SINGLE_THREAD_P): Likewise.
1629         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1630         Likewise.
1631         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1632         (SINGLE_THREAD_P): Likewise.
1633         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1634         (SINGLE_THREAD_P): Likewise.
1635         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1636         Likewise.
1638 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1640         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1641         by default rather than 2_3_3.
1643 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1645         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1646         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1647         atomic_* instead of catomic_* macros.
1649 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1651         [BZ #3285]
1652         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1653         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1654         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1655         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1656         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1657         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1658         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1659         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1660         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1661         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1662         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1663         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1664         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1666 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1668         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1669         cancelable syscalls with six parameters.
1671         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1672         operations instead of atomic_*.
1674 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1676         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1678 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1680         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1681         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1682         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1683         New file.
1684         * pthread_attr_setstack.c: Allow overwriting the version number of the
1685         new symbol.
1686         * pthread_attr_setstacksize.c: Likewise.
1687         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1688         it.
1689         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1690         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1692 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1694         [BZ #3251]
1695         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1696         Patch by Petr Baudis.
1698 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1700         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1702         * tst-cancel2.c (tf): Loop as long as something was written.
1704 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1706         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1707         mutexes wake all mutexes.
1708         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1709         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1710         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1712 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1714         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1715         to guarantee the thread is always canceled.
1717 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1719         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1720         Include stdlib.h.
1721         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1722         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1725         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1727 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1729         [BZ #3123]
1730         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1731         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1733         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1735         * Makefile (tests): Add tst-cond22.
1736         * tst-cond22.c: New file.
1738 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1740         [BZ #3124]
1741         * descr.h (struct pthread): Add parent_cancelhandling.
1742         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1743         cancelhandling value to child.
1744         * pthread_create.c (start_thread): If parent thread was canceled
1745         reset the SIGCANCEL mask.
1746         * Makefile (tests): Add tst-cancel25.
1747         * tst-cancel25.c: New file.
1749 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1750             Ulrich Drepper  <drepper@redhat.com>
1752         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1753         counterp if it is already zero.
1754         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1756 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1757             Roland McGrath  <roland@redhat.com>
1759         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1760         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1761         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1762         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1763         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1764         lll_robust_mutex_timedlock, lll_mutex_unlock,
1765         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1766         Add _L_*_ symbols around the subsection.
1767         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1768         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1770 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1771             Roland McGrath  <roland@redhat.com>
1773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1774         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1775         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1776         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1777         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1778         lll_robust_mutex_timedlock, lll_mutex_unlock,
1779         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1780         Add _L_*_ symbols around the subsection.
1781         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1782         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1784 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1786         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1787         change because it can disturb too much existing code.  If real hard
1788         reader preference is needed we'll introduce another type.
1789         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1790         (pthread_rwlock_timedwrlock): Likewise.
1791         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1792         Likewise.
1794 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1796         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1797         reader preference.
1798         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1799         (pthread_rwlock_timedwrlock): Likewise.
1800         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1801         Likewise.
1803 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1805         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1806         Only define ifdef SHARED.
1808 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1810         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1811         (free_stacks): ...here.
1812         (__free_stack_cache): New function.
1813         * pthreadP.h: Declare __free_stack_cache.
1814         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1815         ptr_freeres.
1816         * init.c (pthread_functions): Initialize ptr_freeres.
1817         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1818         New freeres function.
1820 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
1822         [BZ #3018]
1823         * Makefile (extra-objs): Add modules to extra-test-objs instead.
1825 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
1827         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1828         _XOPEN_REALTIME_THREADS.
1830 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
1832         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1833         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1834         HAVE_CLOCK_GETTIME_VSYSCALL.
1835         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1837 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
1839         * sysdeps/unix/sysv/linux/bits/posix_opt.h
1840         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1841         * descr.h (struct priority_protection_data): New type.
1842         (struct pthread): Add tpp field.
1843         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1844         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1845         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1846         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1847         TPP mutexes.
1848         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1849         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1850         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1851         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1852         * tpp.c: New file.
1853         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1854         boosted by TPP.
1855         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1856         * pthread_mutexattr_getprioceiling.c
1857         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1858         in the SCHED_FIFO priority range.
1859         * pthread_mutexattr_setprioceiling.c
1860         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1861         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1862         if mutex is not TPP.  Ceiling is now in __data.__lock.
1863         * pthread_mutex_setprioceiling.c: Include stdbool.h.
1864         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
1865         is now in __data.__lock.  Add locking.
1866         * pthread_create.c (__free_tcb): Free pd->tpp structure.
1867         * Makefile (libpthread-routines): Add tpp.
1868         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1869         * tst-tpp.h: New file.
1870         * tst-mutexpp1.c: New file.
1871         * tst-mutexpp6.c: New file.
1872         * tst-mutexpp10.c: New file.
1873         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1874         * tst-mutex6.c (TEST_FUNCTION): Likewise.
1876 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
1878         [BZ #2843]
1879         * pthread_join.c (pthread_join): Account for self being canceled
1880         when checking for deadlocks.
1881         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
1882         (tf1): Don't print anything after pthread_join returns, this would be
1883         another cancellation point.
1884         (tf2): Likewise.
1885         * tst-join6.c: New file.
1886         * Makefile (tests): Add tst-join6.
1888 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
1890         [BZ #2892]
1891         * pthread_setspecific.c (__pthread_setspecific): Check
1892         out-of-range index before checking for unused key.
1894         * sysdeps/pthread/gai_misc.h: New file.
1896 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
1898         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
1899         file.  Don't use sysctl.
1900         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
1901         overwrite the file if this is likely not true.
1903 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
1905         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1906         * Makefile (tests): Add tst-getpid3.
1907         * tst-getpid3.c: New file.
1909 2006-07-30  Roland McGrath  <roland@redhat.com>
1911         * Makefile (libpthread-routines): Add ptw-sigsuspend.
1913         * sysdeps/unix/sysv/linux/i386/not-cancel.h
1914         (pause_not_cancel): New macro.
1915         (nanosleep_not_cancel): New macro.
1916         (sigsuspend_not_cancel): New macro.
1917         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1918         nanosleep_not_cancel macro from <not-cancel.h>.
1919         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1920         macro from <not-cancel.h>.
1922 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
1923             Jakub Jelinek  <jakub@redhat.com>
1925         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1926         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
1927         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1928         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1929         * pthread_mutex_init.c: Add support for priority inheritance mutex.
1930         * pthread_mutex_lock.c: Likewise.
1931         * pthread_mutex_timedlock.c: Likewise.
1932         * pthread_mutex_trylock.c: Likewise.
1933         * pthread_mutex_unlock.c: Likewise.
1934         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1935         all mutexes.
1936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1937         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1938         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1939         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1940         pthread-pi-defines.sym.
1941         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1942         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1943         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1944         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1945         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1946         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1947         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1948         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1949         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1950         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1951         _POSIX_THREAD_PRIO_INHERIT to 200112L.
1952         * tst-mutex1.c: Adjust to allow use in PI mutex test.
1953         * tst-mutex2.c: Likewise.
1954         * tst-mutex3.c: Likewise.
1955         * tst-mutex4.c: Likewise.
1956         * tst-mutex5.c: Likewise.
1957         * tst-mutex6.c: Likewise.
1958         * tst-mutex7.c: Likewise.
1959         * tst-mutex7a.c: Likewise.
1960         * tst-mutex8.c: Likewise.
1961         * tst-mutex9.c: Likewise.
1962         * tst-robust1.c: Likewise.
1963         * tst-robust7.c: Likewise.
1964         * tst-robust8.c: Likewise.
1965         * tst-mutexpi1.c: New file.
1966         * tst-mutexpi2.c: New file.
1967         * tst-mutexpi3.c: New file.
1968         * tst-mutexpi4.c: New file.
1969         * tst-mutexpi5.c: New file.
1970         * tst-mutexpi6.c: New file.
1971         * tst-mutexpi7.c: New file.
1972         * tst-mutexpi7a.c: New file.
1973         * tst-mutexpi8.c: New file.
1974         * tst-mutexpi9.c: New file.
1975         * tst-robust1.c: New file.
1976         * tst-robust2.c: New file.
1977         * tst-robust3.c: New file.
1978         * tst-robust4.c: New file.
1979         * tst-robust5.c: New file.
1980         * tst-robust6.c: New file.
1981         * tst-robust7.c: New file.
1982         * tst-robust8.c: New file.
1983         * Makefile (tests): Add the new tests.
1985         * pthread_create.c (start_thread): Add some casts to avoid warnings.
1986         * pthread_mutex_destroy.c: Remove unneeded label.
1988 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
1990         * pthread_mutex_init.c (__pthread_mutex_init): Move some
1991         computations to compile time.
1993 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
1995         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1997 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
1999         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2001 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2003         * pthread_key_create.c (__pthread_key_create): Do away with
2004         __pthread_keys_lock.
2006         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2007         (__kernel_cpumask_size): Mark as hidden.
2008         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2010         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2011         * semaphoreP.h (__sem_mappings_lock): Likewise.
2013 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2015         * pthread_atfork.c: Mark __dso_handle as hidden.
2017 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2019         [BZ #2644]
2020         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2021         the reload problem.  Change the one path in pthread_cancel_init
2022         which causes the problem.  Force gcc to reload.  Simplify callers.
2023         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2024         (_Unwind_GetBSP): Undo last patch.
2026 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2029         function pointer is reloaded after pthread_cancel_init calls.
2031         [BZ #2644]
2032         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2033         pointers are reloaded after pthread_cancel_init calls.
2035 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2037         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2038         __always_inline.
2040 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2042         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2043         Allocate new object which is passed to timer_sigev_thread so that
2044         the timer can be deleted before the new thread is scheduled.
2046 2006-04-26  Roland McGrath  <roland@redhat.com>
2048         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2050 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2052         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2053         suffix for conditional jumps.
2054         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2055         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2056         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2057         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2058         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2059         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2061         * init.c (sigcancel_handler): Compare with correct PID even if the
2062         thread is in the middle of a fork call.
2063         (sighandler_setxid): Likewise.
2064         Reported by Suzuki K P <suzuki@in.ibm.com> .
2066 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2068         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2070 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2072         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2073         fails [Coverity CID 105].
2075 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2077         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2079 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2081         [BZ #2505]
2082         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2083         Define __lll_rel_instr using lwsync.
2085 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2087         * allocatestack.c (allocate_stack): Always initialize robust_head.
2088         * descr.h: Define struct robust_list_head.
2089         (struct pthread): Use robust_list_head in robust mutex list definition.
2090         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2091         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2092         (__pthread_initialize_minimal_internal): Register robust_list with
2093         the kernel.
2094         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2095         Declare __set_robust_list_avail.
2096         * pthread_create.c (start_thread): Register robust_list of new thread.
2097         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2098         waiters.
2099         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2100         number of users, it's unreliable.
2101         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2102         set_robust_list syscall is available.
2103         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2104         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2105         Set robust_head.list_op_pending before trying to lock a robust mutex.
2106         * pthread_mutex_timedlock.c: Likewise.
2107         * pthread_mutex_trylock.c: Likewise.
2108         * pthread_mutex_unlock.c: Likewise for unlocking.
2109         * Makefile (tests): Add tst-robust8.
2110         * tst-robust8.c: New file.
2112 2006-03-08  Andreas Schwab  <schwab@suse.de>
2114         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2115         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2117 2006-03-05  Roland McGrath  <roland@redhat.com>
2119         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2120         and $config_os doesn't match *linux*.
2122 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2124         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2125         Use __syscall_error.
2126         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2127         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2128         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2129         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2130         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2131         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2133 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2135         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2137 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2139         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2140         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2141         mutex.
2142         (__lll_robust_timedlock_wait): Likewise.
2143         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2144         (__lll_robust_lock_wait): Likewise.
2145         (__lll_robust_timedlock_wait): Likewise.
2146         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2147         (__lll_robust_lock_wait): Likewise.
2148         (__lll_robust_timedlock_wait): Likewise.
2150 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2152         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2153         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2154         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2155         lll_robust_mutex_unlock): Define.
2156         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2158 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2160         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2161         instead of <clone.S>.
2163 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2165         * Makefile (libpthread-routines): Add
2166         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2167         and pthread_mutex_[sg]etprioceiling.
2168         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2169         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2170         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2171         pthread_mutex_setprioceiling.
2172         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2173         PTHREAD_PRIO_PROTECT): New enum values.
2174         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2175         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2176         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2177         prototypes.
2178         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2179         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2180         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2181         Define.
2182         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2183         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2184         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2185         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2186         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2187         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2188         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2189         protocol mutexes.
2190         * pthread_mutex_getprioceiling.c: New file.
2191         * pthread_mutex_setprioceiling.c: New file.
2192         * pthread_mutexattr_getprioceiling.c: New file.
2193         * pthread_mutexattr_setprioceiling.c: New file.
2194         * pthread_mutexattr_getprotocol.c: New file.
2195         * pthread_mutexattr_setprotocol.c: New file.
2197 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2199         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2201 2006-02-27  Roland McGrath  <roland@redhat.com>
2203         * sysdeps/pthread/Subdirs: List nptl here too.
2204         * configure (libc_add_on_canonical): New variable.
2206         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2208         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2209         self to get main source tree's file.
2210         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2211         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2212         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2213         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2214         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2215         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2216         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2217         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2218         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2219         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2220         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2221         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2222         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2224         * Makefile: Use $(sysdirs) in vpath directive.
2226         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2227         (CPPFLAGS-timer_routines.c): Likewise.
2229         * Makeconfig (includes): Variable removed.
2231 2006-02-26  Roland McGrath  <roland@redhat.com>
2233         * sysdeps/generic/pt-raise.c: Moved to ...
2234         * pt-raise.c: ... here.
2235         * sysdeps/generic/lowlevellock.h: Moved to ...
2236         * lowlevellock.h: ... here.
2238 2006-02-23  Roland McGrath  <roland@redhat.com>
2240         * descr.h (struct pthread): Add final member `end_padding'.
2241         (PTHREAD_STRUCT_END_PADDING): Use it.
2243 2006-02-20  Roland McGrath  <roland@redhat.com>
2245         * sysdeps/mips: Directory removed, saved in ports repository.
2246         * sysdeps/unix/sysv/linux/mips: Likewise.
2248 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2250         * tst-robust1.c: Add second mutex to check that the mutex list is
2251         handled correctly.
2253 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2255         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2256         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2257         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2258         lll_robust_mutex_unlock): New macros.
2259         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2260         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2261         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2262         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2263         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2265 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2267         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2268         definitions.
2269         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2271 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2273         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2274         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2276         (lll_robust_mutex_unlock): Likewise.
2278 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2280         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2281         Set robust_list.__next rather than robust_list.
2282         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2283         (__pthread_list_t): New typedef.
2284         (pthread_mutex_t): Replace __next and __prev fields with __list.
2285         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2286         (__pthread_list_t): New typedef.
2287         (pthread_mutex_t): Replace __next and __prev fields with __list.
2288         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2289         (__pthread_list_t, __pthread_slist_t): New typedefs.
2290         (pthread_mutex_t): Replace __next and __prev fields with __list.
2291         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2292         (__pthread_list_t, __pthread_slist_t): New typedefs.
2293         (pthread_mutex_t): Replace __next and __prev fields with __list.
2294         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2295         (__pthread_list_t, __pthread_slist_t): New typedefs.
2296         (pthread_mutex_t): Replace __next and __prev fields with __list.
2297         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2298         (__pthread_slist_t): New typedef.
2299         (pthread_mutex_t): Replace __next field with __list.
2301 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2303         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2304         PTHREAD_MUTEX_OWNERDEAD.
2305         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2306         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2307         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2308         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2309         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2310         to PTHREAD_MUTEX_INCONSISTENT.
2311         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2312         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2313         * pthread_mutex_trylock.c: Likewise.
2314         * pthread_mutex_timedlock.c: Likewise.
2315         * pthread_mutex_unlock.c: Likewise.
2316         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2317         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2318         lowlevelrobustlock.sym.
2319         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2320         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2321         definitions.
2322         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2323         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2324         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2325         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2326         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2328 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2330         * allocatestack.c (allocate_stack): Initialize robust_list.
2331         * init.c (__pthread_initialize_minimal_internal): Likewise.
2332         * descr.h (struct xid_command): Pretty printing.
2333         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2334         robust_list.  Adjust macros.
2335         * pthread_create.c (start_thread): Adjust robust_list handling.
2336         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2337         but the owner for all robust mutex types.
2338         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2339         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2340         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2341         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2343         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2344         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2346 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2348         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2349         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2351 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2353         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2354         Return status.
2355         (lll_futex_timed_wait): Define.
2357 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2359         * tst-cancel4.c: Test ppoll.
2361 2006-01-18  Andreas Jaeger  <aj@suse.de>
2363         [BZ #2167]
2364         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2365         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2366         by Jim Gifford <patches@jg555.com>.
2368 2006-01-13  Richard Henderson  <rth@redhat.com>
2370         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2372 2006-01-10  Roland McGrath  <roland@redhat.com>
2374         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2375         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2376         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2377         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2378         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2379         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2380         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2381         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2382         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2383         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2385 2006-01-09  Roland McGrath  <roland@redhat.com>
2387         * tst-initializers1-c89.c: New file.
2388         * tst-initializers1-c99.c: New file.
2389         * tst-initializers1-gnu89.c: New file.
2390         * tst-initializers1-gnu99.c: New file.
2391         * Makefile (tests): Add them.
2392         (CFLAGS-tst-initializers1-c89.c): New variable.
2393         (CFLAGS-tst-initializers1-c99.c): New variable.
2394         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2395         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2397         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2398         Use __extension__ on anonymous union definition.
2399         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2400         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2401         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2402         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2403         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2405 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2407         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2408         Don't give the union a name because it changes the mangled name.
2409         Instead name the struct for __data.
2410         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2411         Likewise.
2412         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2413         Likewise.
2415 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2417         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2418         stack bias to mc_ftp field.
2420 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2422         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2423         being too clever and reloading the futex value where it shouldn't.
2425 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2427         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2428         correct type.
2430 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2432         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2433         Add cfi directives.
2435 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2437         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2438         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2439         rename in tcbhead_t.
2441         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2442         Don't give the union a name because it changes the mangled name.
2443         Instead name the struct for __data.
2444         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2445         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2446         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2447         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2448         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2449         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2451 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2453         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2454         Return status.
2455         (lll_futex_timed_wait): Define.
2456         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2457         * sysdeps/pthread/aio_misc.h: New file.
2459 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2461         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2463 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2465         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2466         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2467         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2469 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2471         * tst-cancel24.cc: Use C headers instead of C++ headers.
2473 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2475         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2476         sparc-linux configured glibc.
2477         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2478         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2479         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2480         atomic_compare_and_exchange_val_24_acq instead of
2481         atomic_compare_and_exchange_val_acq.
2482         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2483         instead of atomic_exchange_rel.
2484         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2485         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2486         file.
2487         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2488         file.
2489         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2490         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2491         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2492         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2493         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2494         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2495         New file.
2496         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2497         New file.
2498         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2499         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2500         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2501         file.
2502         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2503         file.
2504         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2506 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2508         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2509         mutex initializers.
2511 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2513         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2514         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2515         THREAD_COPY_POINTER_GUARD): Define.
2516         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2517         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2519 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2521         * version.c: Update copyright year.
2523 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2525         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2526         .eh_frame section, use cfi_* directives.
2527         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2529 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2531         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2532         now.
2534 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2536         * sysdeps/pthread/sigaction.c: Removed.
2537         * sigaction.c: New file.
2538         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2540 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2542         * Makefile (tests): Add tst-signal7.
2543         * tst-signal7.c: New file.
2545 2005-12-27  Roland McGrath  <roland@redhat.com>
2547         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2548         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2549         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2550         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2551         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2552         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2553         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2554         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2555         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2556         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2557         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2559 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2561         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2562         and __prev field to pthread_mutex_t.
2563         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2564         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2565         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2566         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2567         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2568         to pthread_mutex_t.
2570 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2572         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2573         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2574         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2575         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2576         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2577         and PTHREAD_MUTEXATTR_FLAG_BITS.
2578         * descr.h (struct pthread): Add robust_list field and define
2579         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2580         * pthread_mutexattr_getrobust.c: New file.
2581         * pthread_mutexattr_setrobust.c: New file.
2582         * pthread_mutex_consistent.c: New file.
2583         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2584         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2585         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2586         Adjust pthread_mutex_t initializers.
2587         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2588         field to pthread_mutex_t.
2589         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2590         and __prev field to pthread_mutex_t.
2591         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2592         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2593         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2594         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2595         * pthread_mutexattr_gettype.c: Likewise.
2596         * pthread_mutexattr_setpshared.c: Likewise.
2597         * pthread_mutexattr_settype.c: Likewise.
2598         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2599         Initialize mutex kind according to robust flag.
2600         * pthread_mutex_lock.c: Implement local robust mutex.
2601         * pthread_mutex_timedlock.c: Likewise.
2602         * pthread_mutex_trylock.c: Likewise.
2603         * pthread_mutex_unlock.c: Likewise.
2604         * pthread_create.c (start_thread): Mark robust mutexes which remained
2605         locked as dead.
2606         * tst-robust1.c: New file.
2607         * tst-robust2.c: New file.
2608         * tst-robust3.c: New file.
2609         * tst-robust4.c: New file.
2610         * tst-robust5.c: New file.
2611         * tst-robust6.c: New file.
2612         * tst-robust7.c: New file.
2613         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2614         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2615         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2616         tst-robust5, tst-robust6, and tst-robust7.
2618         * tst-typesizes.c: New file.
2619         * Makefile (tests): Add tst-typesizes.
2621         * tst-once3.c: More debug output.
2623 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2625         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2626         missing after last change.
2628         * version.c: Update copyright year.
2630 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2632         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2633         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2634         * pthread_mutex_trylock.c: Likewise.
2635         * pthread_mutex_timedlock.c: Likewise.
2636         * pthread_mutex_unlock.c: Likewise.
2638 2005-12-22  Roland McGrath  <roland@redhat.com>
2640         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2641         so that #include_next's search location is not reset to the -I..
2642         directory where <nptl/...> can be found.
2644 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2646         [BZ #1913]
2647         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2648         Fix unwind info.  Remove useless branch prediction prefix.
2649         * tst-cancel24.cc: New file.
2650         * Makefile: Add rules to build and run tst-cancel24.
2652 2005-12-21  Roland McGrath  <roland@redhat.com>
2654         * libc-cancellation.c: Use <> rather than "" #includes.
2655         * pt-cleanup.c: Likewise.
2656         * pthread_create.c: Likewise.
2657         * pthread_join.c: Likewise.
2658         * pthread_timedjoin.c: Likewise.
2659         * pthread_tryjoin.c: Likewise.
2660         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2661         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2662         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2663         * unwind.c: Likewise.
2665 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2667         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2668         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2669         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2670         THREAD_COPY_POINTER_GUARD): Define.
2672 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2674         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2675         rather than one.
2676         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2677         THREAD_COPY_POINTER_GUARD): Define.
2678         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2679         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2680         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2681         THREAD_COPY_POINTER_GUARD): Define.
2682         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2683         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2684         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2685         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2686         Use PTR_DEMANGLE for B0 if defined.
2688 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2690         * pthread_create.c (__pthread_create_2_1): Use
2691         THREAD_COPY_POINTER_GUARD if available.
2692         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2693         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2694         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2695         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2696         * sysdeps/x86_64/tls.h: Likewise.
2698 2005-12-15  Roland McGrath  <roland@redhat.com>
2700         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2702 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2704         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2705         sysdeps/generic.
2706         * errno-loc.c: New file.
2708 2005-12-12  Roland McGrath  <roland@redhat.com>
2710         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2711         adjustments before choosing stack size.  Update minimum stack size
2712         calculation to match allocate_stack change.
2714 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2716         * allocatestack.c (allocate_stack): Don't demand that there is an
2717         additional full page available on the stack beside guard, TLS, the
2718         minimum stack.
2720 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2722         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2723         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2725         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2726         compiling 32-bit code we must define __cleanup_fct_attribute.
2728 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2730         [BZ #1920]
2731         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2732         __attribute__ instead of __attribute.
2733         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2734         (__cleanup_fct_attribute): Likewise.
2736 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2738         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2739         a write barrier before writing libgcc_s_getcfa.
2741 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2743         * sysdeps/unix/sysv/linux/configure: Removed.
2745 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2747         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2748         optional init_array/fini_array support.
2750 2005-10-24  Roland McGrath  <roland@redhat.com>
2752         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2753         versioned_symbol use.
2755 2005-10-16  Roland McGrath  <roland@redhat.com>
2757         * init.c (__pthread_initialize_minimal_internal): Even when using a
2758         compile-time default stack size, apply the minimum that allocate_stack
2759         will require, and round up to page size.
2761 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2763         * Makefile ($(test-modules)): Remove static pattern rule.
2765 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2766             Ulrich Drepper  <drepper@redhat.com>
2768         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2769         alignment in callback function.
2770         * Makefile: Add rules to build and run tst-align3.
2771         * tst-align3.c: New file.
2773 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2775         * allocatestack.c (setxid_signal_thread): Add
2776         INTERNAL_SYSCALL_DECL (err).
2778 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2780         * allocatestack.c (setxid_signal_thread): Need to use
2781         atomic_compare_and_exchange_bool_acq.
2783 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2784             Jakub Jelinek  <jakub@redhat.com>
2786         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2787         CANCEL_RESTMASK.
2788         (struct pthread): Move specific_used field to avoid padding.
2789         Add setxid_futex field.
2790         * init.c (sighandler_setxid): Reset setxid flag and release the
2791         setxid futex.
2792         * allocatestack.c (setxid_signal_thread): New function.  Broken
2793         out of the bodies of the two loops in __nptl_setxid.  For undetached
2794         threads check whether they are exiting and if yes, don't send a signal.
2795         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2796         * pthread_create.c (start_thread): For undetached threads, check
2797         whether setxid bit is set.  If yes, wait until signal has been
2798         processed.
2800         * allocatestack.c (STACK_VARIABLES): Initialize them.
2801         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2803 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2805         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2806         waiters, awake all waiters on the associated mutex.
2808 2005-09-22  Roland McGrath  <roland@redhat.com>
2810         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2811         ../sysdeps/x86_64/hp-timing.h).
2813 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2815         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2816         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2817         (lll_futex_wake_unlock): Define.
2818         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2819         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2820         (lll_futex_wake_unlock): Define.
2821         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2822         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2823         (lll_futex_wake_unlock): Define.
2824         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2825         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2826         (lll_futex_wake_unlock): Define.
2827         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2828         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2829         (lll_futex_wake_unlock): Define.
2830         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2831         lll_futex_wake_unlock.
2832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2833         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2834         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2836         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2837         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2839 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2841         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2842         Fix typo in register name.
2844 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
2846         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2847         Use __sigfillset.  Document that sigfillset does the right thing wrt
2848         to SIGSETXID.
2850 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2852         [BZ #1102]
2853         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2854         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2855         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2856         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2857         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2858         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2859         in the structure.
2860         * Makefile (tests): Add tst-initializers1.
2861         (CFLAGS-tst-initializers1.c): Set.
2862         * tst-initializers1.c: New test.
2864 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
2866         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2867         Make sure __flags are located at offset 48 from the start of the
2868         structure.
2870 2005-07-02  Roland McGrath  <roland@redhat.com>
2872         * Makeconfig: Comment fix.
2874 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
2876         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2877         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2878         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2879         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2880         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2881         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2882         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2883         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2884         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2885         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2887 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
2889         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2890         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2891         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2892         fields.
2893         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2894         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2895         field.  Put in sysinfo field unconditionally.
2896         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2897         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2898         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2899         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2900         fields.
2901         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2902         * pthread_create.c (__pthread_create_2_1): Use
2903         THREAD_COPY_STACK_GUARD macro.
2904         * Makefile: Add rules to build and run tst-stackguard1{,-static}
2905         tests.
2906         * tst-stackguard1.c: New file.
2907         * tst-stackguard1-static.c: New file.
2909 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
2911         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2912         Invoke CGOTSETUP and CGOTRESTORE.
2913         (CGOTSETUP, CGOTRESTORE): Define.
2915 2005-05-29  Richard Henderson  <rth@redhat.com>
2917         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2918         (tf_write, tf_writev): Use it.
2919         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
2920         the system minimum.
2922 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
2924         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2925         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2926         __librt_*_asynccancel@local.
2928 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
2930         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2931         all occurrences of JUMPTARGET.  Instead append @local to labels.
2933 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
2935         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2936         size/alignment of struct pthread rather than tcbhead_t.
2937         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2938         Likewise.
2939         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2940         Likewise.
2941         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2942         Likewise.
2944 2005-05-19  Richard Henderson  <rth@redhat.com>
2946         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2947         __sync_val_compare_and_swap, not explicit _si variant.
2948         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2950 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
2952         [BZ #915]
2953         * sysdeps/pthread/pthread.h: Avoid empty initializers.
2955 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
2957         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2958         .eh_frame section, use cfi_* directives.
2960 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
2962         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2963         of "" includes.
2965 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
2967         [BZ #1075]
2968         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2969         aio_write blocks.
2971 2005-04-27  Roland McGrath  <roland@redhat.com>
2973         * Makefile (tests): Remove tst-clock2.
2975         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2976         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2977         translating to the kernel clockid_t for our own process/thread clock.
2979         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2981 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
2983         * old_pthread_cond_init.c: Include <errno.h>.
2984         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2985         process shared or uses clock other than CLOCK_REALTIME.
2986         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2988 2005-04-13  David S. Miller  <davem@davemloft.net>
2990         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2991         * sysdeps/sparc/sparc64/clone.S: New file.
2993 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
2995         [BZ #1102]
2996         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2997         __inline instead of inline.
2998         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3000 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3002         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3003         functionally equivalent, but shorter instructions.
3004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3005         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3006         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3007         Likewise.
3008         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3009         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3010         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3011         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3012         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3013         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3014         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3015         Likewise.
3016         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3017         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3018         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3019         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3020         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3022 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3024         * sysdeps/mips/Makefile: New file.
3025         * sysdeps/mips/nptl-sysdep.S: New file.
3026         * sysdeps/mips/tcb-offsets.sym: New file.
3027         * sysdeps/mips/pthread_spin_lock.S: New file.
3028         * sysdeps/mips/pthread_spin_trylock.S: New file.
3029         * sysdeps/mips/pthreaddef.h: New file.
3030         * sysdeps/mips/tls.h: New file.
3031         * sysdeps/mips/jmpbuf-unwind.h: New file.
3032         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3033         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3034         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3035         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3036         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3037         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3038         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3039         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3040         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3041         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3043 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3045         [BZ #1112]
3046         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3047         variable to scerr.
3049 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3051         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3053 2005-02-25  Roland McGrath  <roland@redhat.com>
3055         * alloca_cutoff.c: Correct license text.
3056         * tst-unload.c: Likewise.
3057         * sysdeps/pthread/allocalim.h: Likewise.
3058         * sysdeps/pthread/pt-initfini.c: Likewise.
3059         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3060         * sysdeps/pthread/bits/sigthread.h: Likewise.
3061         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3062         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3064 2005-02-16  Roland McGrath  <roland@redhat.com>
3066         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3067         Use unsigned int * for ptr_nthreads.
3069 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3071         [BZ #721]
3072         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3073         gcc4.
3075 2005-02-07  Richard Henderson  <rth@redhat.com>
3077         [BZ #787]
3078         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3079         argument.
3081 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3083         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3084         order of arguments in invocation of atomic_add_zero.
3086 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3088         [BZ #737]
3089         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3090         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3091         at least gotntpoff relocation and addition.
3092         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3093         Likewise.
3094         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3095         Likewise.
3096         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3097         Likewise.
3099 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3101         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3102         entry for static tls deallocation fix.
3103         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3104         also contains information whether the memory pointed to is static
3105         TLS or not.
3106         * sysdeps/i386/tls.h: Likewise.
3107         * sysdeps/ia64/tls.h: Likewise.
3108         * sysdeps/powerpc/tls.h: Likewise.
3109         * sysdeps/s390/tls.h: Likewise.
3110         * sysdeps/sh/tls.h: Likewise.
3111         * sysdeps/sparc/tls.h: Likewise.
3112         * sysdeps/x86_64/tls.h: Likewise.
3114 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3116         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3118 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3120         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3121         %esp.
3122         * Makefile (tests): Add tst-align2.
3123         * tst-align2.c: New test.
3124         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3125         -mpreferred-stack-boundary=4.
3127 2004-12-18  Roland McGrath  <roland@redhat.com>
3129         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3130         New file removed withdrawn for the moment.
3132 2004-12-17  Richard Henderson  <rth@redhat.com>
3134         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3135         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3137 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3139         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3140         Increased PTHREAD_STACK_MIN.
3142         * tst-context1.c (stacks): Use bigger stack size.
3144 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3146         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3147         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3149 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3151         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3152         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3153         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3155 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3157         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3159 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3161         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3162         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3164         * tst-getpid1.c: If child crashes, report this first.  Print which
3165         signal.
3167 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3169         * init.c (__pthread_initialize_minimal_internal): Also unblock
3170         SIGSETXID.
3172 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3174         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3175         _POSIX_THREAD_CPUTIME): Define to 0.
3176         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3177         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3178         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3179         __timer_signal_thread_tclk): Remove.
3180         (init_module): Remove their initialization.
3181         (thread_cleanup): Remove their cleanup assertions.
3182         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3183         __timer_signal_thread_tclk): Remove.
3184         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3185         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3186         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3188 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3190         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3191         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3193         * Makefile (tests): Add tst-getpid2.
3194         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3195         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3196         * tst-getpid2.c: New test.
3198 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3200         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3202 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3204         * Makefile (tests): Add tst-getpid1.
3205         * tst-getpid1.c: New file.
3206         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3207         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3209 2004-12-02  Roland McGrath  <roland@redhat.com>
3211         * Makefile (libpthread-nonshared): Variable removed.
3212         ($(objpfx)libpthread_nonshared.a): Target removed.
3213         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3214         These are now handled by generic magic from
3215         libpthread-static-only-routines being set.
3217 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3219         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3220         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3221         _POSIX_THREAD_PRIO_PROTECT): Define.
3222         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3223         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3224         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3226 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3228         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3229         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3230         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3231         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3232         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3233         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3234         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3236 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3238         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3240         * Makefile (libpthread-routines): Add pthread_setschedprio.
3241         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3242         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3243         * pthread_setschedprio.c: New file.
3245 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3247         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3248         * pthread_cancel.c (pthread_create): Likewise.
3250         * Makefile (libpthread-routines): Add vars.
3251         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3252         * init.c (__default_stacksize, __is_smp): Remove.
3253         * vars.c: New file.
3254         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3255         and define a wrapper macro.
3256         (PTHREAD_STATIC_FN_REQUIRE): Define.
3257         * allocatestack.c (__find_thread_by_id): Undefine.
3258         * pthread_create (__pthread_keys): Remove.
3259         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3260         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3261         PTHREAD_STATIC_FN_REQUIRE.
3263 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3265         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3266         parameter to REGISTER macro.
3268 2004-11-17  Roland McGrath  <roland@redhat.com>
3270         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3271         Make sure SIGCANCEL is blocked as well.
3273 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3275         * sysdeps/pthread/setxid.h: New file.
3276         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3277         (struct xid_command): Add forward decl.
3278         (struct pthread_functions): Change return type of __nptl_setxid hook
3279         to int.
3280         * pthreadP.h (__nptl_setxid): Change return type to int.
3281         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3282         calling thread, return its return value and set errno on failure.
3283         * descr.h (struct xid_command): Change id type to long array.
3285         * Makefile: Add rules to build and test tst-setuid1 and
3286         tst-setuid1-static.
3287         * tst-setuid1.c: New test.
3288         * tst-setuid1-static.c: New test.
3290 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3292         * Makefile (tests): Add tst-exit3.
3293         * tst-exit3.c: New test.
3295 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3297         * Makefile (tests): Add tst-exit2.
3298         * tst-exit2.c: New file.
3300 2004-11-09  Roland McGrath  <roland@redhat.com>
3302         [BZ #530]
3303         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3304         here, before calling clone.
3305         * pthread_create.c (start_thread): Don't do it here.
3307 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3309         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3311 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3313         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3314         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3315         assembler warning.
3317 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3319         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3320         if sched_priority is not between minprio and maxprio.
3322 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3324         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3325         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3327         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3328         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3330 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3332         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3333         not-cancelable I/O functions.
3335 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3337         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3338         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3339         make sure 2 is stored in the futex and we looked at the old value.
3340         Fix a few other problems to return the correct value.
3342 2004-10-14  Richard Henderson  <rth@redhat.com>
3344         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3345         make gcc4 happy.
3347 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3349         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3350         of pthread-functions.h and pthreaddef.h.
3351         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3353         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3354         Change __data.__nwaiters from int to unsigned int.
3356         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3357         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3359         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3360         before return type.
3362         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3363         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3365 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3367         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3368         test fails, remove message queue.
3369         (tf_msgsnd): Likewise.
3371 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3373         * tst-clock1.c: Change #ifdef to #if defined.
3374         * tst-clock2.c: Likewise.
3375         * tst-cond11.c: Likewise.
3377         * sysdeps/pthread/timer_create.c (timer_create): Use
3378         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3379         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3380         THREAD_CPUTIME.
3382 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3384         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3385         _POSIX_THREAD_CPUTIME): Define to 0.
3387 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3389         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3390         and _POSIX_THREAD_CPUTIME to zero.
3391         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3392         * tst-barrier2.c: Fix testing for POSIX feature.
3393         * tst-clock1.c: Likewise.
3394         * tst-clock2.c: Likewise.
3395         * tst-cond11.c: Likewise.
3396         * tst-cond4.c: Likewise.
3397         * tst-cond6.c: Likewise.
3398         * tst-flock2.c: Likewise.
3399         * tst-mutex4.c: Likewise.
3400         * tst-mutex9.c: Likewise.
3401         * tst-rwlock12.c: Likewise.
3402         * tst-rwlock4.c: Likewise.
3403         * tst-signal1.c: Likewise.
3404         * tst-spin2.c: Likewise.
3405         * sysdeps/pthread/posix-timer.h: Likewise.
3406         * sysdeps/pthread/timer_create.c: Likewise.
3407         * sysdeps/pthread/timer_routines.c: Likewise.
3409 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3411         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3412         (__lll_mutex_timedlock_wait): Address futex correctly.
3414         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3415         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3416         make sure 2 is stored in the futex and we looked at the old value.
3417         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3418         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3419         which might very well made the code not working at all before.
3420         [BZ #417]
3422 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3424         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3425         allow SIGSETXID to be sent.
3426         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3427         for SIGSETXID to be defined.
3428         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3429         SIGSETXID cannot be blocked.
3431         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3432         Add __extension__ to long long types.
3433         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3434         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3435         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3436         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3437         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3438         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3439         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3441 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3443         * descr.h (struct pthread): Add stopped_start field.
3444         * sysdeps/pthread/createthread.c (create_thread): Set
3445         start_stopped flag in descriptor for new thread appropriately.
3446         * pthread_create.c (start_thread): Only take lock to be stopped on
3447         startup if stopped_start flag says so.
3449 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3451         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3452         is created detached and if yes, do not try to free the stack in case
3453         the thread creation failed.
3454         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3455         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3456         case there has been no error.  [BZ #405]
3458         * pthread_create.c (start_thread): Don't wait for scheduler data
3459         etc to be set at the beginning of the function.  The cancellation
3460         infrastructure must have been set up.  And enable async
3461         cancellation before potentially going to sleep.  [BZ #401]
3463 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3465         * Versions: Remove exports for pthread_set*id_np functions.
3466         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3467         for now.
3468         * Makefile: Don't build pthread_set*id code for now.
3470 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3472         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3473         internal use.
3474         * allocatestack.c (__nptl_setxid): New function.
3475         * descr.h (struct xid_command): Define type.
3476         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3477         (sighandler_setxid): New function.
3478         (__pthread_initialize_minimal): Register sighandler_setxid for
3479         SIGCANCEL.
3480         * pt-allocrtsig.c: Update comment.
3481         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3482         Declare __nptl_setxid.
3483         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3484         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3485         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3486         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3487         and pthread_setresuid_np.
3488         * pthread_setgid_np.c: New file.
3489         * pthread_setuid_np.c: New file.
3490         * pthread_setegid_np.c: New file.
3491         * pthread_seteuid_np.c: New file.
3492         * pthread_setregid_np.c: New file.
3493         * pthread_setreuid_np.c: New file.
3494         * pthread_setresgid_np.c: New file.
3495         * pthread_setresuid_np.c: New file.
3496         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3497         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3498         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3499         and pthread_setresuid_np.
3500         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3501         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3502         pthread_setregid, and pthread_setresgid.
3504 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3506         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3507         ENOMEM when out of memory.
3509 2004-09-10  Roland McGrath  <roland@redhat.com>
3511         [BZ #379]
3512         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3513         code, since we don't try to use the broken CLONE_STOPPED any more.
3514         * pthread_create.c (start_thread): Likewise.
3516 2004-09-15  Richard Henderson  <rth@redhat.com>
3518         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3520 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3522         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3523         (__libc_unwind_longjmp): Delete macro and declare as function.
3524         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3525         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3526         nptl directory.
3527         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3528         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3529         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3531 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3533         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3534         for __USE_XOPEN2K.
3535         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3536         types also for __USE_XOPEN2K.
3537         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3538         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3539         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3540         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3541         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3542         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3543         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3544         [BZ #320]
3546 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3548         * sysdeps/pthread/pthread.h
3549         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3550         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3551         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3552         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3553         [BZ #375]
3555 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3557         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3558         PSEUDO to be used with . prefix.
3560         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3561         Use atomic_increment instead of atomic_exchange_and_add.
3562         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3563         Likewise.
3564         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3565         Likewise.
3566         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3567         Likewise.
3569         * allocatestack.c (allocate_stack): Use atomic_increment_val
3570         instead of atomic_exchange_and_add.
3571         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3572         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3573         Likewise.
3574         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3575         Likewise.
3577         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3578         the initialization function might throw.
3580 2005-09-05  Richard Henderson  <rth@redhat.com>
3582         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3583         Move definition inside libpthread, libc, librt check.  Provide
3584         definition for rtld.
3586 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3588         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3589         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3590         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3591         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3592         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3593         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3594         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3595         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3596         * unwind.c: Use it.
3598         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3599         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3600         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3601         Likewise.
3602         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3603         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3604         this is the last waiter, signal pthread_cond_destroy caller and
3605         avoid using the pthread_cond_t structure after unlock.
3606         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3608         Read clock type from the least significant bits of __nwaiters instead
3609         of __clock.
3610         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3611         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3613 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3615         [BZ #342]
3616         * Makefile (tests): Add tst-cond20 and tst-cond21.
3617         * tst-cond20.c: New test.
3618         * tst-cond21.c: New test.
3619         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3620         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3621         it unsigned int.
3622         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3623         Likewise.
3624         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3625         (pthread_cond_t): Likewise.
3626         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3627         Likewise.
3628         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3629         Likewise.
3630         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3631         Likewise.
3632         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3633         (cond_nwaiters): New.
3634         (clock_bits): New.
3635         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3636         if there are waiters not signalled yet.
3637         Wait until all already signalled waiters wake up.
3638         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3639         __nwaiters.  If pthread_cond_destroy has been called and this is the
3640         last waiter, signal pthread_cond_destroy caller and avoid using
3641         the pthread_cond_t structure after unlock.
3642         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3643         decrement it when leaving.  If pthread_cond_destroy has been called
3644         and this is the last waiter, signal pthread_cond_destroy caller.
3645         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3646         Likewise.  Read clock type from the least significant bits of
3647         __nwaiters instead of __clock.
3648         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3649         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3650         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3651         clock type just from the last COND_CLOCK_BITS bits of value.
3652         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3653         instead of __clock, just from second bit of condattr's value.
3655 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3657         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3658         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3659         != 64.
3660         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3662 2004-08-15  Roland McGrath  <roland@frob.com>
3664         * pthread_atfork.c: Update copyright terms including special exception
3665         for these trivial files, which are statically linked into executables
3666         that use dynamic linking for the significant library code.
3668 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3670         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3671         pthread_rwlock_rdlock.
3672         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3673         Decrease __nr_readers_queued after reacquiring lock.
3674         * sysdeps/pthread/pthread_rwlock_timedrdlock
3675         (pthread_rwlock_timedrdlock): Likewise.
3676         Reported by Bob Cook <bobcook47@hotmail.com>.
3678 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3680         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3681         before pthread_barrier_wait.
3683 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3685         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3686         Remove unnecessary exception handling data.
3688 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3690         [BZ #284]
3691         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3692         instead of clockid_t.
3694 2004-07-21  Roland McGrath  <roland@redhat.com>
3696         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3698 2004-07-19  Roland McGrath  <roland@redhat.com>
3700         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3702 2004-07-02  Roland McGrath  <roland@redhat.com>
3704         * configure: Don't exit.
3706 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3708         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3709         (__pthread_cond_timedwait): Check for invalid nanosecond in
3710         timeout value.
3712 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3714         * Makefile: Add rules to build and run tst-fini1.
3715         * tst-fini1.c: New file.
3716         * tst-fini1mod.c: New file.
3718 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3720         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3721         if no cancellation support is needed.
3722         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3723         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3724         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3725         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3726         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3727         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3728         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3729         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3730         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3732         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3733         only if not already defined.
3735 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3738         constraint "m" instead of "0" for futex.
3740         * shlib-versions: Add powerpc64-.*-linux.*.
3742 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3744         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3745         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3746         for valid tv_nsec.
3747         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3748         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3749         bits.
3751 2004-06-29  Roland McGrath  <roland@redhat.com>
3753         * Banner: NPTL no longer has its own version number.
3754         * Makefile (nptl-version): Variable removed.
3755         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3756         using $(version), the glibc version number.
3758 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3760         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3761         Fix branch offset for a PLT entry.
3762         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3763         Likewise.
3764         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3765         Likewise.
3766         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3767         Likewise.
3768         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3769         Likewise.
3771 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3773         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3774         unconditionally.
3776 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3778         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3779         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3780         instead of tv_sec.
3781         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3782         (pthread_rwlock_timedrdlock): Likewise.
3784 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3786         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3787         Set __r7 to val, not mutex.
3789 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3791         * Makefile: Add rules to build tst-rwlock14.
3792         * tst-rwlock14.c: New file.
3794 2004-06-24  Boris Hu  <boris.hu@intel.com>
3796         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3797         check.
3798         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3800 2004-06-19  Andreas Jaeger  <aj@suse.de>
3802         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3803         assembler in last patch.
3805 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3807         * sysdeps/pthread/pthread_cond_timedwait.c
3808         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3810         (__pthread_cond_timedwait): Check for invalid nanosecond in
3811         timeout value.
3812         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3813         * tst-cond19.c: New file.
3814         * Makefile: Add rules to build and run tst-cond19.
3816 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3818         * tst-context1.c (GUARD_PATTERN): Defined.
3819         (tst_context_t): Define struct containing ucontext_t & guard words.
3820         (ctx): Declare as an array of tst_context_t.
3821         (fct): Verify uc_link & guard words are still valid.
3822         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
3824 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3826         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3827         Add __data.__futex field, reshuffle __data.__clock.
3828         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3829         (__pthread_cond_signal): Increment __futex at the same time as
3830         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3831         address of low 32-bits of __wakeup_seq to futex syscall.
3832         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3833         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3834         releasing internal lock to FUTEX_WAIT.
3835         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3836         (__pthread_cond_timedwait): Likewise.
3837         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3838         (FUTEX_CMP_REQUEUE): Define.
3839         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3840         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3841         Pass __futex value from before the unlock and __futex address instead
3842         of address of low 32-bits of __wakeup_seq to futex syscall.
3843         Fallback to FUTEX_WAKE all on any errors.
3845 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
3847         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3848         comment typo.
3849         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3850         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3851         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3852         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3853         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
3855 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3857         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3858         Add memory clobber to inline assembly.
3859         (__lll_mutex_trylock): Likewise.
3860         (__lll_mutex_cond_trylock): Likewise.
3862 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3864         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3865         Pass val argument as 6th system call argument in %r7.
3867 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3869         * Makefile (tests): Add tst-cond16.
3870         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3871         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3872         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3873         Add __data.__futex field, reshuffle __data.__clock.
3874         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3875         (__pthread_cond_signal): Increment __futex at the same time as
3876         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3877         address of low 32-bits of __wakeup_seq to futex syscall.
3878         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3879         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3880         releasing internal lock to FUTEX_WAIT.
3881         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3882         (__pthread_cond_timedwait): Likewise.
3883         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3884         (FUTEX_CMP_REQUEUE): Define.
3885         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3886         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3887         Pass __futex value from before the unlock and __futex address instead
3888         of address of low 32-bits of __wakeup_seq to futex syscall.
3889         Fallback to FUTEX_WAKE all on any errors.
3890         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3891         Define.
3892         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3893         internally.  Return non-zero if error, zero if success.
3894         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3895         Add __data.__futex field, reshuffle __data.__clock.
3896         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3897         Define.
3898         (lll_futex_requeue): Add val argument, return 1 unconditionally
3899         for the time being.
3900         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3901         Add __data.__futex field, reshuffle __data.__clock.
3902         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3903         Define.
3904         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3905         internally.  Return non-zero if error, zero if success.
3906         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3907         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3908         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3909         Define.
3910         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3911         internally.  Return non-zero if error, zero if success.
3912         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3913         Add __data.__futex field, reshuffle __data.__clock.
3914         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3915         Define.
3916         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3917         internally.  Return non-zero if error, zero if success.
3918         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3919         Add __data.__futex field, reshuffle __data.__clock.
3920         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3921         Add __data.__futex field, reshuffle __data.__clock.
3922         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3923         Increment __futex at the same time as __wakeup_seq or __total_seq.
3924         Pass address of __futex instead of address of low 32-bits of
3925         __wakeup_seq to futex syscall.
3926         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3927         Pass __futex value from before releasing internal lock
3928         to FUTEX_WAIT.
3929         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3930         Likewise.  Avoid unnecessary shadowing of variables.
3931         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3932         Set __futex to 2 * __total_seq.  Pass __futex value from before the
3933         unlock and __futex address instead of address of low 32-bits of
3934         __wakeup_seq to futex_requeue macro, adjust for new return value
3935         meaning.
3936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3937         (__pthread_cond_signal): Increment __futex at the same time as
3938         __wakeup_seq or __total_seq.  Pass address of __futex instead of
3939         address of low 32-bits of __wakeup_seq to futex syscall.
3940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3941         (__pthread_cond_wait): Likewise.  Pass __futex value from before
3942         releasing internal lock to FUTEX_WAIT.
3943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3944         (__pthread_cond_timedwait): Likewise.
3945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3946         (FUTEX_CMP_REQUEUE): Define.
3947         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3948         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3949         Pass __futex value from before the unlock and __futex address instead
3950         of address of low 32-bits of __wakeup_seq to futex syscall.
3951         Fallback to FUTEX_WAKE all on any errors.
3953 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3955         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3956         Add nop to align the end of critical section.
3957         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3959 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3961         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3962         Add __broadcast_seq field.
3963         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3964         all waiters as woken with woken_seq and bump broadcast counter.
3965         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3966         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
3967         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3968         Comment typo fixes.  Avoid returning -ETIMEDOUT.
3970 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
3972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3973         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3974         Reported by Kaz Kojima.
3976 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
3978         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3980 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
3982         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3983         __broadcast_seq with bc_seq after acquiring internal lock instead of
3984         before it.
3986 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
3988         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3989         compilation.
3990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3991         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3992         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3993         (pthread_cond_t): Add __data.__broadcast_seq field.
3994         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3995         (FRAME_SIZE): Define.
3996         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
3997         Comment typo fixes.
3998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3999         Define.
4000         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4001         typo fixes.
4002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4003         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4004         fixes.
4006 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4008         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4009         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4010         Add __broadcast_seq field.
4011         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4012         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4013         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4014         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4015         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4016         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4017         all waiters as woken with woken_seq and bump broadcast counter.
4018         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4020         __broadcast_seq field.
4021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4022         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4023         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4024         * pthread_cond_init.c: Initialize __broadcast_seq field.
4025         * Makefile (tests): Add tst-cond17 and tst-cond18.
4026         Add .NOTPARALLEL goal.
4027         * tst-cond16.c: New file.  From Jakub.
4028         * tst-cond17.c: New file.  From Jakub.
4029         * tst-cond18.c: New file.  From Jakub.
4031 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4033         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4034         unwind info.
4036         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4037         Parametrize frame size.  Correct some unwind info.
4038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4040 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4042         * tst-stack3.c: Note testing functionality beyond POSIX.
4044 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4046         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4047         Change conditional from ifdef to if.
4049 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4051         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4052         SYSDEP_CANCEL_ERROR): Define.
4053         (PSEUDO): Use it.
4055 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4057         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4059 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4061         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4063 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4065         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4066         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4067         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4068         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4070 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4072         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4073         thread has all signals blocked.
4075 2004-04-18  Andreas Jaeger  <aj@suse.de>
4077         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4078         (SEM_VALUE_MAX): Add missing brace.
4080 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4082         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4083         in rt subdir.
4084         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4085         * sysdeps/pthread/tst-mqueue8x.c: New test.
4086         * tst-cancel4.c: Update comment about message queues.
4088         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4089         return it_value { 0, 0 }.
4090         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4091         like SIGEV_SIGNAL.
4092         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4093         assertion for SIGEV_NONE.
4094         (thread_attr_compare): Compare all attributes, not just a partial
4095         subset.
4097 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4099         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4101 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4103         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4104         Just use a plain number.
4105         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4106         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4107         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4108         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4109         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4110         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4111         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4113 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4115         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4116         frame info.
4117         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4119 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4121         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4122         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4123         of calling sigwaitinfo.
4125 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4127         * allocatestack.c (allocate_stack): Set reported_guardsize
4128         unconditionally.
4129         * pthread_getattr_np.c (pthread_getattr_np): Use
4130         reported_guardsize instead of guardsize.
4131         * descr.h (struct pthread): Add reported_guardsize field.
4133 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4135         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4137 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4139         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4141 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4143         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4144         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4145         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4146         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4147         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4148         Define.
4149         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4150         (_POSIX_MESSAGE_PASSING): Define.
4151         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4152         (_POSIX_MESSAGE_PASSING): Define.
4153         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4154         (_POSIX_MESSAGE_PASSING): Define.
4156 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4158         * tst-context1.c (fct): Check whether correct stack is used.
4160 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4162         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4163         matching constraints for asm mem parameters.
4165         * tst-clock2.c (tf): Don't define unless needed.
4167 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4169         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4170         $(gnulib).
4172 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4174         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4175         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4176         * pthreadP.h: Declare __nptl_deallocate_tsd.
4177         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4178         Adjust caller.
4180         * Makefile (tests): Add tst-tsd5.
4181         * tst-tsd5.c: New file.
4183 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4185         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4186         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4187         is SHLIB_COMPAT check.
4188         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4189         (__pthread_attr_getaffinity_old): Likewise.
4190         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4191         (__pthread_getaffinity_old): Likewise.
4192         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4193         (__pthread_setaffinity_old): Likewise.
4195 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4197         * allocatestack.c (_make_stacks_executable): Call
4198         _dl_make_stack_executable first.
4200 2004-03-24  Roland McGrath  <roland@redhat.com>
4202         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4203         constraint instead of "0".
4205 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4207         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4208         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4210         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4211         code to avoid warning.
4213 2004-03-24  Andreas Jaeger  <aj@suse.de>
4215         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4216         (__pthread_attr_setaffinity_old): Remove const.
4218 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4220         * sysdeps/unix/sysv/linux/smp.h: New file.
4221         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4222         * init.c: Define __is_smp.
4223         (__pthread_initialize_minimal_internal): Call is_smp_system to
4224         initialize __is_smp.
4225         * pthreadP.h: Declare __is_smp.
4226         Define MAX_ADAPTIVE_COUNT is necessary.
4227         * pthread_mutex_init.c: Add comment regarding __spins field.
4228         * pthread_mutex_lock.c: Implement adaptive mutex type.
4229         * pthread_mutex_timedlock.c: Likewise.
4230         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4231         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4232         Add __spins field.
4233         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4234         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4235         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4236         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4237         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4238         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4239         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4240         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4241         lll_mutex_cond_trylock.
4242         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4243         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4244         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4245         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4246         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4247         Define BUSY_WAIT_NOP.
4248         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4249         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4251         * tst-mutex5.c: Add support for testing adaptive mutexes.
4252         * tst-mutex7.c: Likewise.
4253         * tst-mutex5a.c: New file.
4254         * tst-mutex7a.c: New file.
4255         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4257         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4258         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4259         vgettimeofday call might destroy the content.
4261         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4262         @pause in the loop.
4264         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4265         No need to restrict type of ret.  Make it int.  Add comment.
4267         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4268         Remove unnecessary setne instruction.
4270 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4272         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4273         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4274         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4275         If realloc fails, break out of the loop.
4277 2004-03-20  Andreas Jaeger  <aj@suse.de>
4279         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4280         (__pthread_setaffinity_old): Fix interface.
4281         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4282         (__pthread_getaffinity_old): Likewise.
4284         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4285         (__pthread_setaffinity_new): Remove duplicate declaration.
4287 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4289         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4290         the return value to a safe register.
4291         (CDISABLE): Set the function argument correctly.
4293 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4295         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4296         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4297         Rewrite so that only one locked memory operation per round is needed.
4298         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4299         (pthread_barrier_wait): After wakeup, release lock only when the
4300         last thread stopped using the barrier object.
4301         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4302         (__pthread_cond_wait): Don't store mutex address if the current
4303         value is ~0l.  Add correct cleanup support and unwind info.
4304         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4305         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4306         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4307         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4308         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4309         Add correct cleanup support and unwind info.
4310         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4311         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4312         information for syscall wrappers.
4314 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4316         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4317         cpusetsize field, remove next.
4318         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4319         parameter for size of the CPU set.
4320         (pthread_setaffinity_np): Likewise.
4321         (pthread_attr_getaffinity_np): Likewise.
4322         (pthread_attr_setaffinity_np): Likewise.
4323         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4324         interface change, keep compatibility code.
4325         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4326         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4327         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4328         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4329         __pthread_getaffinity_np.
4330         * Versions: Add version for changed interfaces.
4331         * tst-attr3.c: Adjust test for interface change.
4332         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4333         increasing buffer sizes.
4334         * pthread_attr_destroy.c: Remove unused list handling.
4335         * pthread_attr_init.c: Likewise.
4337 2004-03-17  Roland McGrath  <roland@redhat.com>
4339         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4340         first argument to clock_getres so we ever enable kernel timers.
4342 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4344         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4346 2004-03-12  Richard Henderson  <rth@redhat.com>
4348         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4349         oldvalue from CENABLE to CDISABLE.
4351 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4353         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4354         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4355         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4356         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4358 2004-03-11  Richard Henderson  <rth@redhat.com>
4360         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4361         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4362         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4364 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4366         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4367         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4368         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4370 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4372         * forward.c (__pthread_cond_broadcast_2_0,
4373         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4374         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4375         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4377 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4379         * sysdeps/sh/tcb-offsets.sym: Add PID.
4380         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4381         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4383 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4385         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4386         include <sysdep-cancel.h>, vfork is no cancellation point.
4387         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4388         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4389         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4391 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4393         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4394         libc_hidden_def.
4395         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4396         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4397         Likewise.
4398         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4399         Likewise.
4400         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4401         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4402         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4403         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4404         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4406         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4407         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4408         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4409         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4410         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4411         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4413         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4414         a local register for saving old PID.  Negate PID in parent upon exit.
4416         * sysdeps/unix/sysv/linux/s390/s390-32/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-32/vfork.S: New file.
4421         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4422         tcb-offsets.h.
4423         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4424         before syscall, set to the old value in the parent afterwards.
4425         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4426         * sysdeps/s390/tcb-offsets.sym: Add PID.
4428         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4429         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4430         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4431         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4432         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4433         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4435 2004-03-10  Andreas Schwab  <schwab@suse.de>
4437         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4438         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4439         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4441 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4443         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4444         * tst-cancel21.c (do_one_test): Likewise.
4445         Reported by Gordon Jin <gordon.jin@intel.com>.
4447 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4449         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4450         if non-zero and set to INT_MIN if zero.
4451         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4452         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4453         (SAVE_PID, RESTORE_PID): Define.
4454         (__vfork): Use it.
4455         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4456         Use relative path to avoid including NPTL i386/vfork.S.
4457         (SAVE_PID, RESTORE_PID): Define.
4458         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4459         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4460         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4461         tst-vfork2x.
4462         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4463         * tst-vfork1.c: New test.
4464         * tst-vfork2.c: New test.
4465         * tst-vfork1x.c: New test.
4466         * tst-vfork2x.c: New test.
4468 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4470         * sysdeps/i386/tcb-offsets.sym: Add PID.
4471         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4472         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4473         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4475 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4477         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4479 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4481         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4482         _rtld_global_ro.
4484 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4486         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4487         _rtld_global_ro.
4489         * tst-once4.c: Remove unnecessary macro definition.
4491         * tst-mutex7.c (do_test): Limit thread stack size.
4492         * tst-once2.c (do_test): Likewise.
4493         * tst-tls3.c (do_test): Likewise.
4494         * tst-tls1.c (do_test): Likewise.
4495         * tst-signal3.c (do_test): Likewise.
4496         * tst-kill6.c (do_test): Likewise.
4497         * tst-key4.c (do_test): Likewise.
4498         * tst-join4.c (do_test): Likewise.
4499         * tst-fork1.c (do_test): Likewise.
4500         * tst-context1.c (do_test): Likewise.
4501         * tst-cond2.c (do_test): Likewise.
4502         * tst-cond10.c (do_test): Likewise.
4503         * tst-clock2.c (do_test): Likewise.
4504         * tst-cancel10.c (do_test): Likewise.
4505         * tst-basic2.c (do_test): Likewise.
4506         * tst-barrier4.c (do_test): Likewise.
4508 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4510         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4512 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4514         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4515         (__pthread_cond_timedwait): Optimize wakeup test.
4516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4517         (__pthread_cond_wait): Likewise.
4518         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4519         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4520         Likewise.
4522 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4524         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4525         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4526         the atomic instruction needed.
4527         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4528         (__lll_mutex_lock_wait): Likewise.
4530 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4532         * Makefile (tests): Add tst-cond14 and tst-cond15.
4533         * tst-cond14.c: New file.
4534         * tst-cond15.c: New file.
4536 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4538         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4539         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4540         needs to be implemented differently to be useful.
4542 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4544         * pthread_attr_setschedparam.c: Don't test priority against limits
4545         here.  Set ATTR_FLAG_SCHED_SET flag.
4546         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4547         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4548         from parent thread to child.  If attribute is used and scheduling
4549         parameters are not inherited, copy parameters from attribute or
4550         compute them.  Check priority value.
4551         * pthread_getschedparam.c: If the parameters aren't known yet get
4552         them from the kernel.
4553         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4554         ATTR_FLAG_POLICY_SET flag for thread.
4555         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4556         and ATTR_FLAG_POLICY_SET.
4558         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4560         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4561         fail if stack address hasn't been set.  Just return 0.
4563 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4565         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4566         libpthread for the files in this list.
4567         (CFLAGS-tst-unload): Removed.
4568         * tst-unload.c (do_test): Don't use complete path for
4569         LIBPHREAD_SO.
4571         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4572         tst-_res1mod2.
4574 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4576         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4577         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4578         operation per round is needed.
4579         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4580         (__lll_mutex_lock_wait): Likewise.
4582 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4584         * tst-cancel9.c (cleanup): Don't print to stderr.
4586 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4588         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4590 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4592         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4593         (__syscall_error_handler2): Call CDISABLE.
4594         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4595         (__syscall_error_handler2): Call CDISABLE.
4597         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4598         Release lock before the loop, don't reacquire it.
4600         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4602 2004-02-19  Andreas Schwab  <schwab@suse.de>
4604         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4605         Fix last change.
4607 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4609         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4610         (pthread_barrier_wait): After wakeup, release lock only when the
4611         last thread stopped using the barrier object.
4612         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4613         (pthread_barrier_wait): Likewise.
4614         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4615         Likewise.
4616         * Makefile (tests): Add tst-barrier4.
4617         * tst-barrier4.c: New file.
4619         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4620         (__pthread_cond_timedwait): Perform timeout test while holding
4621         internal lock to prevent wakeup race.
4622         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4623         * sysdeps/pthread/pthread_cond_timedwait.c
4624         (__pthread_cond_timedwait): Likewise.
4625         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4626         (__pthread_cond_timedwait): Likewise.
4628 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4630         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4631         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4632         * Makefile (tests): Add tst-rwlock13.
4633         * tst-rwlock13.c: New test.
4635 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4637         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4638         (__condvar_tw_cleanup): Little optimization.
4639         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4641 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4643         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4644         libpthread as "lib" parameter to SHLIB_COMPAT.
4645         (__novmx_siglongjmp): Fix typo in function name.
4646         (__novmx_longjmp): Fix typo in function name.
4648 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4650         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4651         __builtin_expect.
4653         * sysdeps/generic/pt-longjmp.c: Moved to...
4654         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4656 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4658         * Makefile (libpthread-routines): Add pt-cleanup.
4659         * pt-longjmp.c: Removed.
4660         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4661         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4662         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4663         Version longjmp, siglongjmp for GLIBC_2.3.4.
4664         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4666 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4668         * sysdeps/pthread/pthread_cond_timedwait.c
4669         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4670         Reuse code.  Add __builtin_expects.
4672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4673         (__pthread_cond_timedwait): Get internal lock in case timeout has
4674         passed before the futex syscall.
4675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4677 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4679         * allocatestack.c: Pretty printing.
4681         * sysdeps/pthread/createthread.c (create_thread): Don't add
4682         CLONE_DETACHED bit if it is not necessary.
4684 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4686         * pthread_getattr_np.c: Include ldsodefs.h.
4688 2004-01-16  Richard Henderson  <rth@redhat.com>
4690         * allocatestack.c: Don't declare __libc_stack_end.
4691         * init.c (__pthread_initialize_minimal_internal): Likewise.
4692         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4694 2004-01-15  Richard Henderson  <rth@redhat.com>
4696         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4697         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4698         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4699         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4700         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4701         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4702         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4703         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4705 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4707         * init.c (pthread_functions): Make array const.
4709 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4711         * allocatestack.c (__make_stacks_executable): Change interface.
4712         Check parameters.  Pass parameter on to libc counterpart.
4713         * pthreadP.h: Change declaration.
4715 2004-01-13  Richard Henderson  <rth@redhat.com>
4717         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4718         prototype form.
4719         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4720         Likewise.
4722         * sysdeps/alpha/Makefile: New file.
4723         * sysdeps/alpha/tcb-offsets.sym: New file.
4724         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4725         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4727         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4728         on powerpc version.
4730 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4732         * Makefile (tests): Add tst-backtrace1.
4733         * tst-backtrace1.c: New test.
4735 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4737         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4738         register as second parameter to the REGISTER macro.
4739         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4740         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4741         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4742         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4743         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4744         of thread register as second parameter to REGISTER macro in 64 case.
4746 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4748         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4749         (CFLAGS-getpid.o): Defined.
4750         (CFLAGS-getpid.os): Defined.
4752 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4754         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4755         returned for main thread does not overlap with any other VMA.
4756         Patch by Jakub Jelinek.
4758 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4760         * tst-raise1.c: Include stdio.h.
4762 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4764         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4765         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4766         If pid is 0, set it to selftid.
4767         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4768         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4769         != 0, return self->tid without doing a syscall.
4770         * descr.h (struct pthread): Move pid field after tid.
4772         * Makefile (tests): Add tst-raise1.
4773         * tst-raise1.c: New file.
4775 2003-12-23  Roland McGrath  <roland@redhat.com>
4777         * tst-oddstacklimit.c: New file.
4778         * Makefile (tests): Add it.
4779         (tst-oddstacklimit-ENV): New variable.
4781         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4782         value up to page size for __default_stacksize.
4784 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4786         * Makefile (tests): Add tst-eintr5.
4787         * tst-eintr5.c: New file.
4789         * eintr.c (eintr_source): Prevent sending signal to self.
4791         * tst-eintr2.c (tf1): Improve error message.
4793 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4795         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4796         * sysdeps/unix/sysv/linux/getpid.c: New file.
4797         * pthread_cancel.c: Add comment explaining use of PID field.
4798         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4799         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4800         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4801         temporarily to signal the field must not be relied on and updated
4802         by getpid().
4803         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4804         temporarily negative.
4805         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4807 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4809         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4810         (eintr_source): If ARG != NULL, use pthread_kill.
4811         * tst-eintr1.c: Adjust for this change.
4812         * tst-eintr2.c: Likewise.
4813         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4814         * tst-eintr3.c: New file.
4815         * tst-eintr4.c: New file.
4817 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4819         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4820         if CANCELSTATE_BITMASK is set.
4821         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4822         Likewise.
4824         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4825         (tests-reverse): Add tst-cancel23.
4826         * tst-cancel22.c: New test.
4827         * tst-cancel23.c: New test.
4829 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
4831         * tst-eintr1.c: Better error messages.
4833         * Makefile (tests): Add tst-eintr2.
4834         * tst-eintr2.c: New file.
4836 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
4838         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4839         (CFLAGS-tst-cancelx21.c): Set.
4840         * tst-cancel21.c: New test.
4841         * tst-cancelx21.c: New test.
4843         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
4844         comparison operand.
4845         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4846         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
4847         * pt-longjmp.c: Include jmpbuf-unwind.h.
4848         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4849         _JMPBUF_UNWINDS.  Adjust compared pointers.
4850         * init.c (__pthread_initialize_minimal_internal): Initialize
4851         pd->stackblock_size.
4852         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4853         * sysdeps/alpha/jmpbuf-unwind.h: New file.
4854         * sysdeps/i386/jmpbuf-unwind.h: New file.
4855         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4856         * sysdeps/s390/jmpbuf-unwind.h: New file.
4857         * sysdeps/sh/jmpbuf-unwind.h: New file.
4858         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4859         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4860         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4861         (_JMPBUF_CFA_UNWINDS): Remove.
4862         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4864 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
4866         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4867         (CFLAGS-tst-cancelx20.c): Set.
4868         * tst-cancel20.c: New test.
4869         * tst-cancelx20.c: New test.
4871 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
4873         * init.c (__pthread_initialize_minimal_internal): Don't treat
4874         architectures with separate register stack special here when
4875         computing default stack size.
4877 2003-12-17  Roland McGrath  <roland@redhat.com>
4879         * Makefile (tst-cancelx7-ARGS): New variable.
4880         Reportd by Greg Schafer <gschafer@zip.com.au>.
4882 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
4884         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
4885         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4886         (tst-stack3-ENV): Set.
4887         ($(objpfx)tst-stack3-mem): New.
4888         * tst-stack3.c: New test.
4890 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
4892         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4893         Add unwind directives.  Drop unused .regstk directive.
4894         (_fini_EPILOG_BEGINS): Add unwind directives.
4896 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
4898         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4899         Assume parameter is a pointer.
4900         (lll_futex_wake): Likewise.
4901         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4902         Likewise.
4903         (lll_futex_wake): Likewise.
4904         Reported by Boris Hu.
4905         * sysdeps/unix/sysv/linux/unregister-atfork.c
4906         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4908         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4910 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
4912         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4913         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4914         __rtld_lock_initialize for ld.so lock.
4915         Patch in part by Adam Li <adam.li@intel.com>.
4917 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
4919         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4920         in $(gnulib).  Also, remove stale comment.
4922 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
4924         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4925         advantage of new syscall stub and optimize accordingly.
4927         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4928         from SYS_futex, to match expectations of
4929         sysdep.h:DO_INLINE_SYSCALL.
4930         (lll_futex_clobbers): Remove.
4931         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4932         (lll_futex_wake): Likewise.
4933         (lll_futex_requeue): Likewise.
4934         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4935         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4936         Jelinek).
4937         (__lll_mutex_lock): Likewise.
4938         (__lll_mutex_cond_lock): Likewise.
4939         (__lll_mutex_timed_lock): Likewise.
4940         (__lll_mutex_unlock): Likewise.
4941         (__lll_mutex_unlock_force): Likewise.
4943         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4944         comes before the include of <sysdep.h>.
4945         (THREAD_SELF_SYSINFO): New macro.
4946         (THREAD_SYSINFO): Likewise.
4947         (INIT_SYSINFO): New macro.
4948         (TLS_INIT_TP): Call INIT_SYSINFO.
4950         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4952         * sysdeps/pthread/createthread.c (create_thread): Use
4953         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4954         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4955         THREAD_SELF_SYSINFO instead of open code.
4956         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4957         (THREAD_SYSINFO): Likewise.
4959         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4961         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4963 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
4965         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4966         instead of .init.  Patch by David Mosberger.
4968 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
4970         * sysdeps/pthread/configure.in: Remove broken declaration in C
4971         cleanup handling check.
4973 2003-11-30  Andreas Jaeger  <aj@suse.de>
4975         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4976         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4977         Likewise.
4979 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
4981         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4982         * pthread_attr_destroy.c: Include shlib-compat.h.
4983         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4984         is set in iattr->flags.
4985         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4987 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
4989         * Makefile (distribute): Add tst-cleanup4aux.c.
4991         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
4992         include.
4994 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
4996         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4997         pthread_cond_signal.
4999         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5000         store mutex address if the current value is ~0l.
5001         * sysdeps/pthread/pthread_cond_timedwait.c
5002         (__pthread_cond_timedwait): Likewise.
5003         * sysdeps/pthread/pthread_cond_broadcast.c
5004         (__pthread_cond_broadcast): Don't use requeue for pshared
5005         condvars.
5007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5008         (__pthread_cond_wait): Don't store mutex address if the current
5009         value is ~0l.
5010         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5011         (__pthread_cond_timedwait): Likewise.
5012         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5013         (__pthread_cond_broadcast): Don't use requeue for pshared
5014         condvars.
5016         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5017         element with ~0l for pshared condvars, with NULL otherwise.
5019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5020         (__pthread_cond_wait): Don't store mutex address if the current
5021         value is ~0l.
5022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5023         (__pthread_cond_timedwait): Likewise.
5024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5025         (__pthread_cond_broadcast): Don't use requeue for pshared
5026         condvars.
5028         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5029         * tst-cond12.c: New file.
5030         * tst-cond13.c: New file.
5032 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5034         * sysdeps/pthread/configure.in: Make missing forced unwind support
5035         fatal.
5037 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5039         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5041 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5043         * Makefile: Add magic to clean up correctly.
5045 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5047         * unwind.c (FRAME_LEFT): Define.
5048         (unwind_stop): Handle old style cleanups here.
5049         (__pthread_unwind): Handle old style cleanups only if
5050         !HAVE_FORCED_UNWIND.
5051         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5052         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5053         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5054         ($(objpfx)tst-cleanupx4): Likewise.
5055         * tst-cleanup4.c: New test.
5056         * tst-cleanup4aux.c: New.
5057         * tst-cleanupx4.c: New test.
5059 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5061         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5062         lll_mutex_*lock macros to skip atomic operations on some archs.
5064 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5066         * sysdeps/pthread/tst-timer.c (main): Initialize
5067         sigev2.sigev_value as well.
5069 2003-10-15  Roland McGrath  <roland@redhat.com>
5071         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5072         is missing.
5073         * sysdeps/pthread/configure: Regenerated.
5075 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5077         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5078         locking macros.  No distinction between normal and mutex locking
5079         anymore.
5080         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5081         Merge bits from lowlevelmutex.S we still need.
5082         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5083         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5084         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5085         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5086         new mutex implementation.
5087         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5088         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5089         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5090         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5091         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5092         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5093         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5094         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5095         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5096         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5097         symbol for entry point to avoid cancellation.
5099 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5101         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5102         changes.
5103         (SAVE_OLDTYPE_0): Fix a typo.
5105 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5107         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5108         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5110 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5112         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5113         correct offset.
5115 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5117         * Makefile (tests): Add tst-cancel19.
5118         * tst-cancel19.c: New test.
5120 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5122         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5123         restoring of the old cancellation type.
5125 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5127         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5129 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5131         * sysdeps/pthread/malloc-machine.h: New file
5133 2003-09-24  Roland McGrath  <roland@redhat.com>
5135         * allocatestack.c (__make_stacks_executable): Don't ignore return
5136         value from _dl_make_stack_executable.
5138 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5140         * allocatestack.c (__make_stacks_executable): Also change
5141         permission of the currently unused stacks.
5143         * allocatestack.c (change_stack_perm): Split out from
5144         __make_stacks_executable.
5145         (allocate_stack): If the required permission changed between the time
5146         we started preparing the stack and queueing it, change the permission.
5147         (__make_stacks_executable): Call change_stack_perm.
5149         * Makefile: Build tst-execstack-mod locally.
5150         * tst-execstack-mod.c: New file.
5152 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5154         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5156 2003-09-23  Roland McGrath  <roland@redhat.com>
5158         * tst-execstack.c: New file.
5159         * Makefile (tests): Add it.
5160         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5161         (LDFLAGS-tst-execstack): New variable.
5163         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5164         whether to use PROT_EXEC for stack mmap.
5165         (__make_stacks_executable): New function.
5166         * pthreadP.h: Declare it.
5167         * init.c (__pthread_initialize_minimal_internal): Set
5168         GL(dl_make_stack_executable_hook) to that.
5170 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5173         recommendation from AMD re avoidance of lock prefix.
5175 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5177         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5178         lll_futex_timed_wait instead of lll_futex_wait.
5179         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5180         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5181         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5182         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5183         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5184         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5185         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5186         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5187         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5188         Completely revamp the locking macros.  No distinction between
5189         normal and mutex locking anymore.
5190         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5191         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5192         __lll_lock_timedwait): Fix prototypes.
5193         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5194         __lll_lock_timedwait): Likewise.
5195         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5196         macros, add __builtin_expect.
5197         (lll_mutex_timedlock): Likewise.  Fix return value.
5198         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5199         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5200         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5201         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5202         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5203         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5204         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5205         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5207 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5209         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5210         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5211         operation if possible.
5213         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5214         like jumping over the lock prefix.
5216 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5218         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5219         locking macros.  No distinction between normal and mutex locking
5220         anymore.
5221         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5222         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5223         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5224         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5225         locking.  Merge bits from lowlevelmutex.S we still need.
5226         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5227         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5228         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5229         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5230         * Makefile (routines): Remove libc-lowlevelmutex.
5231         (libpthread-rountines): Remove lowlevelmutex.
5232         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5233         for new mutex implementation.
5234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5238         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5239         Likewise.
5240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5241         Likewise.
5242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5243         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5244         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5247         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5248         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5250         Likewise.
5251         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5252         Likewise.
5253         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5254         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5256         Don't use requeue.
5257         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5258         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5260 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5262         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5263         in parameters of asm with output parameters.
5265         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5266         type of DECR parameter to int.
5267         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5269 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5271         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5272         guardsize for each thread.
5274 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5276         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5277         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5278         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5280         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5281         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5282         NULL.
5283         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5284         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5285         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5286         (pthread_getaffinity_np): Add hidden_def.
5288         * Makefile (tests): Add tst-attr3.
5289         * tst-attr3.c: New test.
5291         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5293 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5295         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5296         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5298 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5300         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5301         * tst-align.c: Include tst-stack-align.h.
5302         (tf, do_test): Use TEST_STACK_ALIGN macro.
5304 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5306         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5307         variable.
5309 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5311         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5312         stack-related values for the initial thread.
5314 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5316         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5318 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5320         * pthread_mutex_lock.c: Minor code rearrangements.
5322 2003-09-05  Roland McGrath  <roland@redhat.com>
5324         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5325         Instead, include ../nptl_db/db_info.c to do its magic.
5326         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5327         (__pthread_pthread_key_2ndlevel_size): Likewise.
5328         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5329         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5330         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5331         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5332         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5333         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5334         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5335         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5336         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5337         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5338         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5339         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5340         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5341         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5342         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5343         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5344         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5346 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5349         of pthread_t to be compatible with LT.
5350         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5351         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5352         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5353         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5354         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5355         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5356         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5358 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5360         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5362 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5364         * unwind-forcedunwind.c: Move to...
5365         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5366         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5367         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5368         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5369         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5370         * unwind.c: Include jmpbuf-unwind.h.
5371         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5373 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5375         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5376         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5377         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5378         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5379         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5380         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5381         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5382         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5383         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5384         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5385         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5386         function.
5387         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5388         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5389         * Makefile (tests): Add tst-stack2.
5390         * tst-stack2.c: New test.
5391         * tst-stack1.c: Include limits.h and sys/param.h.
5392         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5394         * pthread_condattr_setpshared.c: Include errno.h.
5395         (pthread_condattr_setpshared): Return EINVAL if pshared
5396         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5398         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5399         defined symbol for entry point to avoid cancellation.
5400         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5401         Likewise.
5402         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5403         Likewise.
5404         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5405         Likewise.
5406         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5407         Likewise.
5408         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5409         Likewise.
5410         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5411         __close_nocancel, __read_nocancel, __write_nocancel,
5412         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5413         libpthread.so or librt.so, define to corresponding function
5414         without _nocancel suffix.
5415         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5416         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5417         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5419         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5421 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5423         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5424         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5426         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5427         in subsections has a symbol associated with it.
5429         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5430         defined symbol for entry point to avoid cancellation.
5431         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5433 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5435         * Makefile (tests): Add tst-tls5.
5436         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5437         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5438         ($(objpfx)tst-tls5): New.
5439         ($(objpfx)tst-tls6.out): Likewise.
5440         (tests): Depend on $(objpfx)tst-tls6.out.
5441         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5442         (do_test): Check pthread_self () return value alignment.
5443         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5444         (tf): Check pthread_self () return value alignment.
5445         * tst-tls5.c: New test.
5446         * tst-tls5.h: New.
5447         * tst-tls5mod.c: New.
5448         * tst-tls5moda.c: New.
5449         * tst-tls5modb.c: New.
5450         * tst-tls5modc.c: New.
5451         * tst-tls5modd.c: New.
5452         * tst-tls5mode.c: New.
5453         * tst-tls5modf.c: New.
5454         * tst-tls6.sh: New test.
5456         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5457         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5458         * init.c (pthread_functions): Initialize them.
5459         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5460         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5461         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5462         pthread_cond_timedwait@@GLIBC_2.3.2.
5464 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5466         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5467         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5468         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5469         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5470         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5471         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5473         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5475         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5476         _POSIX_THREAD_PRIORITY_SCHEDULING.
5477         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5479 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5481         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5482         nested function, use static inline function from libio.h.
5483         Code by Richard Henderson.
5485         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5486         weak.
5488 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5490         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5491         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5492         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5493         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5494         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5495         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5496         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5497         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5498         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5499         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5500         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5501         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5502         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5503         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5504         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5505         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5506         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5507         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5508         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5509         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5510         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5511         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5512         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5513         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5514         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5515         * sysdeps/sparc/tls.h: New file.
5516         * sysdeps/sparc/tcb-offsets.sym: New file.
5517         * sysdeps/sparc/Makefile: New file.
5518         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5519         * init.c [__sparc__] (__NR_set_tid_address): Define.
5521 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5523         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5524         _IO_release_lock): Define.
5526 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5528         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5529         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5531 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5533         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5534         (__pthread_cleanup_class): Add missing return types of member
5535         functions.
5537 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5539         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5540         (lll_mutex_unlock_force): Add memory barrier between store and futex
5541         syscall.
5543 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5545         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5546         tempmsg in first loop.
5548 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5550         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5551         _POSIX_THREAD_PRIORITY_SCHEDULING.
5552         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5554 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5556         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5557         (__rtld_lock_default_lock_recursive,
5558         __rtld_lock_default_unlock_recursive): Define.
5559         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5560         __rtld_lock_unlock_recursive): Define using
5561         GL(_dl_rtld_*lock_recursive).
5562         * init.c (__pthread_initialize_minimal_internal): Initialize
5563         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5564         Lock GL(_dl_load_lock) the same number of times as
5565         GL(_dl_load_lock) using non-mt implementation was nested.
5567         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5568         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5570 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5572         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5573         PIPE_BUF.
5575 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5577         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5579 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5581         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5582         to first syscall error check.  Move syscall error check for tkill
5583         into __ASSUME_CLONE_STOPPED #ifdef.
5585 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5587         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5588         is not defined, do explicit synchronization.
5589         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5590         is not defined also unlock pd->lock for non-debugging case in case
5591         it is necessary.
5592         * pthread_create.c (start_thread): Always get and release pd->lock
5593         if __ASSUME_CLONE_STOPPED is not defined.
5594         (start_thread_debug): Removed.  Adjust users.
5595         * allocatestack.c (allocate_stack): Always initialize lock if
5596         __ASSUME_CLONE_STOPPED is not defined.
5597         * Makefile (tests): Add tst-sched1.
5598         * tst-sched1.c: New file.
5600         * sysdeps/pthread/createthread.c (do_clone): Only use
5601         sched_setschduler and pass correct parameters.
5603 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5605         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5606         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5607         PTHREAD_STACK_MIN in comments.
5609 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5611         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5612         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5613         argument.
5614         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5615         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5616         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5617         (__pthread_cleanup_upto): Fix prototype.
5618         (_longjmp_unwind): Adjust caller.
5619         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5620         Change second argument to const struct pointer.
5621         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5622         * tst-sem9.c (main): Likewise.
5623         * unwind.c: Include string.h for strlen prototype.
5625 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5628         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5629         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5630         Define HAVE_CMOV.
5631         Patch by Nicholas Miell <nmiell@attbi.com>.
5633 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5635         * init.c (__pthread_initialize_minimal_internal): Initialize
5636         GL(dl_init_static_tls).
5637         * pthreadP.h (__pthread_init_static_tls): New prototype.
5638         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5639         New functions.
5640         * Makefile (tests): Add tst-tls4.
5641         (modules-names): Add tst-tls4moda and tst-tls4modb.
5642         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5643         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5644         tst-tls4modb.so.
5645         * tst-tls4.c: New file.
5646         * tst-tls4moda.c: New file.
5647         * tst-tls4modb.c: New file.
5649 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5651         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5652         before __timer_dealloc.
5653         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5654         Don't call list_unlink.
5656 2003-07-29  Roland McGrath  <roland@redhat.com>
5658         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5660 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5662         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5663         Don't reuse struct aiocb A if it failed.
5664         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5665         not just one byte, as that does not block.
5667 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5669         * sysdeps/pthread/unwind-resume.c: New file.
5670         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5671         unwind-resume in csu subdir.
5672         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5673         exceptions.
5674         (librt-sysdep_routines, librt-shared-only-routines): Add
5675         rt-unwind-resume.
5676         * sysdeps/pthread/rt-unwind-resume.c: New file.
5677         * unwind-forcedunwind.c: New file.
5678         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5679         (libpthread-shared-only-routines): Likewise.
5680         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5681         * pthreadP.h (pthread_cancel_init): New prototype.
5682         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5684         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5685         attr argument const struct pthread_attr *.
5687         * res.c (__res_state): Return __resp.
5688         * descr.h: Include resolv.h.
5689         (struct pthread): Add res field.
5690         * pthread_create.c: Include resolv.h.
5691         (start_thread): Initialize __resp.
5692         * Makefile (tests): Add tst-_res1.
5693         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5694         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5695         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5696         libpthread.
5697         * tst-_res1.c: New file.
5698         * tst-_res1mod1.c: New file.
5699         * tst-_res1mod2.c: New file.
5701 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5703         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5705         * Makefile: Define various *-no-z-defs variables for test DSOs
5706         which has undefined symbols.
5708 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5710         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5711         Retry if the stwcx fails to store once_control.
5713 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5715         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5716         pthread_attr_setaffinity.
5717         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5718         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5719         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5720         * pthread_attr_destroy.c: Free cpuset element if allocated.
5721         * pthread_create.c: Pass iattr as additional parameter to
5722         create_thread.
5723         * sysdeps/pthread/createthread.c: If attribute is provided and
5724         a new thread is created with affinity set or scheduling parameters,
5725         start thread with CLONE_STOPPED.
5726         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5727         pthread_attr_setaffinity.
5728         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5729         cpuset element.
5731 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5733         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5735 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5737         * sysdeps/pthread/configure.in: Require CFI directives also for
5738         ppc and s390.
5740 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5742         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5743         Add cfi directives.
5745 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5747         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5748         CLEANUP_JMP_BUF.
5749         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5750         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5751         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5752         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5753         not self pointer in __writer.  Compare with TID to determine
5754         deadlocks.
5755         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5756         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5757         Likewise.
5758         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5759         Likewise.
5760         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5761         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5762         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5763         macros also when compiling librt.
5765 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5767         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5768         -fasynchronous-unwind-tables.
5769         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5770         (PSEUDO): Add cfi directives.
5771         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5772         Likewise.
5773         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5774         Likewise.
5776 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5778         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5779         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5780         * unwind.c (__pthread_unwind_next): Add hidden_def.
5781         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5782         Likewise.
5783         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5784         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5785         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5786         Likewise.
5787         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5788         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5789         Likewise.
5790         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5791         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5792         __pthread_unregister_cancel and __pthread_unwind_next.
5794 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5796         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5797         different symbol for the cancellation syscall wrapper and
5798         non-cancellation syscall wrapper.
5799         (PSEUDO_END): Define.
5801 2003-07-05  Richard Henderson  <rth@redhat.com>
5803         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5804         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5805         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5806         return actual return value from the syscall, not 0.
5808 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5810         * descr.h (struct pthread): Add pid field.
5811         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5812         (__reclaim_stacks): Likewise.
5813         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5814         also check for PID of the signal source.
5815         (__pthread_initialize_minimal_internal): Also initialize pid field
5816         of initial thread's descriptor.
5817         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5818         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5819         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5820         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5821         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5823 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
5825         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5826         Fix use of parameter.
5827         (__libc_cleanup_pop): Likewise.
5829 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
5831         * init.c (sigcancel_handler): Change parameters to match handler
5832         for SA_SIGACTION.  Check signal number and code to recognize
5833         invalid invocations.
5835 2003-07-03  Roland McGrath  <roland@redhat.com>
5837         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5838         Apply sizeof (struct pthread) bias to r13 value.
5840 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
5842         * sysdeps/pthread/configure.in: Require CFI directives.
5844         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5845         definition.
5846         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5847         libpthread compilation.
5848         * unwind.c (__pthread_unwind): Add hidden_def.
5849         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5851 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5853         * libc-cancellation.c (__libc_cleanup_routine): Define.
5854         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5855         (__pthread_cleanup_pop): Define.
5857 2003-07-01  Richard Henderson  <rth@redhat.com>
5859         * sysdeps/alpha/elf/pt-initfini.c: New file.
5860         * sysdeps/alpha/pthread_spin_lock.S: New file.
5861         * sysdeps/alpha/pthread_spin_trylock.S: New file.
5862         * sysdeps/alpha/pthreaddef.h: New file.
5863         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5864         * sysdeps/alpha/tls.h: New file.
5865         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5866         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5867         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5868         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5869         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5870         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5871         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5872         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5873         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5874         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5876 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
5878         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5879         cleanup support and unwind info.
5881 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
5883         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5884         Use correct cleanup handler registration.  Add unwind info.
5885         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5886         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5887         * tst-once3.c: Add cleanup handler and check it is called.
5888         * tst-once4.c: Likewise.
5889         * tst-oncex3.c: New file.
5890         * tst-oncex4.c: New file.
5891         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5893 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
5895         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5897 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
5899         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5900         (tf_msgsnd): Likewise.
5902         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5903         premature returns a bit more.
5905 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
5907         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5908         definition to the front.
5910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5911         the cleanup functions to make the names unique.  Fix dwarf opcode
5912         un unwind table.
5913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5914         functions to make the names unique.  Fix CFA offset for two blocks.
5916 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
5918         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5919         missing closing braces.
5920         Patch by Christophe Saout <christophe@saout.de>.
5922 2003-06-24  Roland McGrath  <roland@redhat.com>
5924         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5926 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
5928         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5929         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5931         * pthreadP.h: Declare __find_thread_by_id.
5932         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5933         * pthread_clock_gettime.c: Allow using other thread's clock.
5934         * pthread_clock_settime.c: Likewise.
5935         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5936         * Makefile: Add rules to build and run tst-clock2.
5937         * tst-clock2.c: New file.
5939 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
5941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5942         to use exception-based cleanup handler.
5943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5945         * tst-cond8.c (ch): Announce that we are done.
5947         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5949         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5950         Also test aio_suspend with timeout value.
5952 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
5954         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5955         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5956         attribute_hidden.
5958         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5959         (__pthread_mutex_lock_internal): Likewise.
5960         (__pthread_mutex_unlock_internal): Likewise.
5961         (__pthread_mutex_unlock_usercnt): Declare.
5962         * pthread_mutex_destroy.c: Always fail if used in any way.
5963         * pthread_mutex_init.c: Update comment.
5964         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5965         * pthread_mutex_timedlock.c: Adjust __nusers.
5966         * pthread_mutex_trylock.c: Adjust __nusers.
5967         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5968         and public interfaces are wrapper with pass additional parameter.
5969         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5970         parameter zero.
5971         * tst-mutex8.c: New file.
5972         * Makefile (tests): Add tst-mutex8.
5973         * sysdeps/pthread/pthread_cond_timedwait.c: Call
5974         __pthread_mutex_unlock_usercnt.
5975         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5978         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5979         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5980         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5981         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5982         Add __nusers.
5983         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5984         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5985         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5986         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5987         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5989         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5990         * pthread_mutex_timedlock.c: Likewise.
5991         * pthread_mutex_trylock.c: Adjust __nusers.
5992         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5993         * tst-mutex9.c: New file.
5994         * Makefile (tests): Add tst-mutex9.
5995         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5996         * sysdeps/ia64/tls.h: Likewise.
5997         * sysdeps/powerpc/tls.h: Likewise.
5998         * sysdeps/s390/tls.h: Likewise.
5999         * sysdeps/sh/tls.h: Likewise.
6000         * sysdeps/x86_64/tls.h: Likewise.
6001         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6002         Change type of __owner.
6003         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6004         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6005         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6006         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6007         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6009 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6011         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6012         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6014         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6015         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6016         instead of nr to lll_futex_wake.  Only set errno and return -1
6017         if err < 0.
6019         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6020         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6021         return actual return value from the syscall, not 0.
6023 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6025         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6026         find a random value.
6027         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6028         errno==EIDRM.
6030         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6031         compat_timer_settime.
6032         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6033         compat_timer_gettime.
6034         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6035         compat_timer_getoverrun.
6036         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6037         compat_timer_delete.
6039         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6040         error-checking mutex detect busy mutexes.
6042 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6044         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6045         Add ax to clobber list.
6046         (lll_mutex_cond_lock): Likewise.
6047         (lll_mutex_unlock): Likewise.
6048         (lll_lock): Likewise.
6049         (lll_unlock): Likewise.
6051         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6052         * tst-cancel18.c: New file.
6053         * tst-cancelx18.c: New file.
6055         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6056         and tcdrain.
6058         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6059         * tst-cancel17.c: New file.
6060         * tst-cancelx17.c: New file.
6062         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6063         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6064         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6066         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6068 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6070         * sysdeps/pthread/createthread.c (create_thread): Set
6071         header.multiple_threads unconditionally.
6072         * allocatestack.c (allocate_stack): Likewise.
6073         * descr.h (struct pthread): Add header.multiple_threads
6074         unconditionally.
6075         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6076         Define for librt.  #error if neither libpthread, libc nor librt.
6077         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6078         Likewise.
6079         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6080         CDISABLE): Likewise.
6081         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6082         CDISABLE): Likewise.
6083         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6084         CDISABLE): Likewise.
6085         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6086         CDISABLE): Likewise.  Access header.multiple_threads outside of
6087         libc and libpthread.
6088         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6089         Likewise.
6090         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6091         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6093 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6095         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6096         Also test early cancellation before the thread reaches the cancellation
6097         point.
6099         * Makefile: Compile forward.c with exceptions.
6101         * sysdeps/unix/sysv/linux/sleep.c: New file.
6103 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6105         * Makefile: Add CFLAGS definition to compile function wrappers
6106         duplicated from libc with exceptions.
6107         * tst-cancel4.c: Also check cancellation handlers.
6109         * Makefile: Add rules to build and run tst-cancel16 and
6110         tst-cancelx16.  Add missing CFLAGS definitions.
6111         * tst-cancel16.c: New file.
6112         * tst-cancelx16.c: New file.
6114 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6116         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6117         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6118         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6119         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6121         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6122         (LIBC_CANCEL_RESET): Likewise.
6123         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6124         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6125         librt-cancellation.
6126         (CFLAGS-libcrt-cancellation.c): Define.
6127         * sysdeps/pthread/librt-cancellation.c: New file.
6128         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6129         macros also when compiling librt.
6130         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6131         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6132         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6133         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6134         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6135         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6136         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6138         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6139         compat_timer_create.
6141 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6143         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6145         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6146         __register_atfork.
6147         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6148         Add libc_hidden_def.
6150 2003-06-13  Roland McGrath  <roland@redhat.com>
6152         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6153         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6155 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6157         * allocatestack.c (queue_stack): Always inline.
6158         * ptreadhP.h (__do_cancel): Likewise.
6160 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6162         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6163         a typo.
6165 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6168         (__pthread_cond_signal): Remove incorrect second addition for
6169         cond_lock!=0.
6171 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6173         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6174         (__pthread_cond_signal): Use correct futex pointer in
6175         __lll_mutex_lock_wait call.
6177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6178         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6180 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6182         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6183         cancelable.
6184         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6185         Likewise.
6187         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6188         hand-written CFI generation code.  Since ENTRY/END also initiated
6189         CFI frames this caused two CFI sets to be generated.
6191 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6193         * cleanup_routine.c: New file.
6194         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6195         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6196         cleanup handling.
6197         * Makefile (libpthread-routines): Add cleanup_routine.
6198         Add more CFLAGS variables to compile with exceptions.  Add comments
6199         why which file needs unwind tables.
6200         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6201         tests.
6202         * tst-cancelx1.c: New file.
6203         * tst-cancelx2.c: New file.
6204         * tst-cancelx3.c: New file.
6205         * tst-cancelx4.c: New file.
6206         * tst-cancelx5.c: New file.
6207         * tst-cancelx6.c: New file.
6208         * tst-cancelx7.c: New file.
6209         * tst-cancelx8.c: New file.
6210         * tst-cancelx9.c: New file.
6211         * tst-cancelx10.c: New file.
6212         * tst-cancelx11.c: New file.
6213         * tst-cancelx12.c: New file.
6214         * tst-cancelx13.c: New file.
6215         * tst-cancelx14.c: New file.
6216         * tst-cancelx15.c: New file.
6217         * tst-cleanupx0.c: New file.
6218         * tst-cleanupx0.expect: New file.
6219         * tst-cleanupx1.c: New file.
6220         * tst-cleanupx2.c: New file.
6221         * tst-cleanupx3.c: New file.
6223         * tst-cleanup0.c: Make standard compliant.
6224         * tst-cleanup1.c: Likewise.
6226         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6227         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6228         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6229         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6230         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6231         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6232         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6233         CLEANUP_JMP_BUF.
6234         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6235         * tst-cancel12.c: New file.
6236         * tst-cancel13.c: New file.
6237         * tst-cancel14.c: New file.
6238         * tst-cancel15.c: New file.
6239         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6240         and tst-cancel15.
6242         * tst-cancel1.c: Add some comments.
6244         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6245         timeout correctly.
6247 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6249         * Makefile (CFLAGS-pthread_cancel.c): Define.
6251 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6253         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6254         Change type of __writer element to int.
6255         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6256         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6257         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6258         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6259         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6260         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6261         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6262         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6263         Compare with TID to determine deadlocks.
6264         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6265         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6266         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6267         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6270         Likewise.
6271         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6272         Likewise.
6273         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6274         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6276         Likewise.
6277         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6278         Likewise.
6279         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6280         * Makefile (tests): Add tst-rwlock12.
6281         * tst-rwlock12.c: New file.
6283 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6285         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6286         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6287         Remove bogus hidden_proto.
6288         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6289         Likewise.
6290         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6291         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6292         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6293         ___lll_mutex_timedlock): Likewise.
6295 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6298         (__pthread_cond_signal): Add some code to eventually handle
6299         cond_lock!=0.
6301 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6303         * Makefile (tests): Add tst-exec4.
6304         (tst-exec4-ARGS): Define.
6305         * tst-exec4.c: New file.
6307 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6309         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6310         Also fail if tv_nsec < 0.
6311         (__lll_timedwait_tid): Likewise.
6312         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6313         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6314         Likewise.
6315         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6316         Likewise.
6317         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6318         Likewise.
6319         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6320         Likewise.
6321         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6322         Likewise.
6323         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6324         Likewise.
6326         * Makefile (tests): Add tst-sem8 and tst-sem9.
6327         * tst-sem8.c: New file.
6328         * tst-sem9.c: New file.
6329         * sem_open.c: Fix creation of in_use record if the file exists but
6330         no internal record.
6332         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6333         definitions.
6335         * sysdeps/pthread/timer_create.c (timer_create): In case
6336         evp==NULL, assign timer ID to sival_ptr.
6338         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6339         struct pthread_unwind_buf *.
6340         (struct pthread): Likewise for cleanup_jmp_buf element.
6342         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6343         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6344         * unwind.c (__pthread_unwind_next): Likewise.
6346 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6348         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6349         (lll_futex_timed_wait): Use int for futex value parameter.
6350         (lll_futex_wake): Likewise.
6351         (lll_futex_requeue): Likewise.
6353         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6354         Replace one memory operation with one register operation.
6356         * tst-join4.c (do_test): Fix error message.
6358         * tst-rwlock6.c (do_test): Use correct format specifier.
6360         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6361         (__lll_mutex_lock_wait): Replace one memory operation with one
6362         register operation.
6363         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6364         (__lll_mutex_lock_wait): Likewise.
6366         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6367         (__lll_mutex_cond_lock): Add one to value parameter of
6368         __lll_lock_wait to reflect reality in the futex syscall.
6369         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6370         (lll_mutex_cond_lock): Likewise.
6372 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6374         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6375         New function.
6376         (lll_mutex_cond_lock): Define.
6378 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6380         * Makefile (tests): Add tst-signal6.
6381         * tst-signal6.c: New file.
6383         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6384         (__lll_mutex_unlock_force): New function
6385         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6387         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6388         (__lll_mutex_unlock_force): New function.
6389         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6391         * tst-rwlock7.c (do_test): Use correct format specifier.
6393         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6394         Find break parameter in correct asm argument.
6396 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6398         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6399         Remove out4.
6400         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6401         error occured.
6402         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6403         Add __mutex.
6404         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6405         lll_futex_requeue, lll_mutex_unlock_force): Define.
6407 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6409         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6410         (pthread_cond_t): Add __mutex.
6411         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6412         lll_futex_requeue, lll_mutex_unlock_force): Define.
6414 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6416         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6417         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6418         Add __mutex field.
6419         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6420         Define.
6421         (lll_futex_wait, lll_futex_wake): Define.
6422         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6423         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6424         FUTEX_REQUEUE instead of FUTEX_WAIT.
6425         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6426         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6427         mutex which was used in condvar structure.  Call
6428         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6429         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6431         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6432         include tcb-offsets.h.  Read wakeup value in locked region.
6433         Use the value of gbr register as THREAD_ID.
6434         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6435         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6436         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6438         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6439         macros.
6441 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6443         * sysdeps/pthread/pthread_cond_broadcast.c
6444         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6446 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6448         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6449         typo in register name.
6450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6451         correctly.  Actually use requeue.  Little optimization.
6452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6453         mutex address early.  Handle cancellation state as 32-bit value.
6454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6455         Remove unnecessary label.
6457 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6459         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6460         instead of FUTEX_WAIT.
6461         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6462         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6465         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6466         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6467         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6468         of __pthread_mutex_lock_internal.
6469         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6470         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6471         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6472         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6474         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6475         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6476         Add pthread_mutex_cond_lock.
6477         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6478         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6479         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6480         lll_mutex_cond_lock.
6481         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6482         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6483         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6484         Add __mutex field.
6485         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6486         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6488         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6489         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6491         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6492         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6493         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6494         macro don't define aliases.
6496         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6497         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6498         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6499         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6501         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6502         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6503         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6504         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6506 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6508         * sem_open.c: Fix one endless loop.  Implement correct semantics
6509         wrt opening the same semaphore more then once.
6510         * sem_close.c: Adjust for sem_open change.
6511         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6512         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6513         * Makefile (tests): Add tst-sem7.
6514         * tst-sem7.c: New file.
6516 2003-05-16  Roland McGrath  <roland@redhat.com>
6518         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6519         uninitialized variable braino.
6521 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6523         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6524         test for syscall availability.
6526         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6527         __no_posix_timers to -1 if the syscalls don't exist.
6529         * pthread_join.c (pthread_join): Set tid field of the joined
6530         thread to -1.  This isn't necessary but helps to recognize some
6531         error conditions with almost no cost.
6533         * allocatestack.c (FREE_P): Also negative values indicate an
6534         unused stack.
6536         * unwind.c: Include <unistd.h>.
6538 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6540         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6542 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6544         * Makefile (crti-objs, crtn-objs): New variables.
6545         (omit-deps, extra-objs): Add crtn.
6546         ($(objpfx)libpthread.so): Depend on both crti and crtn
6547         and links to them in multidir.
6548         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6550 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6552         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6553         (lll_mutex_unlock): Use atomic_exchange_rel.
6555 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6557         * cond-perf.c (cons): Add missing locking around setting of alldone.
6559 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6561         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6562         related macros.
6563         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6565 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6567         * tst-sem6.c: New file.
6568         * Makefile (tests): Add tst-sem6.
6570         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6571         Use atomic_exchange_rel instead of atomic_exchange.
6572         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6573         Likewise.
6575         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6576         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6577         vsyscall is possible.
6579         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6580         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6581         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6582         pthread_setaffinity_np.
6583         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6584         and pthread_setaffinity_np.
6585         * Makefile (libpthread-routines): Add pthread_getaffinity and
6586         pthread_setaffinity.
6588         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6589         use it in case mmap to allocate the stack fails.
6590         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6591         ARCH_MAP_FLAGS here.
6592         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6593         ARCH_RETRY_MMAP.
6595 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6597         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6598         handler implementation.  It is now lockless in fork().
6599         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6600         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6601         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6602         declare the __fork_*_lists.
6603         (struct fork_handler): Include pointers to all three functions.
6604         Add next, refcntr and need_signal elements.
6605         (__fork_handlers): New declaration.
6606         (__register_atfork_malloc): Remove declaration.
6607         (HAVE_register_atfork_malloc): Remove definition.
6608         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6609         __pthread_child_handler variable.
6610         (__libc_pthread_init): Use __register_atfork instead of explicitly
6611         adding to the list.
6612         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6613         and lll_futex_wake.
6614         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6616         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6617         function must never be reached.
6619         * cond-perf.c: New file.
6621 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6623         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6625 2003-05-04  Roland McGrath  <roland@redhat.com>
6627         * Makefile ($(objpfx)../libc.so): New target.
6629 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6631         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6632         (pthread_condattr_t): Size is only an int, don't use long for
6633         alignment.
6634         (pthread_mutexattr_t): Likewise.
6635         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6636         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6637         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6639 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6641         * sysdeps/i386/tls.h: Define THREAD_ID.
6642         * sysdeps/ia64/tls.h: Likewise.
6643         * sysdeps/powerpc/tls.h: Likewise.
6644         * sysdeps/s390/tls.h: Likewise.
6645         * sysdeps/sh/tls.h: Likewise.
6646         * sysdeps/x86_64/tls.h: Likewise.
6647         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6648         record ownership.
6649         * pthread_mutex_timedlock.c: Likewise.
6650         * pthread_mutex_trylock.c: Likewise.
6651         * pthread_mutex_unlock.c: Likewise.
6652         * pthread_rwlock_trywrlock.c: Likewise.
6653         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6654         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6655         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6656         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6658         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6659         flag.
6661 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6663         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6664         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6665         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6666         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6667         Make __align long long instead of long.
6668         (pthread_rwlock_t): Formatting.
6669         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6670         (pthread_rwlock_t): Formatting.
6671         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6672         (pthread_cond_t): Make __align long long instead of long.
6673         (pthread_rwlock_t): Move __flags field to the same position as in
6674         linuxthreads.
6676 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6678         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6679         * tst-rwlock7.c (do_test): Likewise.
6681 2003-04-26  Roland McGrath  <roland@redhat.com>
6683         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6685 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6687         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6688         sizeof (struct pthread).
6689         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6690         1 struct pthread.
6691         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6692         to 0.
6693         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6694         struct pthread.
6695         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6696         to 32-bit bytes.
6697         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6698         tcbp.
6699         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6700         unneccessarily.
6701         (NO_TLS_OFFSET): Define.
6702         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6703         add TLS_TCB_SIZE unnecessarily.
6705 2003-04-22  Roland McGrath  <roland@redhat.com>
6707         * Makeconfig (shared-thread-library): Reverse link order to work
6708         around linker bug.
6710 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6712         * semaphore.h: Fix typo in comment.
6714 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6716         * sysdeps/pthread/sigfillset.c: New file.
6718         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6719         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6720         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6721         * sysdeps/pthread/sigaction.c: Likewise.
6722         * sysdeps/pthread/sigprocmask.c: New file.
6723         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6724         __SIGRTMIN+1.
6725         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6726         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6727         in this case.
6729 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6731         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6732         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6734         * sysdeps/unix/sysv/linux/unregister-atfork.c
6735         (__unregister_atfork): Don't free memory not allocated dynamically.
6737         * semaphore.h: Remove __THROW marker from cancellation points.
6738         * nptl/sysdeps/pthread/pthread.h: Likewise.
6740 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6742         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6743         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6744         __THROW.
6746 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6748         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6750 2003-04-15  Roland McGrath  <roland@redhat.com>
6752         * forward.c (__pthread_unwind): Tweak to avoid warning.
6754 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6756         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6758 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6760         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6761         overflow CFA advance instructions.
6762         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6764 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6766         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6767         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6768         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6769         defined.
6771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6772         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6774         DW_CFA_advance_loc for .Laddl-.Lsubl.
6776 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6778         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6779         position-independent unwind data for static libraries.
6780         Add missing unwind info.  Add comments.
6782         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6784         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6785         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6787 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6789         * Makefile: Make sure all cancellation points are compiled with
6790         exception and asynchronous unwind tables.
6792         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6793         which mishandles loading of global object addresses in PIC.
6794         (THREAD_SETMEM_NC): Likewise.
6796 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6798         * pthread.h: Define new data structure for cleanup buffer.  Declare
6799         new cleanup handler interfaces.
6800         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6801         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6802         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6803         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6804         it.  Declare old cleanup handler installation functions.
6805         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6806         handling.
6807         * cleanup_defer.c: Likewise.
6808         * cleanup_compat.c: New file.  Old cleanup code.
6809         * cleanup_def_compat.c: New file.  Old cleanup code.
6810         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6811         if own thread descriptor.
6812         * unwind.c: New file.
6813         * forward.c: Add __pthread_unwind.
6814         * init.c (pthread_functions): Add __pthread_unwind.
6815         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6816         Add ptr___pthread_unwind.
6817         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6818         and unwind function.
6819         * Makefile (libpthread-routines): Add cleanup_compat,
6820         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6821         table generation if necessary.
6822         * version.c: Record whether unwind support is compiled in.
6823         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6824         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6825         handler interfaces.
6826         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6827         complication to generate unwind information for syscall wrappers.
6828         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6829         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6830         __cleanup_fct_attribute.
6832         * Makefile: Add rules to build and run tst-cleanup0.
6833         * tst-cleanup0.c: New file.
6834         * tst-cleanup0.expect: New file.
6836         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
6837         caller.  Optimize to avoid often unecessary local variable.
6839 2003-04-11  Roland McGrath  <roland@redhat.com>
6841         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6842         sets variable `multidir'; include that.
6843         (generated): Add it.
6844         ($(objpfx)$(multidir)/crti.o): New target.
6845         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6847 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6849         * tst-attr2.c (do_test): Add cast to avoid warning.
6850         * tst-mutex4.c (do_test): Likewise.
6852 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
6854         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6855         in child.
6857 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
6859         * Makefile (tests): Add tst-detach1.
6860         * tst-detach1.c: New file.
6862 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
6864         * sysdeps/pthread/pthread.h: Remove duplicate
6865         pthread_cleanup_{push,pop} definitions.
6867         * tst-barrier2.c: Eliminate warnings.
6868         * tst-cancel4.c: Likewise.
6869         * tst-cond4.c: Likewise.
6870         * tst-cond6.c: Likewise.
6871         * tst-detach1.c: Likewise.
6872         * tst-rwlock4.c: Likewise.
6873         * tst-rwlock6.c: Likewise.
6874         * tst-rwlock7.c: Likewise.
6875         * tst-sem3.c: Likewise.
6876         * tst-spin2.c: Likewise.
6877         * tst-umask1.c: Likewise.
6879 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
6881         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6883 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
6885         * descr.h (struct pthread): Move cancelhandling member to the front.
6887 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
6889         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6890         malloc_parent, and malloc_child statically.
6891         (__register_atfork_malloc): New function.
6892         (free_mem): Don't free any of the malloc_* variables on the list.
6893         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6894         Define HAVE_register_atfork_malloc.
6896 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
6898         * sysdeps/pthread/createthread.c (create_thread): Add some more
6899         comments explaining when to set multiple_threads and when not.
6901         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6902         THREAD_ATOMIC_BIT_SET if not already defined.
6903         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6904         THREAD_ATOMIC_BIT_SET:
6905         * sysdeps/x86_64/tls.h: Likewise.
6906         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6907         THREAD_ATOMIC_CMPXCHG_VAL.
6908         (_pthread_cleanup_pop_restore): Likewise.
6909         * cancellation.c (__pthread_enable_asynccancel): Likewise.
6910         (__pthread_enable_asynccancel_2): Likewise.
6911         (__pthread_disable_asynccancel): Likewise.
6912         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6913         (__libc_disable_asynccancel): Likewise.
6914         * init.c (sigcancel_handler): Likewise.
6915         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6916         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6918 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
6920         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6921         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6922         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6923         * Makefile (tests): Add tst-cancel11.
6924         * tst-cancel11.c: New file.
6926 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
6928         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6929         round, not the first.  Use specific_used flag instead of local
6930         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
6931         (__free_tcb): Don't call deallocate_tsd here.
6932         (start_thread): Call deallocate_tsd here.
6933         * pthread_setspecific.c: Set specific_used flag really only when
6934         needed.
6935         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6936         * tst-tsd3.c: New file.
6937         * tst-tsd4.c: New file.
6939 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6941         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6942         Use atomic_exchange_and_add instead of __lll_add.
6943         (__lll_mutex_timedlock): Likewise.
6944         Patch by Ian Wienand.
6946 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
6948         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6949         (SINGLE_THREAD_P): Fix typo.
6950         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6952 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
6954         * Makefile (tests): Add tst-align.
6955         * tst-align.c: New file.
6956         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6958         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6959         function correctly.
6961         * tst-tsd2.c: Add casts to avoid warnings.
6963 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
6965         * descr.h (struct pthread): Move most often used elements to the front.
6967 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
6969         * Makefile (libpthread-routines): Add pthread_atfork.
6970         (libpthread-static-only-routines): Add pthread_atfork.
6972 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6974         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6975         of TLS_DTV_AT_TP.
6976         (INSTALL_DTV): Add parens.
6977         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6978         Use passed descr instead of THREAD_SELF.
6979         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6980         (__lll_mutex_timedlock_wait): Correct expected value after
6981         spurious wakeup.
6982         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6983         Release lock before waking up the waiters.
6984         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6985         criteria.  Reorderstruct passed to cleanup handler.  Fix
6986         handling of cancellation and failung pthread_mutex_unlock call.
6987         Use __pthread_enable_asynccancel_2 instead of
6988         __pthread_enable_asynccancel.
6989         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6990         Return result of lock re-get if it fails.
6991         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6992         for __pthread_cleanup_push.
6993         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6994         completely broken rwlock implementation.
6995         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6996         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6997         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6998         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6999         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7000         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7001         versioned_symbol macro.
7002         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7003         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7005 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7007         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7008         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7009         and __helper_tid.
7010         (struct timer): Remove th and bar field.
7011         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7012         debugging code.  Create only one helper thread.
7013         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7014         helper thread.
7015         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7016         Renamed.  Define statically.  Use thread info from siginfo.
7017         (__helper_once): New variable.
7018         (__helper_tid): New variable.
7019         (__reset_helper_control): New function.
7020         (__start_helper_thread): New function.
7022         * pthread_create.c (start_thread): Don't use setjmp inside
7023         __builtin_expect to work around gcc bug.
7025         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7026         timer_delete syscall fails, but not with ENOSYS, set
7027         __no_posix_timers.
7029         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7030         (timer_settime): Fix typo.
7031         * sysdeps/unix/sysv/linux/timer_getoverr.c
7032         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7034 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7036         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7037         offset of cleanupbuf.__prev.
7039 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7041         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7042         of included file.
7044 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7046         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7047         NULL provide default definition to syscall.
7049 2003-03-25  Roland McGrath  <roland@redhat.com>
7051         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7052         (timer_id2ptr): Fix typo.
7054 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7056         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7057         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7058         * sysdeps/ia64/pthreaddef.h: Likewise.
7059         * sysdeps/powerpc/pthreaddef.h: Likewise.
7060         * sysdeps/s390/pthreaddef.h: Likewise.
7061         * sysdeps/sh/pthreaddef.h: Likewise.
7062         * sysdeps/x86_64/pthreaddef.h: Likewise.
7063         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7064         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7065         being changed.
7066         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7067         SIGTIMER is not unblocked.
7068         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7069         RT signal taken.
7070         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7071         be send.
7072         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7073         pass pointer through as ID.
7074         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7075         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7076         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7077         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7078         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7079         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7080         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7081         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7082         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7083         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7084         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7085         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7086         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7087         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7088         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7089         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7090         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7091         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7092         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7093         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7094         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7095         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7096         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7097         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7098         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7099         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7100         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7101         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7102         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7103         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7104         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7105         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7106         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7108         * pthreadP.h: Remove FRAME_LEFT definition.
7109         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7110         already left frame.  Programs which have this problem are not POSIX
7111         compliant.
7112         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7114 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7116         * sysdeps/pthread/tst-timer.c: Check return values of the
7117         functions we test.
7119 2003-03-23  Roland McGrath  <roland@redhat.com>
7121         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7122         * tst-tls3mod.c: Likewise.
7123         * tst-tls1.c: Likewise.
7124         * tst-tls2.c: Likewise.
7126         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7127         undefined behavior.
7129         * tst-join5.c (tf1, tf2): Add a cast.
7131         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7133         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7134         Don't test anything.
7135         * tst-cond4.c: Likewise.
7136         * tst-cond6.c: Likewise.
7137         * tst-flock2.c: Likewise.
7138         * tst-mutex4.c: Likewise.
7139         * tst-rwlock4.c: Likewise.
7140         * tst-signal1.c: Likewise.
7141         * tst-spin2.c: Likewise.
7142         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7144         * tst-mutex4.c: Use test-skeleton.c.
7145         * tst-spin2.c: Likewise.
7146         * tst-sysconf.c: Likewise.
7147         * tst-barrier2.c: Likewise.
7148         * tst-cond4.c: Likewise.
7149         * tst-cond6.c: Likewise.
7150         * tst-rwlock4.c: Likewise.
7151         * tst-unload.c: Likewise.
7152         * tst-flock2.c (do_test): Use return instead of exit.
7154 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7156         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7158 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7160         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7161         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7162         instead of __lll_compare_and_swap.
7163         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7164         Likewise.
7165         Removed definition if __lll_compare_and_swap.
7167         * cancellation.c: Adjust for new form of compare&exchange macros.
7168         * cleanup_defer.c: Likewise.
7169         * init.c: Likewise.
7170         * libc-cancellation.c: Likewise.
7171         * old_pthread_cond_broadcast.c: Likewise.
7172         * old_pthread_cond_signal.c: Likewise.
7173         * old_pthread_cond_timedwait.c: Likewise.
7174         * old_pthread_cond_wait.c: Likewise.
7175         * pthread_cancel.c: Likewise.
7176         * pthread_create.c: Likewise.
7177         * pthread_detach.c: Likewise.
7178         * pthread_join.c: Likewise.
7179         * pthread_key_delete.c: Likewise.
7180         * pthread_setcancelstate.c: Likewise.
7181         * pthread_setcanceltype.c: Likewise.
7182         * pthread_timedjoin.c: Likewise.
7183         * pthread_tryjoin.c: Likewise.
7184         * sysdeps/pthread/createthread.c: Likewise.
7186 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7188         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7189         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7190         definitions.  Replace uses with calls to atomic_* functions.
7191         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7192         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7193         __lll_test_and_set calls with atomic_exchange_and_add and
7194         atomic_exchange calls respectively.
7195         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7196         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7197         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7198         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7199         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7200         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7201         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7203         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7204         returns the old value.
7206 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7208         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7209         int for variable OLDVAL and correct inline assembler contraint.
7210         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7211         type int for variable OLD.
7213         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7214         only for s390-32.
7215         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7216         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7217         instead of multiple_threads field in the TCB.
7219 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7221         * sysdeps/i386/i686/bits/atomic.h: Removed.
7222         * sysdeps/i386/i586/bits/atomic.h: Removed.
7223         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7224         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7225         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7226         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7227         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7228         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7229         * atomic.h: Removed.  Moved to glibc.
7231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7232         support for clock selection.
7234         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7235         signalling waiters.
7237 2003-03-18  Roland McGrath  <roland@redhat.com>
7239         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7240         Add __lll_rel_instr first.  Add memory clobber.
7241         (lll_mutex_unlock): Use __lll_test_and_set.
7242         From Paul Mackerras <paulus@samba.org>.
7244         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7245         unconditionally.
7246         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7247         (SINGLE_THREAD_P):  Add `header.' prefix.
7248         From Paul Mackerras <paulus@samba.org>.
7250         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7251         pthread_timedjoin_np to ...
7252         (libpthread: GLIBC_2.3.3): ... here.
7253         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7255         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7256         Avoid shadowing VAL variable.
7258         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7259         New macro.
7261 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7263         * Makefile (tests): Add tst-cond11.
7264         * tst-cond11.c: New file.
7266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7267         struct passed to cleanup handler to eliminate one more
7268         instruction.
7269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7271         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7272         (pthrad_cond_t): Replace __unused field with __clock.
7274         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7275         waken all waiters in cleanup handler.
7276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7279         * pthread_condattr_getclock.c: New file.
7280         * pthread_condattr_setclock.c: New file.
7281         * sysdeps/pthread/pthread.h: Declare these new functions.
7282         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7283         * Makefile (libpthread-routines): Add the new functions.
7284         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7285         Renamed field to value.  Document use of the bits.
7286         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7287         change.
7288         * pthread_condattr_setpshared.c: Likewise.
7289         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7290         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7291         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7292         Add __clock field.
7293         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7294         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7295         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7296         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7298         Implement clock selection.
7299         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7300         * pthread-errnos.sym: Add ENOSYS.
7301         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7302         _POSIX_CLOCK_SELECTION.
7303         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7306         invalid .size directive.
7308 2003-03-17  Roland McGrath  <roland@redhat.com>
7310         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7311         Formatting tweaks.
7313 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7315         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7316         Use __lll_add instead of spelling it out.  Use protected symbol names.
7317         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7318         Use __lll_add.
7319         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7320         Renamed from lll_compare_and_swap.  Use new name where necessary.
7321         (__lll_add): Defined.
7322         (__lll_dec_if_positive): Defined.
7323         (__lll_test_and_set): Defined.
7324         * sysdeps/ia64/pthread_spin_init.c: Removed.
7325         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7326         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7327         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7328         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7329         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7330         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7331         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7332         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7333         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7334         __sync_lock_release_si.
7335         Patch by Jakub Jelinek.
7337         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7338         Fix timeout handling.
7339         (__lll_timedwait_tid): Likewise.
7340         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7341         Patch by Jakub Jelinek.
7343         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7345 2003-03-17  Roland McGrath  <roland@redhat.com>
7347         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7348         * sysdeps/pthread/pthread_spin_init.c: New file.
7349         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7350         * sysdeps/powerpc/Makefile: New file.
7351         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7352         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7353         * sysdeps/powerpc/pthreaddef.h: New file.
7354         * sysdeps/powerpc/tcb-offsets.sym: New file.
7355         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7356         * sysdeps/powerpc/tls.h: New file.
7357         * sysdeps/powerpc/bits/atomic.h: New file.
7358         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7359         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7360         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7362         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7363         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7364         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7365         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7366         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7367         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7368         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7369         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7370         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7371         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7372         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7373         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7374         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7375         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7376         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7378         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7379         not gettimeofday.
7380         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7381         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7382         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7383         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7384         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7386 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7388         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7389         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7390         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7392         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7394 2003-03-16  Roland McGrath  <roland@redhat.com>
7396         * tst-fork4.c: Include <string.h>.
7397         * tst-signal2.c: Likewise.
7398         * tst-mutex5.c (do_test): exit -> return.
7399         * tst-mutex2.c: Include <stdlib.h>.
7401 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7403         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7404         (__lll_mutex_timedlock_wait): Correct expected value after
7405         spurious wakeup.  Otherwise we would never wait again.
7407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7408         zone versus inline asm stupidity.  Use correct instructions.
7410         * tst-rwlock6.c: Add some more status output.
7412 2003-03-15  Roland McGrath  <roland@redhat.com>
7414         * sysdeps/pthread/configure.in: New file.
7415         * sysdeps/pthread/configure: New file (generated).
7417 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7419         * allocatestack.c (allocate_stack): Store the exact stack size of
7420         user allocated stacks.
7422 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7424         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7425         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7426         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7427         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7428         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7429         Use `header.' prefix.
7430         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7432 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7434         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7435         __builtin_frame_address, use stack pointer.
7437         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7438         instead of __builtin_frame_pointer.
7440 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7442         * tst-basic1.c (do_test): Add cast to avoid warning.
7443         * tst-basic2.c (do_test): Likewise.
7445         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7446         amount of stack correction.
7448         * tst-fork4.c: Use test-skeleton.c.
7450 2003-03-14  Roland McGrath  <roland@redhat.com>
7452         * init.c: Fix typo "#eli" for "#else".
7454 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7456         * allocatestack.c (__stack_user): Use hidden_data_def.
7457         * pthread_create.c (__pthread_keys): Likewise.
7459         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7461 2003-03-14  Roland McGrath  <roland@redhat.com>
7463         * tst-fork4.c: New file.
7464         * Makefile (tests): Add it.
7466         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7467         we always define the padding space.
7468         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7469         stopped supporting its own extensions fully.
7470         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7471         struct also called `header', so `header.multiple_threads' is the field
7472         name to use on all machines.
7473         * allocatestack.c (allocate_stack): Use `header.' prefix.
7474         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7475         * pthread_create.c (__pthread_create_2_1): Likewise.
7476         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7477         (THREAD_SELF): Likewise.
7478         * sysdeps/x86_64/tls.h: Likewise.
7479         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7480         (SINGLE_THREAD_P): Likewise.
7481         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7482         (SINGLE_THREAD_P): Likewise.
7483         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7484         (SINGLE_THREAD_P): Likewise.
7486         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7487         value directly.
7489 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7491         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7492         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7494         * pthread_create.c (start_thread): setjmp is expected to return 0.
7496         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7497         (THREAD_GETMEM_NC): Likewise.
7499 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7501         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7502         and the size of the stack which must be allocated is a multiple,
7503         allocate one more page.
7504         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7505         MULTI_PAGE_ALIASING.
7507 2003-03-13  Roland McGrath  <roland@redhat.com>
7509         * pthread_create.c (start_thread): Set EXITING_BIT after the
7510         event-reporting (and destructors), not before.
7512 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7514         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7515         lll_futex_wake): Declare register variables as long int instead of
7516         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7517         Make syscall arguments clobbered by the syscall.
7518         (lll_futex_wait): Define using lll_futex_timed_wait.
7520         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7521         to void *.
7523         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7524         PPID if [! NDEBUG].
7526         * allocatestack.c (nptl_ncreated): Only declare if
7527         COLORING_INCREMENT != 0.
7529         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7530         (__libc_enable_asynccancel_2): Remove prototype.
7532         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7533         ctid to match kernel.
7535 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7537         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7538         libc_multiple_threads.
7539         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7540         __libc_multiple_threads to...
7541         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7543         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7544         versioning.
7545         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7546         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7548         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7549         (__pthread_once_internal): Define.
7551         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7552         macros instead of .symver directly.
7553         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7554         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7556         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7557         * sysdeps/x86_64/tcb-offsets.sym: New file.
7558         * sysdeps/x86_64/Makefile: New file.
7560         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7561         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7562         to access own pthread_t in TCB.
7563         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7564         Likewise.
7565         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7566         Likewise.
7567         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7569 2003-03-12  Roland McGrath  <roland@redhat.com>
7571         * pthread-errnos.sym: New file.
7572         * Makefile (gen-as-const-headers): New variable, list that file.
7573         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7574         header <pthread-errnos.h> instead of defining errno values here.
7575         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7576         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7577         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7578         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7579         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7580         Likewise.
7581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7582         Likewise.
7583         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7584         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7585         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7586         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7587         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7588         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7589         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7590         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7591         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7592         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7593         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7594         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7595         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7596         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7597         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7598         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7599         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7600         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7601         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7602         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7603         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7604         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7605         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7606         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7607         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7608         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7609         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7611         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7612         CLONE_CHILD_SETTID worked.
7614 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7617         file.
7618         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7619         file.
7621         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7622         (pthread_cond_t): Add padding.
7624         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7625         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7626         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7628         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7629         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7630         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7631         (__pthread_rwlock_timedrdlock): Likewise.
7632         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7633         (__pthread_rwlock_wrlock): Likewise.
7634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7635         (__pthread_rwlock_rdlock): Likewise.
7637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7640         result of lock re-get if it fails.
7642 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7645         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7646         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7647         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7649         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7650         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7651         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7652         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7653         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7655         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7656         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7658         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7659         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7660         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7661         (create_thread): Likewise.
7662         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7663         * init.c (__pthread_initialize_minimal_internal): Initialize
7664         __libc_multiple_threads_ptr if necessary.
7665         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7666         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7667         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7668         __libc_multiple_threads.
7669         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7670         necessary.
7672         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7673         (THREAD_SETMEM_NC): Likewise.
7675         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7676         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7677         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7678         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7680         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7681         Eliminate one entire instruction.
7683         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7684         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7685         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7686         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7687         instead of __pthread_enable_asynccancel.
7688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7689         (__pthread_cond_wait): Likewise.
7690         * sysdeps/pthread/pthread_cond_timedwait.c
7691         (__pthread_cond_timedwait): Likewise.
7692         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7694         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7695         (__condvar_cleanup): Wake up all waiters in case we got signaled
7696         after being woken up but before disabling asynchronous
7697         cancellation.
7698         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7700         (__condvar_cleanup): Likewise.
7702         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7703         Make it an error if architecture has no #if case.  Add x86-64.
7705         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7706         pt-initfini.s generation.
7708         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7709         (TLS_INIT_TP): Fix typo.
7711 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7713         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7714         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7716         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7717         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7718         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7719         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7720         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7721         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7722         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7723         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7725 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7727         * sysdeps/pthread/pthread_cond_timedwait.c
7728         (__pthread_cond_timedwait): Return the result of the final
7729         locking.  If it succeeds, the regular function return value.
7731         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7732         Return result of the final locking.
7733         * version.c (__nptl_main): Work around problems with the strange
7734         INTERNAL_SYSCALL macro on ppc32.
7735         * init.c (__pthread_initialize_minimal_internal): Unblock
7736         SIGCANCEL in case the parent blocked it.
7737         Reported by Paul Mackerras <paulus@samba.org>.
7739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7740         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7743 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7745         * sysdeps/pthread/pthread_cond_timedwait.c
7746         (__pthread_cond_timedwait): Unlock and fail if
7747         __pthread_mutex_unlock_internal failed.
7749         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7750         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7751         Use ARCH_CLONE.
7752         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7753         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7754         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7755         ALLOCATE_STACK): New macros.
7756         (TLS_TPADJ): New macro.
7757         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7758         (allocate_stack): Handle TLS_DTV_AT_TP and
7759         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7760         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7761         Don't set PD->self.
7762         * init.c [__ia64__] (__NR_set_tid_address): Define.
7764         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7765         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7766         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7767         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7768         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7769         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7770         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7771         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7772         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7773         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7774         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7775         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7776         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7777         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7778         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7779         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7780         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7781         * sysdeps/ia64/bits/atomic.h: New file.
7782         * sysdeps/ia64/Makefile: New file.
7783         * sysdeps/ia64/pthread_spin_init.c: New file.
7784         * sysdeps/ia64/pthread_spin_lock.c: New file.
7785         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7786         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7787         * sysdeps/ia64/pthreaddef.h: New file.
7788         * sysdeps/ia64/tcb-offsets.sym: New file.
7789         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7790         * sysdeps/ia64/tls.h: New file.
7792         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7793         to syscall instead of no arguments.
7795 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7797         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7798         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7799         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7800         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7802         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7803         unused code.
7805         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7807         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7808         lowlevelbarrier.sym.
7809         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7810         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7811         Include lowlevelbarrier.h and don't define offsets locally.
7812         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7814         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7815         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7816         (__lll_mutex_timedlock_wait): Likewise.
7817         (lll_mutex_lock): Adjust asm for that.
7818         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7819         (lll_lock): Adjust asm for operand order change.
7820         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7821         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7823         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7824         Reverse order of parameters.
7825         (__lll_timedwait_tid): Remove regparms attribute.
7826         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7827         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7829         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7830         (__lll_timedwait_tid): Remove one unnecessary instruction.
7832         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7833         __lll_mutex_timedlock_wait only for NOT_IN_libc.
7834         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7835         lowlevelmutex.S.
7837         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7838         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7839         for NOT_IN_libc.
7840         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7841         lowlevellock.S.
7843         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7844         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
7845         for libc.so.
7846         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7847         define LOCK here (if UP is not defined).  The actual code is in
7848         lowlevelmutex.S.
7850         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7851         LOCK is already defined.  Don't define lll_unlock_wake_cb and
7852         __lll_timedwait_tid for libc.so.
7853         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7854         define LOCK here (if UP is not defined).  The actual code is in
7855         lowlevellock.S.
7857         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7858         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7859         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7860         instead of lowlevelsem.h.
7861         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7862         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7863         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7865         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7866         lowlevelrwlock.sym.
7867         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7868         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7869         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7871         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7872         register loading.
7873         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7874         last changed.  D'oh.
7876         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7878         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7879         of __libc_locking_needed.
7880         (lll_trylock): Initialize %eax to zero.
7882         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7883         pthread_cond_t definition.
7885 2003-03-10  Roland McGrath  <roland@redhat.com>
7887         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7888         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7889         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7890         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7891         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7893         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7894         Instead of setting PD->multiple_threads, set globals
7895         __pthread_multiple_threads and __libc_multiple_threads.
7896         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7897         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7898         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7900         * descr.h (struct pthread): Conditionalize first member on
7901         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
7902         containing an anonymous tcbhead_t.  Move `list' member out.
7903         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7904         * allocatestack.c: Remove use of `header.data.' prefix.
7905         * pthread_create.c: Likewise.
7906         * init.c (__pthread_initialize_minimal_internal): Likewise.
7907         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7908         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7909         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7910         * sysdeps/x86_64/tls.h: Likewise.
7911         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7912         (SINGLE_THREAD_P): Likewise.
7913         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7914         (SINGLE_THREAD_P): Likewise.
7915         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7916         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7918 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
7920         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7922         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7923         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7925         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7926         leftovers from the ia32 code.
7928         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7929         memory load.
7930         (clear_once_control): Don't load %esi.
7932         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7933         handling.
7935         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7937         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7938         * sysdeps/unix/sysv/linux/createthread.c: ...here.
7940         * Makefile (tests): Add tst-cond10.
7941         * tst-cond10.c: New file.
7943 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
7945         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7946         * tst-signal3.c (do_test): Likewise.
7947         * tst-sem5.c (do_test): Likewise.
7948         * tst-kill6.c (do_test): Likewise.
7949         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
7951         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7952         of inc/dec.
7953         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7954         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7955         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7956         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7957         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7958         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7959         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7960         Likewise.
7961         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7962         Likewise.
7963         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7964         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7965         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7968         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7969         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7970         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7972         * allocatestack.c (allocate_stack): If mprotect() fails free the
7973         TLS memory.
7975 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
7977         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7979         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7980         lll_wake_tid.  This was used only to work around kernel limits in
7981         the early days.
7982         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7983         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7984         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7985         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7987         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7988         (__pthread_initialize_minimal_internal): Change initialization of
7989         __static_tls_align_m1 appropriately.
7990         * pthreadP.h (__static_tls_align_m1): Renamed from
7991         __static_tls_align.
7992         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7993         instead of __static_tls_align-1.
7995 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
7997         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7999         * pthread_create.c: Define __pthread_keys using nocommon
8000         attribute, not by placing it explicitly in bss.
8001         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8003         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8004         Use it in mmap call to allocate stacks.
8006         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8008         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8009         result of the thread function.
8011 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8013         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8014         version is just fine.
8016         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8017         (__pthread_child_handler): Renamed from pthread_child_handler,
8018         exported, and marked hidden.  Change all users.
8019         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8020         free __pthread_child_handler from child list.
8022 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8024         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8026         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8027         Fix handling of cancellation and failing pthread_mutex_unlock call.
8028         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8029         (__pthread_cond_wait): Likewise.
8031         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8032         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8033         lll_futex_timed_wait call.
8034         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8035         (pthread_rwlock_timedwrlock): Likewise.
8037         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8038         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8039         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8041         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8042         check of lll_futex_wake return value.
8044 2003-03-03  Roland McGrath  <roland@redhat.com>
8046         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8048         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8049         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8050         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8052 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8054         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8055         error for CPU clocks.
8057         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8058         _POSIX_MONOTONIC_CLOCK.
8059         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8061         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8062         recent kernels.
8064 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8066         * descr.h (struct pthread): Move cleanup field to the front.
8068 2003-03-01  Roland McGrath  <roland@redhat.com>
8070         * sem_open.c (sem_open): Braino fix.
8072 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8074         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8075         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8076         __pthread_cleanup_pop functionality.
8077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8079         * descr.h (struct pthread): Move tid field to the front now that
8080         it is often used.
8082         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8083         (__lll_mutex_timedlock_wait): Remove.
8084         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8085         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8086         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8087         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8088         (lll_unlock_wake_cb): Don't save and restore %esi.
8089         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8090         %esi.
8091         (__lll_timedwait_tid): Add alignment.
8092         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8093         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8094         %esi.
8095         (__lll_timedwait_tid): Removed.
8096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8097         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8098         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8099         (pthread_barrier_wait): Don't save, load, and restore %esi for
8100         last thread.
8101         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8102         (__pthread_cond_signal): Don't save, load, and restore %esi.
8103         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8104         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8105         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8106         Don't save, load, and restore %esi.
8108 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8110         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8111         Release lock before waking up the waiters.
8113         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8115         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8116         (reader_thread): Likewise.
8118         * sysdeps/pthread/pthread_rwlock_unlock.c
8119         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8120         to wake up readers if there are none.
8122         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8123         Release internal lock before wake threads.
8125 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8127         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8128         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8129         predefined.
8130         * tst-rwlock9.c: Likewise.
8131         * tst-rwlock10.c: New file.
8132         * tst-rwlock11.c: New file.
8134         * Makefile (tests): Add tst-dlsym1.
8135         * tst-dlsym1.c: New file.
8137         * init.c (__pthread_initialize_minimal_internal): Set
8138         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8139         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8141 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8143         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8145         * tst-cond2.c: Fix sychronization with child.
8147         * tst-rwlock8.c (reader_thread): Remove unused variable.
8149         * Makefile: Add rules to build and run tst-tls3.
8150         * tst-tls3.c: New file.
8151         * tst-tls3mod.c: New file.
8153         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8154         * tst-rwlock8.c: New file.
8155         * tst-rwlock9.c: New file.
8156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8157         complete broken rwlock implementation.
8158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8159         Likewise.
8160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8161         Likewise.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8164         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8165         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8166         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8167         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8168         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8170 2003-02-23  Roland McGrath  <roland@redhat.com>
8172         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8174 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8176         * Makefile (tests): Add tst-context1.
8177         * tst-context1.c: New file.
8179         * Makefile (tests): Add tst-tls1 and tst-tls2.
8180         * tst-tls1.c: New file.
8181         * tst-tls2.c: New file.
8183         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8184         for failed cmpxchg.
8186         * pthread_create.c (start_thread): Set EXITING_BIT early.
8188         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8189         (THREAD_GETMEM_NC): Likewise.
8191 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8193         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8194         off 3 more bytes by using offset-less instructions when possible.
8196         * Makefile: Add dependency for $(objpfx)version.d.
8198         * eintr.c (eintr_source): Add unnecessary return but the compiler
8199         insists.
8201         * tst-kill3.c: Include <unistd.h>.
8203 2003-02-21  Roland McGrath  <roland@redhat.com>
8205         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8207 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8209         * Makefile (tests): Add tst-eintr1.
8210         (distribute): Add eintr.c.
8211         * tst-eintr1.c: New file.
8212         * eintr.c: New file.
8214         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8216         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8217         Disallow sending SIGCANCEL.
8219         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8220         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8221         * tst-kill1.c: New file.
8222         * tst-kill2.c: New file.
8223         * tst-kill3.c: New file.
8224         * tst-kill5.c: New file.
8225         * tst-kill6.c: New file.
8226         * tst-basic7.c: Renamed to...
8227         * tst-kill4.c: ...this.
8229 2003-02-21  Roland McGrath  <roland@redhat.com>
8231         * Makefile (install-lib-ldscripts): New variable.
8233 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8235         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8236         * pthread_cancel.c: Use INVALID_TD_P.
8237         * pthread_detach.c: Likewise.
8238         * pthread_getschedparam.c: Likewise.
8239         * pthread_setschedparam.c: Likewise.
8240         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8241         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8242         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8243         * pthread_timedjoin.c: Likewise.
8245         * tst-basic7.c: Include <signal.h>.
8247         * pthread_join.c (pthread_join): Limited checking for invalid
8248         descriptors.
8249         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8251 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8253         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8254         beginning of the loop.  Clear the entire first block of TSD.
8255         * Makefile (tests): Add tst-key4.
8256         * tst-key4.c: New file.
8258 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8260         * Makefile (tests): Add tst-basic7.
8261         * tst-basic7.c: New file.
8263         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8264         Add some more __builtin_expect.
8266         * pthreadP.h: Define dummy version of DEBUGGING_P.
8268 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8270         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8271         _POSIX_THREAD_PRIORITY_SCHEDULING.
8272         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8273         _XOPEN_REALTIME_THREADS.
8274         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8276         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8277         kernel returns EINVAL for PID <= 0, work around it.
8279         * Makefile (tests): Add tst-signal5.
8280         * tst-signal5.c: New file.
8282         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8283         and LOGIN_NAME_MAX.
8285         * tst-cancel1.c (tf): Block all signals.
8287         * Makefile (tests): Add tst-basic6.
8288         * tst-basic6.c: New file.
8290         * tst-basic1.c: Add test for process ID.
8292         * Makefile (tests): Add tst-cancel10.
8293         * tst-cancel10.c: New file.
8295         * Makefile (tests): Add tst-signal4.
8296         * tst-signal4.c: New file.
8298         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8299         __sigismember instead of sigismember.  Add __builtin_expect.
8301 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8303         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8304         pthread_setcancelstate, and pthread_rwlock_setpshared.
8306         * tst-cancel7.c (do_test): Make sure the pid file exists before
8307         canceling the thread.
8309         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8310         pthread_rwlock_timedrdlock tests.
8311         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8312         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8313         Check for invalid tv_nsec field.
8314         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8315         Likewise.
8317         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8318         recursive mutex of overflow.
8320         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8322         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8323         going into an endless loop.
8324         * Makefile (tests): Add tst-cancel9.
8325         * tst-cancel9.c: New file.
8327         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8329 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8331         * tst-mutex5.c (do_test): Add more timedlock tests.
8333         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8334         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8336         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8337         use INLINE_SYSCALL.  Error number is returned, not -1.
8339         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8340         and __deallocate_stack with internal_function.
8341         * pthread_create.c: Adjust definitions appropriately.
8342         * allocatestack.c: Likewise.
8344         * pthread_join.c: Add one more __builtin_expect.
8345         * pthread_timedjoin.c: Likewise.
8347         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8348         not data of sequence number does not match.
8349         Add one __builtin_expect.
8351         * Makefile (tests): Add tst-clock1.
8352         * tst-clock1.c: New file.
8354         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8355         negative arguments.
8356         * Makefile (tests): Add tst-basic5.
8357         * tst-basic5.c: New file.
8359 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8361         * Makefile (tests): Add tst-basic4.
8362         * tst-basic4.c: New file.
8364         * pthreadP.h: Add declaraction for __nptl_nthreads.
8365         * pthread_create.c: Define __nptl_nthreads
8366         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8367         after thread is done.  If then zero, call exit(0).
8368         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8369         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8370         * init.c (pthread_functions): Initialize ptr_nthreads.
8371         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8372         (__reclaim_stacks): Decrement __nptl_nthreads.
8373         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8374         Define.
8375         * Makefile (tests): Add tst-basic3.
8376         * tst-basic3.c: New file.
8378         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8379         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8380         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8381         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8382         if asynchronous canceling is enabled.
8383         * pthread_join.c (pthread_join): When recognizing circular joins,
8384         take into account the other thread might be already canceled.
8385         * Makefile (tests): Add tst-join5.
8386         * tst-join5.c: New file.
8388         * Makefile (tests): Add tst-join4.
8389         * tst-join4.c: New file.
8391 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8393         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8395 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8397         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8398         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8399         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8400         warning.
8401         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8402         to avoid warning.
8403         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8404         error if lll_futex_wake failed.
8406 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8408         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8409         handling of cancellation and failung pthread_mutex_unlock call.
8410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8411         * Makefile (tests): Add tst-cond8 and tst-cond9.
8412         * tst-cond8.c: New file.
8413         * tst-cond9.c: New file.
8415         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8417         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8418         non-standard initializers with __USE_GNU.
8420         * Makefile (tests): Add tst-cleanup3.
8421         * tst-cleanup3.c: New file.
8423 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8425         * Makefile (tests): Add tst-attr1 and tst-attr2.
8426         * tst-attr1.c: New file.
8427         * tst-attr2.c: New file.
8429         * Makefile: Add rules to build and run tst-atfork2 test.
8430         * tst-atfork2.c: New file.
8431         * tst-atfork2mod.c: New file.
8433         * sysdeps/unix/sysv/linux/unregister-atfork.c
8434         (__unregister_atfork): Free the memory allocated for the handlers
8435         after removing them from the lists.
8437         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8438         cleanup function.
8440         * tst-atfork1.c (do_test): Wait for the child we forked.
8441         Report error in child.
8443         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8445         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8447 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8449         * Makefile (tests): Add tst-cancel8.
8450         * tst-cancel8.c: New file.
8452         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8453         clearing of control variable.
8454         * Makefile (tests): Add tst-once3 and tst-once4.
8455         * tst-once3.c: New file.
8456         * tst-once4.c: New file.
8458 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8460         * sysdeps/sh/Makefile: New file.
8461         * sysdeps/sh/bits/atomic.h: New file.
8462         * sysdeps/sh/pthread_spin_init.c: New file.
8463         * sysdeps/sh/pthread_spin_lock.c: New file.
8464         * sysdeps/sh/pthread_spin_trylock.S: New file.
8465         * sysdeps/sh/pthread_spin_unlock.S: New file.
8466         * sysdeps/sh/pthreaddef.h: New file.
8467         * sysdeps/sh/tcb-offsets.sym: New file.
8468         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8469         * sysdeps/sh/tls.h: New file.
8470         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8471         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8472         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8473         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8474         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8475         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8476         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8477         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8478         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8479         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8480         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8481         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8482         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8483         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8484         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8485         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8486         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8487         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8488         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8489         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8490         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8491         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8492         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8493         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8494         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8495         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8496         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8497         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8498         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8499         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8501 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8503         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8504         according to POSIX.
8506         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8508 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8510         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8511         (TLS_GET_FS): New #define.
8512         (TLS_SET_FS): New #define.
8513         Correct value of __NR_set_thread_area.
8515         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8517 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8519         * Makefile (tests): Add tst-popen1.
8520         * tst-popen1.c: New file.
8522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8523         but inactive generalization.
8524         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8526         Minor optimization, remove one instruction.
8527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8529 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8531         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8533 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8535         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8536         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8537         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8538         * sysdeps/pthread/pthread_cond_signal.c: New file.
8539         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8540         * sysdeps/pthread/pthread_cond_wait.c: New file.
8541         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8542         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8543         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8544         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8545         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8546         * sysdeps/s390/Makefile: New file.
8547         * sysdeps/s390/bits/atomic.h: New file.
8548         * sysdeps/s390/pthread_spin_init.c: New file.
8549         * sysdeps/s390/pthread_spin_lock.c: New file.
8550         * sysdeps/s390/pthread_spin_trylock.c: New file.
8551         * sysdeps/s390/pthread_spin_unlock.c: New file.
8552         * sysdeps/s390/pthreaddef.h: New file.
8553         * sysdeps/s390/tcb-offsets.sym: New file.
8554         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8555         * sysdeps/s390/tls.h: New file.
8556         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8557         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8558         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8559         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8560         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8561         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8562         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8563         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8564         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8565         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8566         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8567         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8568         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8569         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8570         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8571         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8572         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8573         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8574         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8575         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8576         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8577         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8578         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8580 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8582         * atomic.h: Add a couple more default implementations.
8583         (atomic_compare_and_exchange_acq): Use
8584         __arch_compare_and_exchange_32_acq in return value definition.  It
8585         always exists.
8586         (atomic_bit_set): Renamed from atomic_set_bit.
8587         Add missing atomic_ prefixes.
8589         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8590         thread library is available, use correct value to mark initialized
8591         once variable.
8593 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8595         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8596         __sysconf to determine pagesize.
8598         * pthread_create.c: Include <atomic.h>.
8599         * allocatestack.c (allocate_stack): Implement coloring of the
8600         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8601         size minus one.  Adjust users.
8602         * sysdeps/i386/i686/Makefile: New file.
8604 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8606         * allocatestack.c: Improve comment throughout the file.
8608         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8609         (__lll_lock_wait): Add branch prediction.
8610         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8611         (__lll_lock_wait): Likewise.
8612         (lll_unlock_wake_cb): Removed.
8614 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8616         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8617         _POSIX_THREAD_PRIORITY_SCHEDULING.
8619 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8621         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8622         Fix return type of ptr___pthread_getspecific.
8624 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8626         * Makefile (tests): Add tst-umask1.
8627         (tst-umask1-ARGS): Define.
8628         * tst-umask1.c: New file.
8630 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8632         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8633         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8634         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8635         pthread_rwlock_unlock.
8636         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8637         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8638         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8639         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8641         New file.
8642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8643         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8644         New file.
8645         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8646         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8647         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8648         New file.
8649         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8650         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8651         New file.
8652         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8653         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8654         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8655         New file.
8656         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8657         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8658         New file.
8659         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8661         * Makefile (libpthread-routines): Remove lowlevelcond and
8662         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8663         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8664         and pthread_cond_broadcast.
8665         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8666         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8667         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8668         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8669         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8670         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8671         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8672         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8673         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8674         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8675         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8676         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8677         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8679         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8680         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8681         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8682         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8683         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8684         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8685         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8686         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8687         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8688         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8689         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8690         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8691         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8692         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8693         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8694         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8695         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8697         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8698         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8699         of the code is moved to ...
8700         * sysdeps/pthread/createthread.c: ...here.  New file.
8702 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8704         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8705         (__new_sem_post): Clear %eax before returning.
8706         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8708         * Makefile (tests): Add tst-cleanup2.
8709         * tst-cleanup2.c: New file.
8711         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8712         Interpret first parameter correctly.
8714 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8716         * Makefile (headers): Add bits/semaphore.h.
8718 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8720         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8721         if not SHARED.
8723 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8725         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8726         must be used and mapping failed.
8727         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8729         * Makefile (CFLAGS-pthread_self.os): Define this, not
8730         CFLAGS-pthread_self.c.
8732 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8734         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8735         lll_unlock_wake_cb.
8737         * Makefile (libpthread-routines): Add version.  Add rules to build
8738         version.os and banner.h.
8739         * version.c: New file.
8741 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8743         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8744         the alias unconditional.
8745         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8747 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8749         * Makefile (CFLAGS-pthread_self.c): New definition.
8751 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8753         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8754         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8755         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8756         * init.c (__pthread_initialize_minimal_internal): Likewise.
8758 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8760         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8762         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8763         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8764         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8765         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8766         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8767         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8769 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8771         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8772         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8773         * tst-cancel-wrappers.sh: Remove all exceptions.
8775 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8777         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8778         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8780         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8781         Use __libc_pthread_functions array if SHARED.
8783         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8784         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8786         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8787         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8788         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8789         __libc_ptf_call instead of __libc_maybe_call.
8790         (PTF): New #define.
8791         (__libc_cleanup_region_start): Wrap function name with PTF call.
8792         (__libc_cleanup_region_end): Likewise.
8793         (__libc_cleanup_end): Likewise.
8795         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8796         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8797         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8798         * pthreadP.h: Add prototypes.
8800         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8801         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8802         __pthread_rwlock_unlock aliases.
8803         * pthreadP.h: Add prototypes for new aliases.
8805         * pthreadP.h (struct pthead_functions): Moved to...
8806         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8807         * init.c (pthread_functions): Add initializers for new elements.
8809         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8810         __pthread_cleanup_pop_restore aliases.
8811         * pthreadP.h: Add prototypes.
8813         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8814         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8815         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8816         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8817         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8818         * pthreadP.h: Adjust prototypes and callers.
8820 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
8822         * Makefile (tests): Add tst-cancel7.
8823         (tst-cancel7-ARGS): New variable.
8824         * tst-cancel7.c: New file.
8826         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8827         around gcc defficiencies.
8828         * old_pthread_cond_signal.c: Likewise.
8829         * old_pthread_cond_timedwait.c: Likewise.
8830         * old_pthread_cond_wait.c: Likewise.
8832         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8834 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8836         * Makefile (tests): Add tst-cond7.
8837         * tst-cond7.c: New file.
8839         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8840         (condvar_cleanup): Get condvar address from the right place.
8842         * atomic.h: Correct definitions of atomic_full_barrier,
8843         atomic_read_barrier, atomic_write_barrier.
8845         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8846         race-free.
8847         * old_pthread_cond_signal.c: Likewise.
8848         * old_pthread_cond_timedwait.c: Likewise.
8849         * old_pthread_cond_wait.c: Likewise.
8851 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
8853         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8855 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
8857         * pthreadP.h (pthread_cond_2_0_t): New type.
8858         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8859         Use new type for the 2.0 condvar function prototypes.
8860         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8861         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8862         parameter.
8863         * old_pthread_cond_destroy.c: Likewise.
8864         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
8865         * old_pthread_cond_signal.c: Likewise.
8866         * old_pthread_cond_timedwait.c: Likewise.
8867         * old_pthread_cond_wait.c: Likewise.
8869         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8870         (__pthread_cond_wait): Don't save cancellation mode and seq value
8871         in same location.
8873         * herrno.c (__h_errno_location): Don't define as weak.
8875 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8877         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8878         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8879         and pthread_cond_wait.
8880         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8881         Renamed to...
8882         (__pthread_cond_broadcast_2_0): ... this.
8883         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8884         Renamed to...
8885         (__pthread_cond_destroy_2_0): ... this.
8886         * old_pthread_cond_init.c (__old_pthread_cond_init):
8887         Renamed to...
8888         (__pthread_cond_init_2_0): ... this.
8889         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8890         Renamed to...
8891         (__pthread_cond_signal_2_0): ... this.
8892         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8893         Renamed to...
8894         (__pthread_cond_wait_2_0): ... this.
8895         * pthread_cond_destroy.c: Include shlib-compat.h.
8896         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8897         * pthread_cond_init.c: Include shlib-compat.h.
8898         (pthread_cond_init): Change strong_alias into versioned_symbol.
8899         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8900         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8901         fields.
8902         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8903         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8904         __pthread_cond_wait_2_0): New prototypes.
8905         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8906         __old_pthread_cond_init, __old_pthread_cond_signal,
8907         __old_pthread_cond_wait): Removed.
8908         * init.c: Include shlib-compat.h.
8909         (pthread_functions): Guard ptr___pthread_attr_init_2_0
8910         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8911         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8912         ptr___pthread_cond_*_2_0 fields.
8913         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8914         pthread_cond_*@GLIBC_2.0 compatibility symbols.
8916         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8917         LIBC_SIGACTION was not yet defined.
8918         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8919         [!defined LIBC_SIGACTION] (__sigaction): New function and
8920         libc_hidden_weak.
8921         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8922         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8924 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
8926         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8928 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
8930         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8931         New, larger type definition.
8932         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8933         implementation.
8934         * Versions [libpthread]: Add definitions for new pthread_cond_*
8935         interfaces for version GLIBC_2.3.2.
8936         * pthread_cond_init.c: Update initialization for new type definition.
8937         * Makefile (libpthread-routines): Remove pthread_cond_wait,
8938         pthread_cond_timedwait, pthread_cond_signal, and
8939         pthread_cond_broadcast.  Add old_pthread_cond_init,
8940         old_pthread_cond_destroy, old_pthread_cond_wait,
8941         old_pthread_cond_timedwait, old_pthread_cond_signal, and
8942         old_pthread_cond_broadcast.
8943         * old_pthread_cond_broadcast.c: New file.
8944         * old_pthread_cond_destroy.c: New file.
8945         * old_pthread_cond_init.c: New file.
8946         * old_pthread_cond_signal.c: New file.
8947         * old_pthread_cond_timedwait.c: New file.
8948         * old_pthread_cond_wait.c: New file.
8949         * pthreadP.h: Add prototypes for the compatibility interfaces.
8951         * pthread_cond_destroy.c: Don't include <errno.h>.
8953 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
8955         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8956         unnecessary zero offset when addressing MUTEX.
8958 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8960         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8961         __register_atfork.
8962         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8963         for __register_atfork.
8965 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8967         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8968         instead of ASSEMBLER test macro.
8970         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8971         __libc_current_sigrtmax): Add libc_hidden_def.
8973         * sysdeps/pthread/list.h: Remove assert.h include.
8975 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
8977         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8978         __pthread_initialize_minimal_internal not
8979         __pthread_initialize_minimal.
8981 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
8983         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8984         __pthread_initialize_minimal as hidden.
8986         * init.c (__pthread_initialize_minimal_internal): Don't mark as
8987         constructor.
8989 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
8991         * Makefile ($(inst_libdir)/libpthread.so): Depend on
8992         $(common-objpfx)format.lds, include that into the output script.
8993         Fix comment.
8994         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8996 2002-12-28  Andreas Jaeger  <aj@suse.de>
8998         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8999         nsec resolution changes.
9000         (xstat64_conv): Likewise.
9001         (xstat32_conv): Likewise.
9002         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9003         struct kernel_stat.
9004         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9005         structs stat and stat64.
9006         * time/time.h (__timespec_defined): Define for __USE_MISC.
9007         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9009 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9011         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9012         argument.
9013         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9014         (pthread_exit): Use strong_alias to avoid warnings.
9015         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9016         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9017         ptr___pthread_attr_init_2_*.
9018         * init.c (pthread_functions): Adjust.
9020 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9022         * forward.c: Make all functions available by default again.  It
9023         caused too much trouble.
9025         * pt-siglongjmp.c: Removed.
9027 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9029         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9030         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9031         * sysdeps/i386/Makefile: New file.
9032         * sysdeps/i386/tcb-offsets.sym: New file.
9033         * sysdeps/pthread/tcb-offsets.h: New file.
9034         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9035         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9037         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9038         __register_atfork...
9039         (GLIBC_2.3.2): ...here.
9041 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9043         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9044         pthread_attr_setstackaddr with __attribute_deprecated__.
9046 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9048         * pt-system.c (system): Remove cancellation handling.
9049         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9050         cancellation routines.
9052 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9054         * descr.h: Include <dl-sysdep.h>.
9055         (struct pthread): Move header.data.list to the back of the struct.
9056         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9057         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9058         (SYSINFO_OFFSEET): Likewise.
9060 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9062         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9063         Define.
9064         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9065         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9066         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9067         (USE_DL_SYSINFO): Undef.
9069 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9071         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9072         $(common-objpfx)libc.so.
9073         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9074         it is bigger than pipe buffer size even on arches with bigger
9075         page size.
9076         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9078 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9080         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9081         correct errno access for case that USE___THREAD is not defined.
9083 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9085         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9086         Patch by Marijn Ros <marijn@mad.scientist.com>.
9088 2002-12-22  Roland McGrath  <roland@redhat.com>
9090         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9092 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9094         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9096 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9098         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9099         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9100         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9102         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9103         of int $0x80.
9104         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9105         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9106         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9107         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9108         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9109         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9110         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9111         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9113         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9114         sysenter.
9115         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9117         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9119         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9120         in new TCB.
9121         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9122         that sysinfo is properly initialized.
9123         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9124         to 1 only for ld.so.
9126         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9127         RTLD_CORRECT_DYNAMIC_WEAK.
9129 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9131         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9132         Use return 0 as 6th argument to FORWARD4.
9133         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9135 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9137         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9138         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9139         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9140         (INIT_SYSINFO): New #define.
9141         (TLS_TP_INIT): Use INIT_SYSINFO.
9142         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9143         At test to make sure SYSINFO_OFFSET value is correct.
9144         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9146 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9148         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9149         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9150         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9151         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9152         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9153         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9154         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9156 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9158         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9159         macro instead of using int $0x80 directly.
9161         * sysdeps/pthread/bits/stdio-lock.h: New file.
9162         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9163         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9164         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9165         * Makefile (routines): Add libc-lowlevelmutex.
9167         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9168         __i686.get_pc_thunk.dx.
9170 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9172         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9173         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9174         ($(objpfx)tst-cancel-wrappers.out): New rule.
9175         * tst-cancel-wrappers.sh: New test.
9176         * tst-locale1.c: Include signal.h.
9177         (uselocale): Test static linking of __libc_current_sigrt*.
9179 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9181         * Makefile (tests): Add tst-cancel6.
9182         * tst-cancel6.c: New file
9184 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9186         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9187         Define meaningfully for assembler as well.
9188         * pthreadP.h (struct pthread_functions): Remove
9189         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9190         and ptr_pthread_attr_init_2_1 fields.
9191         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9192         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9193         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9194         (FORWARD3): Define using FORWARD4.
9195         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9196         versions.
9197         * pt-system.c: Remove duplicate stdlib.h include.
9199 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9201         * sem_init.c: Define sem_init@GLIBC_2.0.
9202         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9203         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9205         * flockfile.c: Moved to...
9206         * sysdeps/pthread/flockfile.c: ...here.  New file.
9207         * funlockfile.c: Moved to...
9208         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9209         * ftrylockfile.c: Moved to...
9210         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9212 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9214         * libc-cancellation.c: Guard both function with
9215         #if !defined NOT_IN_libc.
9216         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9217         automatically provided pthread wrappers.
9218         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9219         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9220         nor in libpthread.
9221         * pt-open.c: Removed.
9222         * pt-fcntl.c: Removed.
9223         * pt-fsync.c: Removed.
9224         * pt-lseek.c: Removed.
9225         * pt-msgrcv.c: Removed.
9226         * pt-msgsnd.c: Removed.
9227         * pt-msync.c: Removed.
9228         * pt-nanosleep.c: Removed.
9229         * pt-open64.c: Removed.
9230         * pt-pause.c: Removed.
9231         * pt-pread.c: Removed.
9232         * pt-pread64.c: Removed.
9233         * pt-pwrite.c: Removed.
9234         * pt-pwrite64.c: Removed.
9235         * pt-read.c: Removed.
9236         * pt-recv.c: Removed.
9237         * pt-recvfrom.c: Removed.
9238         * pt-recvmsg.c: Removed.
9239         * pt-send.c: Removed.
9240         * pt-sendto.c: Removed.
9241         * pt-sigtimedwait.c: Removed.
9242         * pt-sigwait.c: Removed.
9243         * pt-wait.c: Removed.
9244         * pt-waitpid.c: Removed.
9245         * pt-write.c: Removed.
9246         * pt-accept.c: Removed.
9247         * pt-close.c: Removed.
9248         * pt-connect.c: Removed.
9249         * pt-lseek64.c: Removed.
9250         * pt-sendmsg.c: Removed.
9251         * pt-tcdrain.c: Removed.
9253 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9255         * init.c (__pthread_initialize_minimal_internal): Renamed from
9256         __pthread_initialize_minimal.  Make old name an alias.  This
9257         converts a normal relocation into a relative relocation.
9259         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9261         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9262         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9263         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9264         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9265         pt-sigwaitinfo, pt-waitid, and pt-writev.
9266         * pt-creat.c: Removed.
9267         * pt-poll.c: Removed.
9268         * pt-pselect.c: Removed.
9269         * pt-readv.c: Removed.
9270         * pt-select.c: Removed.
9271         * pt-sigpause.c: Removed.
9272         * pt-sigsuspend.c: Removed.
9273         * pt-sigwaitinfo.c: Removed.
9274         * pt-waitid.c: Removed.
9275         * pt-writev.c: Removed.
9277         * init.c (pthread_functions): New variable.
9278         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9279         (or NULL) to __libc_pthread_init.
9280         * forward.c: Rewrite to use __libc:pthread_functions array to get
9281         function addresses.
9282         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9283         prototype.
9284         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9285         Take new parameter.  Copy content of variable pointed to by it
9286         to __libc_pthread_init.
9288         * pthreadP.h (struct pthread_functions): New type.
9289         (__libc_pthread_init): Declare.
9291         * pthread_attr_destroy.c: Add namespace protected alias.
9292         * pthread_attr_getdetachstate.c: Likewise.
9293         * pthread_attr_getinheritsched.c: Likewise.
9294         * pthread_attr_getschedparam.c: Likewise.
9295         * pthread_attr_getschedpolicy.c: Likewise.
9296         * pthread_attr_getscope.c: Likewise.
9297         * pthread_attr_setdetachstate.c: Likewise.
9298         * pthread_attr_setinheritsched.c: Likewise.
9299         * pthread_attr_setschedparam.c: Likewise.
9300         * pthread_attr_setschedpolicy.c: Likewise.
9301         * pthread_attr_setscope.c: Likewise.
9302         * pthread_cond_broadcast.c: Likewise.
9303         * pthread_cond_destroy.c: Likewise.
9304         * pthread_cond_init.c: Likewise.
9305         * pthread_cond_signal.c: Likewise.
9306         * pthread_cond_wait.c: Likewise.
9307         * pthread_condattr_destroy.c: Likewise.
9308         * pthread_condattr_init.c: Likewise.
9309         * pthread_equal.c: Likewise.
9310         * pthread_exit.c: Likewise.
9311         * pthread_getschedparam.c: Likewise.
9312         * pthread_self.c: Likewise.
9313         * pthread_setcancelstate.c: Likewise.
9314         * pthread_setschedparam.c: Likewise.
9315         * pthread_mutex_destroy.c: Likewise.
9316         * pthread_mutex_init.c: Likewise.
9317         * pthreadP.h: Add prototypes for the aliases.
9319         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9320         multiple_threads member in correct TCB to 1.
9322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9323         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9324         member of thread decriptor, otherwise return unconditionally 1.
9326 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9328         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9329         regular Linux version.  Remove file.
9330         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9331         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9332         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9333         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9334         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9335         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9336         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9337         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9338         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9339         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9340         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9341         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9342         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9343         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9344         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9345         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9346         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9347         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9348         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9349         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9350         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9351         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9352         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9353         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9354         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9355         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9356         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9357         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9358         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9359         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9361 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9363         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9364         * sysdeps/unix/sysv/linux/open.c: Removed.
9365         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9366         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9367         * sysdeps/unix/sysv/linux/msync.c: Removed.
9368         * sysdeps/unix/sysv/linux/read.c: Removed.
9369         * sysdeps/unix/sysv/linux/close.c: Removed.
9370         * sysdeps/unix/sysv/linux/creat.c: Removed.
9371         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9372         * sysdeps/unix/sysv/linux/pause.c: Removed.
9373         * sysdeps/unix/sysv/linux/select.c: Removed.
9374         * sysdeps/unix/sysv/linux/write.c: Removed.
9376 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9378         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9379         element in TCB to see whether locking is needed.
9381         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9382         MULTIPLE_THREADS_OFFSET value is correct.
9384         * sysdeps/unix/sysv/linux/close.c: New file.
9385         * sysdeps/unix/sysv/linux/connect.S: New file.
9386         * sysdeps/unix/sysv/linux/creat.c: New file.
9387         * sysdeps/unix/sysv/linux/fsync.c: New file.
9388         * sysdeps/unix/sysv/linux/llseek.c: New file.
9389         * sysdeps/unix/sysv/linux/lseek.c: New file.
9390         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9391         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9392         * sysdeps/unix/sysv/linux/msync.c: New file.
9393         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9394         * sysdeps/unix/sysv/linux/open.c: New file.
9395         * sysdeps/unix/sysv/linux/open64.c: New file.
9396         * sysdeps/unix/sysv/linux/pause.c: New file.
9397         * sysdeps/unix/sysv/linux/poll.c: New file.
9398         * sysdeps/unix/sysv/linux/pread.c: New file.
9399         * sysdeps/unix/sysv/linux/pread64.c: New file.
9400         * sysdeps/unix/sysv/linux/pselect.c: New file.
9401         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9402         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9403         * sysdeps/unix/sysv/linux/readv.c: New file.
9404         * sysdeps/unix/sysv/linux/recv.S: New file.
9405         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9406         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9407         * sysdeps/unix/sysv/linux/select.c: New file.
9408         * sysdeps/unix/sysv/linux/send.S: New file.
9409         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9410         * sysdeps/unix/sysv/linux/sendto.S: New file.
9411         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9412         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9413         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9414         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9415         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9416         * sysdeps/unix/sysv/linux/system.c: New file.
9417         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9418         * sysdeps/unix/sysv/linux/wait.c: New file.
9419         * sysdeps/unix/sysv/linux/waitid.c: New file.
9420         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9421         * sysdeps/unix/sysv/linux/writev.c: New file.
9422         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9424         * pt-readv.c: Fix comment.
9426 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9428         * tst-cleanup1.c: Include stdlib.h.
9430         * tst-cancel5.c: New test.
9431         * Makefile (tests): Add tst-cancel5.
9432         (tst-cancel5): Link against libc.so libpthread.so in that order.
9434 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9436         * forward.c (test_loaded): Prevent recursive calls.
9438         * Makefile (routines): Add libc-cancellation.
9439         * libc-cancellation.c: New file.
9440         * descr.h (struct pthread): Add multiple_threads field.
9441         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9442         new thread descriptor to 1.
9443         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9444         Initialize multiple_thread field after successful thread creation.
9445         * cancellation.c (__do_cancel): Move to pthreadP.h.
9446         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9447         (__pthread_disable_asynccancel): Add internal_function attribute.
9448         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9449         * pthread_setcancelstate.c: Likewise.
9450         * pthread_setcanceltype.c: Likewise.
9451         * pthread_exit.c: Likewise.
9452         * pthreadP.h (CANCELLATION_P): Likewise.
9453         (__do_cancel): Define as static inline.
9454         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9455         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9456         declarations.
9457         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9458         fields.  Define MULTIPLE_THREADS_OFFSET.
9459         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9460         declaration.
9461         * sysdeps/unix/sysv/linux/accept.S: New file.
9462         * sysdeps/unix/sysv/linux/read.c: New file.
9463         * sysdeps/unix/sysv/linux/write.c: New file.
9464         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9465         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9466         initialization of __libc_locking_needed.
9467         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9468         __libc_locking_needed, use multiple_threads field in TCB.
9469         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9471 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9473         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9474         version.
9475         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9477         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9478         access to __libc_locking_needed for PIC.
9480 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9482         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9483         declare for libc.so.
9484         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9485         expression.
9486         (__libc_lock_lock): Put into statement expression.
9487         (__libc_lock_unlock): Remove trailing semicolon.
9488         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9490 2002-12-12  Roland McGrath  <roland@redhat.com>
9492         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9493         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9495 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9497         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9498         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9499         Initialize __libc_locking_needed.
9500         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9501         instead of __register_pthread_fork_handler.
9502         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9503         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9504         fork-gen with libc_pthread_init.
9505         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9506         of __register_pthread_fork_handler.
9507         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9508         of __register_pthread_fork_handler.
9509         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9510         __libc_locking_needed to determine whether lock prefix can be avoided.
9511         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9513 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9515         * Makefile (tests): Add tst-cleanup1.
9516         * tst-cleanup1.c: New file.
9517         * cancellation.c (__cleanup_thread): Removed.
9518         (__do_cancel): Remove call to __cleanup_thread.
9519         * pthreadP.h: Remove __cleanup_thread prorotype.
9521         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9522         Remember function and argument even if cancellation handler
9523         function is not available.
9524         (__libc_cleanup_region_end): Execute registered function directly if
9525         pthread functions are not available.
9526         (__libc_cleanup_end): Likewise.
9528         * init.c (__pthread_initialize_minimal): Fix initialization in
9529         static lib by preventing gcc from being too clever.
9531 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9533         * init.c (__pthread_initialize_minimal): Remove unneccesary
9534         sigaddset call.
9536         * Makefile (tests): We can run tst-locale2 now.
9538 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9540         * Versions: Remove duplicated sigwait entry.
9542 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9544         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9545         inside libpthread.
9547         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9549         * pthreadP.h: Declare __pthread_enable_asynccancel and
9550         __pthread_disable_asynccancel.
9551         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9552         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9553         * cancellation.c (__pthread_enable_asynccancel): New function.
9554         (__pthread_disable_asynccancel): New function.
9555         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9556         * pt-close.c: Likewise.
9557         * pt-connect.c: Likewise.
9558         * pt-creat.c: Likewise.
9559         * pt-fcntl.c: Likewise.
9560         * pt-fsync.c: Likewise.
9561         * pt-lseek.c: Likewise.
9562         * pt-lseek64.c: Likewise.
9563         * pt-msgrcv.c: Likewise.
9564         * pt-msgsnd.c: Likewise.
9565         * pt-msync.c: Likewise.
9566         * pt-nanosleep.c: Likewise.
9567         * pt-open.c: Likewise.
9568         * pt-open64.c: Likewise.
9569         * pt-pause.c: Likewise.
9570         * pt-poll.c: Likewise.
9571         * pt-pread.c: Likewise.
9572         * pt-pread64.c: Likewise.
9573         * pt-pselect.c: Likewise.
9574         * pt-pwrite.c: Likewise.
9575         * pt-pwrite64.c: Likewise.
9576         * pt-read.c: Likewise.
9577         * pt-readv.c: Likewise.
9578         * pt-recv.c: Likewise.
9579         * pt-recvfrom.c: Likewise.
9580         * pt-recvmsg.c: Likewise.
9581         * pt-select.c: Likewise.
9582         * pt-send.c: Likewise.
9583         * pt-sendmsg.c: Likewise.
9584         * pt-sendto.c: Likewise.
9585         * pt-sigpause.c: Likewise.
9586         * pt-sigsuspend.c: Likewise.
9587         * pt-sigtimedwait.c: Likewise.
9588         * pt-sigwait.c: Likewise.
9589         * pt-sigwaitinfo.c: Likewise.
9590         * pt-system.c: Likewise.
9591         * pt-tcdrain.c: Likewise.
9592         * pt-wait.c: Likewise.
9593         * pt-waitid.c: Likewise.
9594         * pt-waitpid.c: Likewise.
9595         * pt-write.c: Likewise.
9596         * pt-writev.c: Likewise.
9597         * pthread_join.c: Likewise.
9598         * pthread_timedjoin.c: Likewise.
9600         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9601         (__xpg_sigpause): New function.
9602         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9604 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9606         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9608         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9609         _GI_pthread_cleanup_pop to pthreadP.h.
9611         * ftrylockfile.c: Use _IO_lock_trylock instead of
9612         pthread_mutex_trylock.
9614         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9615         (CANCEL_RESET): Likewise.
9616         (__pthread_setcanceltype_): Declare.
9617         (__pthread_mutex_lock_internal): Declare.
9618         (__pthread_mutex_unlock_internal): Declare.
9619         (__pthread_once_internal): Declare.
9620         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9621         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9623         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9624         and pthread_mutex_unlock.
9625         * pthread_cond_wait.c: Likewise.
9626         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9627         * pthread_mutex_unlock.c: Likewise.
9629         * pthread_setcanceltype.c: Add additional alias
9630         __pthread_setcanceltype.
9632         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9633         * sem_open.c (sem_open): Likewise.
9634         Use __libc_open, __libc_write, and __libc_close instead of
9635         open, write, and close respectively.
9637         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9638         Rewrite as statement expression since it must return a value.
9640         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9641         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9642         __pthread_kill.
9644         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9645         alias __pthread_once_internal.
9647         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9649 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9651         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9652         * tst-stdio1.c: New file.
9653         * tst-stdio2.c: New file.
9655         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9657         * Makefile (tests): Comment out tst-locale2 for now.
9658         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9660         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9661         -D_IO_MTSAFE_IO.
9662         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9663         Use _IO_lock_init instead of explicit assignment.
9665         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9666         Define __libc_lock_* and __libc_lock_recursive macros with
9667         lowlevellock macros, not pthread mutexes.
9669         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9670         of pthread_mutex_lock.
9671         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9672         instead of pthread_mutex_unlock.
9674 2002-12-06  Roland McGrath  <roland@redhat.com>
9676         * allocatestack.c (__stack_user): Use uninitialized defn.
9677         * init.c (__pthread_initialize_minimal): Initialize it here.
9679 2002-12-05  Roland McGrath  <roland@redhat.com>
9681         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9682         string.
9683         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9685         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9686         missing & here too.
9688 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9690         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9691         lowlevellock.
9692         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9693         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9694         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9695         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9696         for __libc_lock_* macros.
9697         * Makefile (routines): Add libc-lowlevellock.
9699 2002-10-09  Roland McGrath  <roland@redhat.com>
9701         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9702         Under [__PIC__], call the function via the pointer fetched for
9703         comparison rather than a call by name that uses the PLT.
9704         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9705         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9706         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9707         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9708         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9710 2002-12-04  Roland McGrath  <roland@redhat.com>
9712         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9714         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9715         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9717         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9719 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9721         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9722         a completely opaque, non-integer type.
9723         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9725 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9727         * sysdeps/i386/tls.h: Include stdlib.h.
9728         * sysdeps/x86_64/tls.h: Likewise.
9730 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9732         * Makefile (tests): Add tst-locale2.
9733         (tests-static): Likewise.
9734         * tst-locale2.c: New file.
9736         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9737         volatile and add memory clobbers to lock operations.
9739 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9741         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9742         * sysdeps/i386/i486/bits/atomic.h: New file.
9743         * sysdeps/i386/i586/bits/atomic.h: New file.
9744         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9745         include i486 version.
9746         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9747         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9748         Patch by Marijn Ros <marijn@mad.scientist.com>.
9750         * allocatestack.c (get_cached_stack): Don't crash if we first
9751         found a stack with a larger size then needed.
9752         Reported by Hui Huang <hui.huang@sun.com>.
9754         * Makefile (tests): Add tst-sysconf.
9755         * tst-sysconf.c: New file.
9757         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9758         PTHREAD_THREADS_MAX.
9760 2002-12-02  Roland McGrath  <roland@redhat.com>
9762         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9763         Declare using hidden_proto instead of attribute_hidden, so there are
9764         non-.hidden static symbols for gdb to find.
9765         (__pthread_keys): Likewise.
9766         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9767         * allocatestack.c (__stack_user): Likewise.
9768         * pthread_create.c (__pthread_keys): Likewise.
9769         (__nptl_threads_events, __nptl_last_event): Make these static instead
9770         of hidden.
9771         * pthread_key_create.c (__pthread_pthread_keys_max,
9772         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9774 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9776         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9777         statically.
9778         * tst-locale1.c: New file.
9780         * pthread_cond_timedwait.c: Include <stdlib.h>.
9782         * Makefile (tests): Add tst-fork2 and tst-fork3.
9783         * tst-fork2.c: New file.
9784         * tst-fork3.c: New file.
9786 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9788         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9790         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9791         require it to 200112L.
9793         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9794         instruction only if HAVE_CMOV is defined.
9795         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9797         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9799         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9801         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9803         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9805 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9807         * sysdeps/x86_64/bits/atomic.h: New file.
9809         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9810         16-bit operations.
9812         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9813         possible since gettid cannot fail.
9815         * sysdeps/x86_64/pthreaddef.h: New file.
9817         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9819         * sysdeps/x86_64/pthread_spin_init.c: New file.
9820         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9821         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9822         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9824         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9825         Add missing lock prefix.  Minute optimization.
9827         * tst-spin2.c (main): Also check successful trylock call.
9829         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9830         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
9832         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9833         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
9835         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
9836         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9837         value in case of an error.  Add support for INTERNAL_SYSCALL.
9839         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9840         value in case of an error.
9842         * sysdeps/x86_64/tls.h: New file.
9844 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9846         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
9847         takes the array member name and the index as parameters.
9848         (THREAD_SETMEM_NC): Likewise.
9849         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9850         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9851         interfaces.
9853         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9854         to decide which code to use.
9855         (THREAD_SETMEM_NC): Likewise.
9857         * allocatestack.c (queue_stack): Don't remove stack from list here.
9858         Do it in the caller.  Correct condition to prematurely terminate
9859         loop to free stacks.
9860         (__deallocate_stack): Remove stack from list here.
9862 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
9864         * Makefile (tests): Add tst-stack1.
9865         * tst-stack1.c: New file.
9867         * allocatestack.c (allocate_stack): Initialize the TCB on a user
9868         provided stack.
9870         * pthread_attr_getstack.c: Return bottom of the thread area.
9872 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
9874         * Makefile (libpthread-routines): Add pt-allocrtsig and
9875         pthread_kill_other_threads.
9876         * pt-allocrtsig.c: New file.
9877         * pthread_kill_other_threads.c: New file.
9878         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9879         all three functions.
9880         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9881         allocrtsig.
9882         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9883         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9884         and __libc_allocate_rtsig_private.
9885         * Versions (libpthread): Export pthread_kill_other_threads_np,
9886         __libc_current_sigrtmin, and __libc_current_sigrtmax.
9888 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
9890         * allocatestack.c (allocate_stack): stackaddr in attribute points to
9891         the end of the stack.  Adjust computations.
9892         When mprotect call fails dequeue stack and free it.
9893         * pthread_attr_setstack.c: Store top of the stack in stackaddr
9894         attribute.
9895         * pthread_getattr_np.c: Likewise.
9897         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9898         surprises.
9900 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
9902         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9903         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9905 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
9907         * pthread_getspecific.c: Optimize access to first 2nd-level array.
9908         * pthread_setspecific.c: Likewise.
9910 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
9912         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9913         definitions.  Get them from the official place.
9914         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9916         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9917         Use new CLONE_ flags in clone() calls.
9919         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9920         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9922         * Versions: Add pthread_* functions for libc.
9923         * forward.c: New file.
9925         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9926         errno-loc.
9927         * herrno.c: New file.
9928         * res.c: New file.
9930         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9931         sem_trywait, and sem_timedwait.  Add herrno and res.
9932         * sem_init.c: Don't initialize lock and waiters members.
9933         * sem_open.c: Likewise.
9934         * sem_post.c: Removed.
9935         * sem_wait.c: Removed.
9936         * sem_trywait.c: Removed.
9937         * sem_timedwait.c: Removed.
9938         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9939         Includes full implementations of sem_post, sem_wait, sem_trywait,
9940         and sem_timedwait.
9941         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9942         for new implementation.
9943         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9944         and waiters fields.
9946         * tst-sem3.c: Improve error message.
9947         * tst-signal3.c: Likewise.
9949         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9950         to tell the kernel about the termination futex and to initialize tid
9951         member.  Don't initialize main_thread.
9952         * descr.h (struct pthread): Remove main_thread member.
9953         * cancelllation.c (__do_cancel): Remove code handling main thread.
9954         The main thread is not special anymore.
9956         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
9957         size of the stacks to stack_cache_actsize.
9959         * pt-readv.c: Add missing "defined".
9960         * pt-sigwait.c: Likewise.
9961         * pt-writev.c: Likewise.
9963 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
9965         * Versions: Export __connect from libpthread.
9966         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9968         * Makefile (libpthread-routines): Add pt-raise.
9969         * sysdeps/unix/sysv/linux/raise.c: New file.
9970         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9971         * sysdeps/generic/pt-raise.c: New file.
9973         * pthread_cond_init.c: Initialize all data elements of the condvar
9974         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
9976         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9977         * pthread_create.c: Likewise.
9979         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9980         * tst-key1.c: New file.
9981         * tst-key2.c: New file.
9982         * tst-key3.c: New file.
9984         * Versions: Export pthread_detach for version GLIBC_2.0.
9985         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9987 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
9989         * pthread_key_create.c: Terminate search after an unused key was found.
9990         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9992         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9993         Patch by Luca Barbieri <ldb@ldb.ods.org>.
9995 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
9997         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9998         dynamic lookup for errno in PIC.
10000         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10001         release the stack lock as soon as possible.
10002         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10003         the static TLS block.
10004         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10006         * cancellation.c: Renamed from cancelation.c.
10007         * Makefile: Adjust accordingly.
10008         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10009         * cleanup_defer.c: Use CANCELLATION_P.
10010         * pthread_testcancel.c: Likewise.
10011         * descr.h: Fix spelling in comments.
10012         * init.c: Likewise.
10013         * pthread_getattr_np.c: Likewise.
10014         * pthread_getschedparam.c: Likewise.
10015         * pthread_setschedparam.c: Likewise.
10016         * Versions: Likewise.
10018         * pt-pselect.c: New file.
10019         * Makefile (libpthread-routines): Add pt-pselect.
10020         * Versions: Add pselect.
10022         * tst-cancel4.c: New file.
10023         * Makefile (tests): Add tst-cancel4.
10025 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10027         * pthread_mutex_lock.c: Always record lock ownership.
10028         * pthread_mutex_timedlock.c: Likewise.
10029         * pthread_mutex_trylock.c: Likewise.
10031         * pt-readv.c: New file.
10032         * pt-writev.c: New file.
10033         * pt-creat.c: New file.
10034         * pt-msgrcv.c: New file.
10035         * pt-msgsnd.c: New file.
10036         * pt-poll.c: New file.
10037         * pt-select.c: New file.
10038         * pt-sigpause.c: New file.
10039         * pt-sigsuspend.c: New file.
10040         * pt-sigwait.c: New file.
10041         * pt-sigwaitinfo.c: New file.
10042         * pt-waitid.c: New file.
10043         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10044         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10045         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10046         * Versions: Add all the new functions.
10048         * tst-exit1.c: New file.
10049         * Makefile (tests): Add tst-exit1.
10051         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10053 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10055         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10057         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10058         call.  pthread_join is an official cancellation point.
10059         * pthread_timedjoin.c: Likewise.
10061         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10062         and the condvar's mutex are retrieved.
10063         * pthread_cond_timedwait.c: Likewise.
10064         Reported by dice@saros.East.Sun.COM.
10066 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10068         * pthreadP.h: Cut out all type definitions and move them...
10069         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10070         * pthreadP.h: Include <internaltypes.h>.
10072         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10073         performance tweaks.
10075         * sem_trywait.c: Shuffle #includes around to get right order.
10076         * sem_timedwait.c: Likewise.
10077         * sem_post.c: Likewise.
10078         * sem_wait.c: Likewise.
10080         * nptl 0.3 released.
10082         * Makefile (tests): Add tst-signal3.
10083         * tst-signal3.c: New file.
10085 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10087         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10088         the asms modify the sem object.
10089         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10091         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10092         the actual members.
10093         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10094         * semaphoreP.h: Include pthreadP.h.
10095         * sem_getvalue.c: Adjust to sem_t change.
10096         * sem_init.c: Likewise.
10097         * sem_open.c: Likewise.
10098         * sem_post.c: Likewise.
10099         * sem_timedwait.c: Likewise.
10100         * sem_trywait.c: Likewise.
10101         * sem_wait.c: Likewise.
10103 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10105         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10106         * tst-basic2.c: New file.
10107         * tst-exec1.c: New file.
10108         * tst-exec2.c: New file.
10109         * tst-exec3.c: New file.
10111         * tst-fork1.c: Remove extra */.
10113         * nptl 0.2 released.  The API for IA-32 is complete.