1 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
5 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
6 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
7 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
8 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
9 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
11 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
12 kernel-features.h and tcb-offsets.h.
13 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
14 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
16 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
18 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
19 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
21 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
22 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
23 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
24 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
25 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
26 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
27 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
29 2007-08-14 Jakub Jelinek <jakub@redhat.com>
31 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
32 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
33 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
36 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
37 __lll_robust_unlock): Rewrite as macros instead of inline functions.
38 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
39 __lll_robust_unlock, __lll_wait_tid): Likewise.
41 2007-08-13 Jakub Jelinek <jakub@redhat.com>
43 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
45 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
46 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
47 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
48 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
49 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
50 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
51 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
52 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
54 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
55 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
56 process private. Switch DW_CFA_advance_loc1 and some
57 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
58 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
59 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
60 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
61 process private. Switch DW_CFA_advance_loc{1,2} and some
62 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
63 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
64 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
65 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
67 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
68 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
69 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
71 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
72 (__pthread_cond_broadcast): Compare %r8 instead of
73 dep_mutex-cond_*(%rdi) with $-1.
74 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
75 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
78 2007-08-13 Ulrich Drepper <drepper@redhat.com>
80 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
82 2007-08-13 Jakub Jelinek <jakub@redhat.com>
84 * allocatestack.c: Include kernel-features.h.
85 * pthread_create.c: Likewise.
86 * pthread_mutex_init.c: Likewise.
88 * pthread_cond_timedwait.c: Likewise.
89 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
90 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
91 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
92 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
93 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
94 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
95 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
97 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
99 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
100 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
101 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
102 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
104 2007-08-12 Jakub Jelinek <jakub@redhat.com>
106 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
107 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
108 byte elements. One of them is the new __shared element.
109 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
110 adjust names of other padding elements.
111 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
112 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
113 byte elements. One of them is the new __shared element.
114 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
115 adjust names of other padding elements.
116 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
117 Renamed __pad1 element to __shared, adjust names of other padding
119 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
120 (pthread_rwlock_t): Likewise.
121 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
124 2007-08-09 Anton Blanchard <anton@samba.org>
126 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
128 2007-08-12 Ulrich Drepper <drepper@redhat.com>
130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
134 2007-08-11 Ulrich Drepper <drepper@redhat.com>
136 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
137 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
138 dealing with robust mutexes.
139 * pthread_mutex_timedlock.c: Likewise.
140 * pthread_mutex_trylock.c: Likewise.
141 * pthread_mutex_unlock.c: Likewise.
142 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
144 2007-08-06 Jakub Jelinek <jakub@redhat.com>
146 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
147 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
148 (PTHREAD_MUTEX_PSHARED): Define.
149 * pthread_mutex_init.c (__pthread_mutex_init): Set
150 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
152 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
153 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
154 as second argument to lll_lock.
155 (LLL_MUTEX_TRYLOCK): Take mutex as argument
156 instead of its __data.__lock field.
157 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
158 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
160 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
161 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
162 instead of mutex->__data.__kind directly, pass
163 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
164 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
165 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
166 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
167 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
168 to lll_timedlock, lll_robust_timedlock, lll_unlock and
169 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
170 of mutex->__data.__kind directly.
171 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
172 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
173 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
174 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
175 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
176 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
178 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
179 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
180 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
182 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
183 Take mutex as argument instead of its __data.__lock field, pass
184 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
185 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
187 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
188 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
189 to lll_robust_cond_lock.
190 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
191 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
192 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
193 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
194 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
195 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
197 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
198 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
200 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
201 pshared variable, pass it to lll_lock, lll_unlock,
202 lll_futex_timedwait and lll_futex_wake.
203 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
204 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
206 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
207 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
209 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
210 lll_futex_wake_unlock): Likewise.
211 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
213 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
214 lll_futex_wake_unlock): Likewise.
215 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
217 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
218 lll_futex_wake_unlock): Likewise.
219 (lll_futex_wake): Fix a typo.
220 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
222 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
223 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
224 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
226 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
227 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
229 (__pthread_cond_timedwait): Likewise.
230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
231 (__condvar_cleanup, __pthread_cond_wait): Likewise.
233 2007-08-05 Jakub Jelinek <jakub@redhat.com>
235 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
236 Don't use CGOTSETUP and CGOTRESTORE macros.
237 (CGOTSETUP, CGOTRESTORE): Remove.
238 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
241 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
243 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
244 definitions for private futexes.
245 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
246 kernel-features.h and lowlevellock.h. Use private futexes if
248 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
249 (__lll_mutex_lock_wait): Rename to
250 (__lll_lock_wait): ... this. Don't compile in for libc.so.
251 (__lll_mutex_timedlock_wait): Rename to ...
252 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
253 Don't compile in for libc.so.
254 (__lll_mutex_unlock_wake): Rename to ...
255 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
256 (__lll_timedwait_tid): Use __NR_gettimeofday.
257 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
258 the header from assembler. Renamed all lll_mutex_* resp.
259 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
260 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
261 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
263 (__lll_lock_wait_private): Add prototype.
264 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
265 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
266 __lll_unlock_wake): Likewise.
267 (lll_lock): Add private argument. Call __lll_lock_wait_private
268 if private is constant LLL_PRIVATE.
269 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
270 lll_timedlock, lll_robust_timedlock): Add private argument.
271 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
272 if private is constant LLL_PRIVATE.
273 (lll_robust_unlock, lll_robust_dead): Add private argument.
274 (lll_lock_t): Remove.
275 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
276 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
277 lll_cond_wake, lll_cond_broadcast): Remove.
278 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
279 kernel-features.h and lowlevellock.h.
280 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
281 (LOAD_FUTEX_WAIT): Define.
282 (__lll_robust_mutex_lock_wait): Rename to ...
283 (__lll_robust_lock_wait): ... this. Add private argument.
284 Use LOAD_FUTEX_WAIT macro.
285 (__lll_robust_mutex_timedlock_wait): Rename to ...
286 (__lll_robust_timedlock_wait): ... this. Add private argument.
287 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
288 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
290 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
291 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
292 __lll_mutex_{lock,unlock}_*.
293 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
294 lowlevellock.h and pthread-errnos.h.
295 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
296 FUTEX_CMP_REQUEUE, EINVAL): Remove.
297 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
298 __lll_mutex_{lock,unlock}_*.
299 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
300 lowlevellock.h and pthread-errnos.h.
301 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
302 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
303 __lll_mutex_{lock,unlock}_*.
304 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
306 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
307 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
308 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
309 (__condvar_tw_cleanup): Likewise.
310 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
312 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
313 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
314 __lll_mutex_{lock,unlock}_*.
315 ( __condvar_w_cleanup): Likewise.
316 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
317 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
320 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
321 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
322 __lll_mutex_{lock,unlock}_*.
323 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
325 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
326 FUTEX_PRIVATE_FLAG): Remove.
327 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
328 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
329 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
331 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
332 FUTEX_PRIVATE_FLAG): Remove.
333 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
334 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
335 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
337 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
338 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
339 __lll_mutex_{lock,unlock}_*.
340 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
342 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
343 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
344 __lll_mutex_{lock,unlock}_*.
345 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
346 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
347 (__new_sem_post): Use standard initial exec code sequences.
348 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
350 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
351 FUTEX_PRIVATE_FLAG): Remove.
352 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
354 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
355 (__new_sem_trywait): Use standard initial exec code sequences.
356 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
357 (__new_sem_wait): Use standard initial exec code sequences.
359 2007-07-31 Anton Blanchard <anton@samba.org>
361 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
362 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
365 2007-07-31 Jakub Jelinek <jakub@redhat.com>
367 * allocatestack.c (stack_cache_lock): Change type to int.
368 (get_cached_stack, allocate_stack, __deallocate_stack,
369 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
370 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
371 as second argument to lll_lock and lll_unlock macros on
373 * pthread_create.c (__find_in_stack_list): Likewise.
374 (start_thread): Similarly with pd->lock. Use lll_robust_dead
375 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
377 * descr.h (struct pthread): Change lock and setxid_futex field
379 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
380 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
381 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
382 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
384 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
385 * pthread_cond_init.c (__pthread_cond_init): Likewise.
386 * pthreadP.h (__attr_list_lock): Change type to int.
387 * pthread_attr_init.c (__attr_list_lock): Likewise.
388 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
389 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
391 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
392 also for lll_futex_{wake,wait}.
393 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
395 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
396 LLL_SHARED as second argument to lll_{,un}lock.
397 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
398 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
399 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
400 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
402 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
403 as second argument to lll_{,un}lock macros on pd->lock.
404 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
405 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
406 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
407 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
409 * sysdeps/pthread/createthread.c (do_clone, create_thread):
411 * pthread_once.c (once_lock): Change type to int.
412 (__pthread_once): Pass LLL_PRIVATE as second argument to
413 lll_{,un}lock macros on once_lock.
414 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
415 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
416 rwlock->__data.__shared as second argument to them and similarly
418 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
420 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
422 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
423 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
424 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
425 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
426 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
427 to lll_{,un}lock macros on __sem_mappings_lock.
428 * sem_open.c (check_add_mapping): Likewise.
429 (__sem_mappings_lock): Change type to int.
430 * semaphoreP.h (__sem_mappings_lock): Likewise.
431 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
432 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
433 instead of lll_*mutex_*, pass LLL_SHARED as last
435 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
436 pass LLL_SHARED as last argument.
437 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
438 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
439 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
440 pass LLL_SHARED as last argument.
441 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
442 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
443 LLL_SHARED as last argument.
444 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
445 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
447 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
448 __libc_lock_lock_recursive, __libc_lock_unlock,
449 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
450 argument to lll_{,un}lock.
451 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
452 _IO_lock_unlock): Likewise.
453 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
455 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
456 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
458 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
460 (__fork_lock): Change type to int.
461 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
462 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
463 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
465 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
466 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
467 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
469 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
470 pass it through to lll_futex_*wait, only compile in when
472 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
473 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
474 argument and pass it through to lll_futex_*wait.
475 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
476 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
477 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
478 inline functions to __lll_* resp. __lll_robust_*.
479 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
480 (lll_mutex_dead): Add private argument.
481 (__lll_lock_wait_private): New prototype.
482 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
483 __lll_robust_lock_timedwait): Add private argument to prototypes.
484 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
485 call __lll_lock_wait_private, otherwise pass private to
487 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
488 __lll_robust_timedlock): Add private argument, pass it to
489 __lll_*wait functions.
490 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
491 call __lll_unlock_wake_private, otherwise pass private to
493 (__lll_robust_unlock): Add private argument, pass it to
494 __lll_robust_unlock_wake.
495 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
496 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
497 argument, pass it through to __lll_* inline function.
498 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
499 (lll_lock_t): Remove.
500 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
501 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
502 lll_cond_wake, lll_cond_broadcast): Remove.
503 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
504 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
505 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
506 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
507 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
508 the header from assembler. Renamed all lll_mutex_* resp.
509 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
510 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
511 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
512 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
513 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
514 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
515 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
517 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
518 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
519 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
520 (lll_trylock): Likewise, use __lll_trylock_asm, pass
521 MULTIPLE_THREADS_OFFSET as another asm operand.
522 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
523 MULTIPLE_THREADS_OFFSET as last asm operand, call
524 __lll_lock_wait_private if private is constant LLL_PRIVATE,
525 otherwise pass private as another argument to __lll_lock_wait.
526 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
527 lll_timedlock, lll_robust_timedlock): Add private argument, pass
528 private as another argument to __lll_*lock_wait call.
529 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
530 MULTIPLE_THREADS_OFFSET as another asm operand, call
531 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
532 otherwise pass private as another argument to __lll_unlock_wake.
533 (lll_robust_unlock): Add private argument, pass private as another
534 argument to __lll_unlock_wake.
535 (lll_robust_dead): Add private argument, use __lll_private_flag
537 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
538 LLL_MUTEX_LOCK_INITIALIZER.
539 (lll_lock_t): Remove.
540 (LLL_LOCK_INITIALIZER_WAITERS): Define.
541 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
542 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
543 lll_cond_wake, lll_cond_broadcast): Remove.
544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
545 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
546 2007-05-2{3,9} changes.
547 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
548 kernel-features.h and lowlevellock.h.
549 (LOAD_PRIVATE_FUTEX_WAIT): Define.
550 (LOAD_FUTEX_WAIT): Rewritten.
551 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
553 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
554 (__lll_mutex_lock_wait): Rename to ...
555 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
556 %ecx, %ecx is now private argument. Don't compile in for libc.so.
557 (__lll_mutex_timedlock_wait): Rename to ...
558 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
559 contains private argument. Don't compile in for libc.so.
560 (__lll_mutex_unlock_wake): Rename to ...
561 (__lll_unlock_wake): ... this. %ecx contains private argument.
562 Don't compile in for libc.so.
563 (__lll_timedwait_tid): Use __NR_gettimeofday.
564 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
565 kernel-features.h and lowlevellock.h.
566 (LOAD_FUTEX_WAIT): Define.
567 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
569 (__lll_robust_mutex_lock_wait): Rename to ...
570 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
571 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
573 (__lll_robust_mutex_timedlock_wait): Rename to ...
574 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
575 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
576 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
578 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
579 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
580 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
581 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
582 to __lll_lock_wait in %edx.
583 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
584 Include lowlevellock.h and pthread-errnos.h.
585 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
586 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
587 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
588 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
589 pass LLL_SHARED in %ecx to both __lll_lock_wait and
591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
592 Include lowlevellock.h and pthread-errnos.h.
593 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
594 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
595 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
596 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
597 pass LLL_SHARED in %ecx to both __lll_lock_wait and
599 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
600 Include lowlevellock.h.
601 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
603 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
604 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
605 pass LLL_SHARED in %ecx to both __lll_lock_wait and
606 __lll_unlock_wake. Use __NR_gettimeofday.
607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
608 Include lowlevellock.h.
609 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
610 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
611 to __lll_*, pass cond_lock address in %edx rather than %ecx to
612 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
613 and __lll_unlock_wake.
614 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
615 Include lowlevellock.h.
616 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
617 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
618 MUTEX(%ebx) address in %edx rather than %ecx to
619 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
620 and __lll_unlock_wake. Move return value from %ecx to %edx
622 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
623 Include lowlevellock.h.
624 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
626 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
627 MUTEX(%ebp) address in %edx rather than %ecx to
628 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
629 and __lll_unlock_wake. Move return value from %ecx to %edx
630 register. Use __NR_gettimeofday.
631 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
632 Include lowlevellock.h.
633 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
635 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
636 MUTEX(%ebp) address in %edx rather than %ecx to
637 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
638 and __lll_unlock_wake. Move return value from %ecx to %edx
639 register. Use __NR_gettimeofday.
640 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
641 Include lowlevellock.h.
642 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
643 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
644 MUTEX(%edi) address in %edx rather than %ecx to
645 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
646 and __lll_unlock_wake.
647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
648 Include lowlevellock.h.
649 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
650 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
651 MUTEX(%ebx) address in %edx rather than %ecx to
652 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
653 and __lll_unlock_wake. Move return value from %ecx to %edx
655 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
657 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
659 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
660 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
661 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
663 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
664 (sem_timedwait): Use __NR_gettimeofday.
665 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
667 (LOCK): Don't define.
668 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
670 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
671 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
673 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
674 2007-05-2{3,9} changes.
675 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
676 kernel-features.h and lowlevellock.h.
677 (LOAD_PRIVATE_FUTEX_WAIT): Define.
678 (LOAD_FUTEX_WAIT): Rewritten.
679 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
680 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
681 (__lll_mutex_lock_wait): Rename to ...
682 (__lll_lock_wait): ... this. %esi is now private argument.
683 Don't compile in for libc.so.
684 (__lll_mutex_timedlock_wait): Rename to ...
685 (__lll_timedlock_wait): ... this. %esi contains private argument.
686 Don't compile in for libc.so.
687 (__lll_mutex_unlock_wake): Rename to ...
688 (__lll_unlock_wake): ... this. %esi contains private argument.
689 Don't compile in for libc.so.
690 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
691 kernel-features.h and lowlevellock.h.
692 (LOAD_FUTEX_WAIT): Define.
693 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
694 (__lll_robust_mutex_lock_wait): Rename to ...
695 (__lll_robust_lock_wait): ... this. %esi argument contains private.
696 Use LOAD_FUTEX_WAIT macro.
697 (__lll_robust_mutex_timedlock_wait): Rename to ...
698 (__lll_robust_timedlock_wait): ... this. %esi argument contains
699 private, use LOAD_FUTEX_WAIT macro.
700 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
702 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
703 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
704 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
705 __lll_lock_wait and __lll_unlock_wake.
706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
707 Include lowlevellock.h and pthread-errnos.h.
708 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
709 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
710 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
711 pass LLL_SHARED in %esi to both __lll_lock_wait and
713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
714 Include lowlevellock.h and pthread-errnos.h.
715 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
716 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
717 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
718 pass LLL_SHARED in %esi to both __lll_lock_wait and
720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
721 Include lowlevellock.h.
722 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
723 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
724 pass LLL_SHARED in %esi to both __lll_lock_wait and
726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
727 Include lowlevellock.h.
728 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
729 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
730 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
731 and __lll_unlock_wake.
732 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
733 Include lowlevellock.h.
734 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
736 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
737 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
738 and __lll_unlock_wake.
739 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
740 Include lowlevellock.h.
741 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
743 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
744 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
745 and __lll_unlock_wake.
746 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
747 Include lowlevellock.h.
748 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
750 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
751 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
752 and __lll_unlock_wake.
753 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
754 Include lowlevellock.h.
755 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
757 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
758 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
759 and __lll_unlock_wake.
760 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
761 Include lowlevellock.h.
762 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
764 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
765 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
766 and __lll_unlock_wake.
767 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
769 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
771 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
772 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
773 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
775 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
776 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
778 (LOCK): Don't define.
779 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
781 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
782 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
783 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
784 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
785 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
786 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
787 (__lll_lock_wait_private): New function.
788 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
789 it to lll_futex_*wait. Don't compile in for libc.so.
790 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
792 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
793 (struct sparc_pthread_barrier): Remove.
794 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
795 struct sparc_pthread_barrier. Pass
796 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
797 and lll_futex_wait macros.
798 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
800 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
801 Include sparc pthread_barrier_wait.c instead of generic one.
803 2007-07-30 Jakub Jelinek <jakub@redhat.com>
805 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
807 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
808 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
810 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
811 (pthread_rwlock_timedwrlock): Likewise.
812 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
813 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
815 2007-07-31 Jakub Jelinek <jakub@redhat.com>
817 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
819 2007-07-26 Jakub Jelinek <jakub@redhat.com>
821 * tst-locale2.c (useless): Add return statement.
823 2007-07-24 Jakub Jelinek <jakub@redhat.com>
825 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
826 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
827 * pthread_create.c (start_thread): Likewise.
828 * init.c (sighandler_setxid): Likewise.
829 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
830 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
831 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
832 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
833 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
834 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
835 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
836 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
837 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
839 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
841 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
843 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
844 __rtld_notify): Likewise.
845 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
846 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
847 __pthread_once): Likewise.
848 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
849 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
850 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
851 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
852 (lll_futex_wait): Add private argument, define as wrapper around
853 lll_futex_timed_wait.
854 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
855 use __lll_private_flag macro.
856 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
857 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
858 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
859 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
860 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
861 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
862 (lll_futex_wait): Add private argument, define as wrapper around
863 lll_futex_timed_wait.
864 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
865 use __lll_private_flag macro.
866 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
867 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
868 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
870 (lll_futex_timed_wait, lll_futex_wake): Use it.
871 (lll_private_futex_wait, lll_private_futex_timed_wait,
872 lll_private_futex_wake): Removed.
873 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
874 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
875 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
876 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
877 (lll_futex_wait): Add private argument, define as wrapper around
878 lll_futex_timed_wait.
879 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
880 use __lll_private_flag macro.
881 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
882 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
884 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
885 (lll_private_futex_wait, lll_private_futex_timed_wait,
886 lll_private_futex_wake): Removed.
887 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
888 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
889 (lll_private_futex_wait, lll_private_futex_timed_wait,
890 lll_private_futex_wake): Removed.
891 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
892 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
893 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
894 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
895 (lll_futex_wait): Add private argument, define as wrapper around
896 lll_futex_timed_wait.
897 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
898 use __lll_private_flag macro.
899 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
900 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
902 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
904 (lll_futex_timed_wait, lll_futex_wake): Use it.
905 (lll_private_futex_wait, lll_private_futex_timed_wait,
906 lll_private_futex_wake): Removed.
908 2007-07-27 Jakub Jelinek <jakub@redhat.com>
910 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
911 of the structure for sparc32.
913 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
915 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
917 2007-07-23 Ulrich Drepper <drepper@redhat.com>
919 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
920 code used when private futexes are assumed.
921 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
924 2007-07-23 Jakub Jelinek <jakub@redhat.com>
926 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
927 (__lll_private_flag): Define.
928 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
929 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
931 (lll_private_futex_wait, lll_private_futex_timedwait,
932 lll_private_futex_wake): Define as wrapper around non-_private
934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
935 (__lll_private_flag): Define.
936 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
937 (lll_private_futex_wait, lll_private_futex_timedwait,
938 lll_private_futex_wake): Define as wrapper around non-_private
941 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
943 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
944 parameter to lll_futex_wait call.
945 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
947 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
948 Replace lll_futex_wait with lll_private_futex_wait.
949 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
950 Add LLL_SHARED parameter to lll_futex_wake().
952 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
953 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
954 lll_private_futex_wake.
955 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
956 bit from private parm before syscall.
957 (lll_futex_timed_wait): Likewise.
958 (lll_futex_wake): Likewise.
959 (lll_futex_wake_unlock): Likewise.
960 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
961 (lll_robust_mutex_unlock): Likewise.
962 (lll_mutex_unlock_force): Likewise.
963 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
965 2007-07-23 Ulrich Drepper <drepper@redhat.com>
967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
968 compilation when unconditionally using private futexes.
969 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
970 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
972 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
973 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
975 2007-07-17 Jakub Jelinek <jakub@redhat.com>
977 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
980 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
982 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
985 2007-05-16 Roland McGrath <roland@redhat.com>
987 * init.c (__nptl_initial_report_events): New variable.
988 (__pthread_initialize_minimal_internal): Initialize pd->report_events
991 2007-06-22 Jakub Jelinek <jakub@redhat.com>
993 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
994 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
996 2007-06-19 Ulrich Drepper <drepper@redhat.com>
998 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1001 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1003 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1004 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1005 * pthread_mutex_timedlock.c: Likewise.
1006 * pthread_mutex_trylock.c: Likewise.
1007 * pthread_mutex_unlock.c: Likewise.
1009 2007-06-17 Andreas Schwab <schwab@suse.de>
1011 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1014 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1016 * allocatestack.c (allocate_stack): Make code compile if
1017 __ASSUME_PRIVATE_FUTEX is set.
1019 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1021 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1022 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1024 (__pthread_rwlock_wrlock): Likewise.
1025 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1026 (pthread_rwlock_timedrdlock): Likewise.
1027 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1028 (pthread_rwlock_timedwrlock): Likewise.
1029 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1030 (__pthread_rwlock_unlock): Likewise.
1032 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1034 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1035 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1036 Split __flags into __flags, __shared, __pad1 and __pad2.
1037 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1038 futexes if they are available.
1039 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1040 in libc-lowlevellock.S allow using private futexes.
1041 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1042 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1043 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1044 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1045 lll_private_futex_timed_wait and lll_private_futex_wake.
1046 (lll_robust_mutex_unlock): Fix typo.
1047 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1048 field in futex command setup.
1049 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1050 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1051 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1052 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1053 if they are available. Remove clear_once_control.
1054 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1055 futexes if they are available.
1056 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1057 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1058 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1060 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1061 Wake only when there are waiters.
1062 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1063 support. Indicate that there are waiters. Remove unnecessary
1064 extra cancellation test.
1065 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1066 left-over duplication of __sem_wait_cleanup.
1068 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1070 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1071 parameter to lll_futex_wait, lll_futex_timed_wait, and
1072 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1073 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1074 lll_private_futex_wake.
1075 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1076 * allocatestack.c: Adjust use of lll_futex_* macros.
1078 * lowlevellock.h: Likewise.
1079 * pthread_barrier_wait.c: Likewise.
1080 * pthread_cond_broadcast.c: Likewise.
1081 * pthread_cond_destroy.c: Likewise.
1082 * pthread_cond_signal.c: Likewise.
1083 * pthread_cond_timedwait.c: Likewise.
1084 * pthread_cond_wait.c: Likewise.
1085 * pthread_create.c: Likewise.
1086 * pthread_mutex_lock.c: Likewise.
1087 * pthread_mutex_setprioceiling.c: Likewise.
1088 * pthread_mutex_timedlock.c: Likewise.
1089 * pthread_mutex_unlock.c: Likewise.
1090 * pthread_rwlock_timedrdlock.c: Likewise.
1091 * pthread_rwlock_timedwrlock.c: Likewise.
1092 * pthread_rwlock_unlock.c: Likewise.
1093 * sysdeps/alpha/tls.h: Likewise.
1094 * sysdeps/i386/tls.h: Likewise.
1095 * sysdeps/ia64/tls.h: Likewise.
1096 * sysdeps/powerpc/tls.h: Likewise.
1097 * sysdeps/pthread/aio_misc.h: Likewise.
1098 * sysdeps/pthread/gai_misc.h: Likewise.
1099 * sysdeps/s390/tls.h: Likewise.
1100 * sysdeps/sh/tls.h: Likewise.
1101 * sysdeps/sparc/tls.h: Likewise.
1102 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1103 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1104 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1105 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1106 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1107 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1108 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1109 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1110 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1111 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1113 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1114 * sysdeps/x86_64/tls.h: Likewise.
1116 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1118 * pthread_getattr_np.c: No need to install a cancellation handler,
1119 this is no cancellation point.
1120 * pthread_getschedparam.c: Likewise.
1121 * pthread_setschedparam.c: Likewise.
1122 * pthread_setschedprio.c: Likewise.
1123 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1125 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1126 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1127 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1128 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1129 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1130 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1131 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1132 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1133 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1134 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1135 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1136 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1138 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1139 whether there are more than one thread makes no sense here since
1140 we only call the slow path if the locks are taken.
1141 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1143 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1144 COND_NWAITERS_SHIFT.
1145 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1147 * pthread_cond_init.c: Likewise.
1148 * pthread_cond_timedwait.c: Likewise.
1149 * pthread_cond_wait.c: Likewise.
1150 * pthread_condattr_getclock.c: Likewise.
1151 * pthread_condattr_setclock.c: Likewise.
1152 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1158 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1160 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1163 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1165 (THREAD_GSCOPE_GET_FLAG): Remove.
1166 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1167 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1169 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1170 (THREAD_GSCOPE_GET_FLAG): Remove.
1171 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1172 instead of THREAD_GSCOPE_GET_FLAG.
1173 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1175 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1176 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1177 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1178 THREAD_GSCOPE_WAIT): Define.
1179 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1180 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1181 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1182 THREAD_GSCOPE_WAIT): Define.
1183 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1184 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1185 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1186 THREAD_GSCOPE_WAIT): Define.
1187 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1188 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1189 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1190 THREAD_GSCOPE_WAIT): Define.
1192 2007-05-24 Richard Henderson <rth@redhat.com>
1194 * descr.h (struct pthread): Add header.gscope_flag.
1195 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1196 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1197 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1198 THREAD_GSCOPE_WAIT): Define.
1200 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1202 * init.c: Make it compile with older kernel headers.
1204 * tst-initializers1.c: Show through exit code which test failed.
1206 * pthread_rwlock_init.c: Also initialize __shared field.
1207 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1208 element in rwlock structure into four byte elements. One of them is
1209 the new __shared element.
1210 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1212 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1213 __shared, adjust names of other padding elements.
1214 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1215 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1216 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1217 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1220 futex to use private operations if possible.
1221 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1223 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1225 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1228 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1230 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1232 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1233 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1235 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1237 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1238 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1239 * pthread_rwlock_timedrdlock.c: Likewise.
1240 * pthread_rwlock_tryrdlock.c: Likewise.
1242 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1245 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1246 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1247 duplication of __sem_wait_cleanup.
1249 * allocatestack.c: Revert last change.
1251 * sysdeps/i386/tls.h: Likewise.
1252 * sysdeps/x86_64/tls.h: Likewise.
1253 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1255 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1257 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1259 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1260 * pthread_barrier_init.c: Set private flag if pshared and private
1261 futexes are supported.
1262 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1263 private field in futex command setup.
1264 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1266 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1268 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1270 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1271 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1272 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1273 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1274 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1276 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1277 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1278 fields in the structure.
1279 (__old_sem_init): New function.
1280 * sem_open.c: Initialize all fields of the structure.
1281 * sem_getvalue.c: Adjust for renamed element.
1282 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1283 (gen-as-const-headers): Add structsem.sym.
1284 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1285 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1286 struct new_sem. Add struct old_sem.
1287 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1288 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1289 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1290 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1291 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1292 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1293 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1294 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1295 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1296 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1297 * tst-sem10.c: New file.
1298 * tst-sem11.c: New file.
1299 * tst-sem12.c: New file.
1300 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1303 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1304 Jakub Jelinek <jakub@redhat.com>
1306 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1307 Move __pthread_enable_asynccancel right before futex syscall.
1308 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1311 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1313 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1314 THREAD_COPY_PRIVATE_FUTEX): Define.
1315 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1316 THREAD_COPY_PRIVATE_FUTEX): Define.
1317 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1318 * init.c (__pthread_initialize_minimal_internal): Use
1319 THREAD_SET_PRIVATE_FUTEX.
1321 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1322 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1323 THREAD_GSCOPE_FLAG_WAIT): Define.
1324 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1325 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1326 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1328 (THREAD_GSCOPE_GET_FLAG): Define.
1329 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1330 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1331 instead of ->header.gscope_flag directly.
1333 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1335 * init.c (__pthread_initialize_minimal_internal): Check whether
1336 private futexes are available.
1337 * allocatestack.c (allocate_stack): Copy private_futex field from
1338 current thread into the new stack.
1339 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1340 futexes if they are available.
1341 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1342 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1343 in libc-lowlevellock.S allow using private futexes.
1344 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1347 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1349 if they are available.
1350 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1351 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1352 * sysdeps/i386/tcb-offsets.sym: Likewise.
1353 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1354 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1356 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1358 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1359 Remove ptr_wait_lookup_done again.
1360 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1361 (__pthread_initialize_minimal_internal): Initialize
1362 _dl_wait_lookup_done pointer in _rtld_global directly.
1363 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1364 Remove code to code _dl_wait_lookup_done.
1365 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1368 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1370 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1371 pthread_mutex_init failed with ENOTSUP.
1373 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1375 * allocatestack.c (__wait_lookup_done): New function.
1376 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1377 Add ptr_wait_lookup_done.
1378 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1379 * pthreadP.h: Declare __wait_lookup_done.
1380 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1381 Define macros to implement reference handling of global scope.
1382 * sysdeps/x86_64/tls.h: Likewise.
1383 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1384 Initialize GL(dl_wait_lookup_done).
1386 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1389 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1391 * pthread_mutex_timedlock.c: Likewise.
1392 * pthread_mutex_trylock.c: Likewise.
1393 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1395 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1396 * tst-robust9.c: New file.
1397 * tst-robustpi9.c: New file.
1399 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1400 unnecessary extra cancellation test.
1402 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1404 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1405 extra cancellation test.
1406 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1408 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1410 * descr.h (struct pthread): Rearrange members to fill hole in
1413 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1414 (__pthread_setaffinity_new): If syscall was successful and
1415 RESET_VGETCPU_CACHE is defined, use it before returning.
1416 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1418 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1421 * tst-align2.c: Include stackinfo.h.
1422 * tst-getpid1.c: Likewise.
1424 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1427 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1428 * tst-getpid1.c (do_test): Likewise.
1431 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1432 (allocate_stack): Likewise.
1434 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1436 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1437 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1438 (__lll_robust_timedlock_wait): Likewise.
1439 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1441 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1444 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1445 * tst-cancel4.c (tf_fdatasync): New test.
1447 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1450 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1451 check mutexes like normal mutexes.
1454 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1455 Initialize the whole sigevent structure to appease valgrind.
1457 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1459 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1460 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1462 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1464 * tst-locale1.c: Avoid warnings.
1465 * tst-locale2.c: Likewise.
1467 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1469 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1470 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1472 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1474 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1475 __extern_always_inline where appropriate.
1476 * sysdeps/pthread/pthread.h: Likewise.
1478 2007-03-13 Richard Henderson <rth@redhat.com>
1480 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1481 separate cfi regions for the two subsections.
1483 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1485 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1486 new thread, don't just decrement it.
1487 Patch by Suzuki K P <suzuki@in.ibm.com>.
1489 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1491 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1492 PTHFCT_CALL definition.
1494 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1496 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1497 available, don't use it.
1499 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1502 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1503 call into the kernel to delay.
1505 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1507 * tst-initializers1.c: We want to test the initializers as seen
1508 outside of libc, so undefined _LIBC.
1510 * pthread_join.c (cleanup): Avoid warning.
1512 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1514 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1515 (__lll_timedwait_tid): Add unwind info.
1517 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1518 function table, mangle the pointers.
1519 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1520 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1521 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1522 demangle pointers before use.
1523 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1525 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1526 * sysdeps/pthread/setxid.h: Likewise.
1528 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1530 * tst-rwlock7.c: Show some more information in case of correct
1533 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1535 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1536 (lll_futex_timed_wait): Undo part of last change, don't negate
1539 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1541 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1542 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1544 2006-12-28 David S. Miller <davem@davemloft.net>
1546 * shlib-versions: Fix sparc64 linux target specification.
1548 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1550 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1551 Adjust include path for pthread_barrier_wait.c move.
1553 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1555 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1556 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1558 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1560 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1561 6 argument cancellable syscalls.
1562 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1563 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1564 6 argument cancellable syscalls.
1565 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1567 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1569 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1570 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1572 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1574 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1575 __sync_lock_release instead of __sync_lock_release_si.
1577 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1579 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1581 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1582 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1583 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1584 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1585 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1586 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1587 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1588 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1589 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1590 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1591 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1593 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1595 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1596 * pthread_barrier_wait.c: ...here.
1597 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1598 * pthread_cond_broadcast.c: ...here.
1599 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1600 * pthread_cond_signal.c: ...here.
1601 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1602 * pthread_cond_timedwait.c: ...here.
1603 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1604 * pthread_cond_wait.c: ...here.
1605 * sysdeps/pthread/pthread_once.c: Move to...
1606 * pthread_once.c: ...here.
1607 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1608 * pthread_rwlock_rdlock.c: ...here.
1609 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1610 * pthread_rwlock_timedrdlock.c: ...here.
1611 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1612 * pthread_rwlock_timedwrlock.c: ...here.
1613 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1614 * pthread_rwlock_unlock.c: ...here.
1615 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1616 * pthread_rwlock_wrlock.c: ...here.
1617 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1618 * pthread_spin_destroy.c: ...here.
1619 * sysdeps/pthread/pthread_spin_init.c: Move to...
1620 * pthread_spin_init.c: ...here.
1621 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1622 * pthread_spin_unlock.c: ...here.
1623 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1624 * pthread_getcpuclockid.c: ...here.
1626 * init.c: USE_TLS support is now always enabled.
1627 * tst-tls5.h: Likewise.
1628 * sysdeps/alpha/tls.h: Likewise.
1629 * sysdeps/i386/tls.h: Likewise.
1630 * sysdeps/ia64/tls.h: Likewise.
1631 * sysdeps/powerpc/tls.h: Likewise.
1632 * sysdeps/s390/tls.h: Likewise.
1633 * sysdeps/sh/tls.h: Likewise.
1634 * sysdeps/sparc/tls.h: Likewise.
1635 * sysdeps/x86_64/tls.h: Likewise.
1637 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1639 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1640 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1643 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1644 Define to THREAD_SELF->header.multiple_threads.
1645 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1647 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1649 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1650 (SINGLE_THREAD_P): Likewise.
1651 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1652 (SINGLE_THREAD_P): Likewise.
1653 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1654 (SINGLE_THREAD_P): Likewise.
1655 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1656 (SINGLE_THREAD_P): Likewise.
1657 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1659 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1660 (SINGLE_THREAD_P): Likewise.
1661 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1662 (SINGLE_THREAD_P): Likewise.
1663 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1666 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1668 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1669 by default rather than 2_3_3.
1671 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1673 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1674 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1675 atomic_* instead of catomic_* macros.
1677 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1680 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1681 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1682 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1683 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1684 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1685 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1686 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1687 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1688 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1689 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1690 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1691 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1692 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1694 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1696 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1697 cancelable syscalls with six parameters.
1699 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1700 operations instead of atomic_*.
1702 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1704 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1706 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1708 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1709 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1710 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1712 * pthread_attr_setstack.c: Allow overwriting the version number of the
1714 * pthread_attr_setstacksize.c: Likewise.
1715 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1717 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1718 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1720 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1723 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1724 Patch by Petr Baudis.
1726 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1728 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1730 * tst-cancel2.c (tf): Loop as long as something was written.
1732 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1734 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1735 mutexes wake all mutexes.
1736 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1737 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1738 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1740 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1742 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1743 to guarantee the thread is always canceled.
1745 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1747 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1749 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1750 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1753 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1755 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1758 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1759 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1763 * Makefile (tests): Add tst-cond22.
1764 * tst-cond22.c: New file.
1766 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1769 * descr.h (struct pthread): Add parent_cancelhandling.
1770 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1771 cancelhandling value to child.
1772 * pthread_create.c (start_thread): If parent thread was canceled
1773 reset the SIGCANCEL mask.
1774 * Makefile (tests): Add tst-cancel25.
1775 * tst-cancel25.c: New file.
1777 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1778 Ulrich Drepper <drepper@redhat.com>
1780 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1781 counterp if it is already zero.
1782 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1784 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1785 Roland McGrath <roland@redhat.com>
1787 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1788 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1789 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1790 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1791 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1792 lll_robust_mutex_timedlock, lll_mutex_unlock,
1793 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1794 Add _L_*_ symbols around the subsection.
1795 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1796 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1798 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1799 Roland McGrath <roland@redhat.com>
1801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1802 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1803 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1804 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1805 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1806 lll_robust_mutex_timedlock, lll_mutex_unlock,
1807 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1808 Add _L_*_ symbols around the subsection.
1809 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1810 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1812 2006-08-31 Ulrich Drepper <drepper@redhat.com>
1814 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1815 change because it can disturb too much existing code. If real hard
1816 reader preference is needed we'll introduce another type.
1817 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1818 (pthread_rwlock_timedwrlock): Likewise.
1819 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1822 2006-08-30 Ulrich Drepper <drepper@redhat.com>
1824 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1826 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1827 (pthread_rwlock_timedwrlock): Likewise.
1828 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1831 2006-08-25 Jakub Jelinek <jakub@redhat.com>
1833 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1834 Only define ifdef SHARED.
1836 2006-08-23 Ulrich Drepper <drepper@redhat.com>
1838 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1839 (free_stacks): ...here.
1840 (__free_stack_cache): New function.
1841 * pthreadP.h: Declare __free_stack_cache.
1842 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1844 * init.c (pthread_functions): Initialize ptr_freeres.
1845 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1846 New freeres function.
1848 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
1851 * Makefile (extra-objs): Add modules to extra-test-objs instead.
1853 2006-08-20 Ulrich Drepper <drepper@redhat.com>
1855 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1856 _XOPEN_REALTIME_THREADS.
1858 2006-08-15 Jakub Jelinek <jakub@redhat.com>
1860 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1861 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1862 HAVE_CLOCK_GETTIME_VSYSCALL.
1863 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1865 2006-08-14 Jakub Jelinek <jakub@redhat.com>
1867 * sysdeps/unix/sysv/linux/bits/posix_opt.h
1868 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1869 * descr.h (struct priority_protection_data): New type.
1870 (struct pthread): Add tpp field.
1871 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1872 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1873 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1874 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1876 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1877 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1878 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1879 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1881 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1883 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1884 * pthread_mutexattr_getprioceiling.c
1885 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1886 in the SCHED_FIFO priority range.
1887 * pthread_mutexattr_setprioceiling.c
1888 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1889 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1890 if mutex is not TPP. Ceiling is now in __data.__lock.
1891 * pthread_mutex_setprioceiling.c: Include stdbool.h.
1892 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
1893 is now in __data.__lock. Add locking.
1894 * pthread_create.c (__free_tcb): Free pd->tpp structure.
1895 * Makefile (libpthread-routines): Add tpp.
1896 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1897 * tst-tpp.h: New file.
1898 * tst-mutexpp1.c: New file.
1899 * tst-mutexpp6.c: New file.
1900 * tst-mutexpp10.c: New file.
1901 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1902 * tst-mutex6.c (TEST_FUNCTION): Likewise.
1904 2006-08-12 Ulrich Drepper <drepper@redhat.com>
1907 * pthread_join.c (pthread_join): Account for self being canceled
1908 when checking for deadlocks.
1909 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
1910 (tf1): Don't print anything after pthread_join returns, this would be
1911 another cancellation point.
1913 * tst-join6.c: New file.
1914 * Makefile (tests): Add tst-join6.
1916 2006-08-03 Ulrich Drepper <drepper@redhat.com>
1919 * pthread_setspecific.c (__pthread_setspecific): Check
1920 out-of-range index before checking for unused key.
1922 * sysdeps/pthread/gai_misc.h: New file.
1924 2006-08-01 Ulrich Drepper <drepper@redhat.com>
1926 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
1927 file. Don't use sysctl.
1928 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
1929 overwrite the file if this is likely not true.
1931 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
1933 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1934 * Makefile (tests): Add tst-getpid3.
1935 * tst-getpid3.c: New file.
1937 2006-07-30 Roland McGrath <roland@redhat.com>
1939 * Makefile (libpthread-routines): Add ptw-sigsuspend.
1941 * sysdeps/unix/sysv/linux/i386/not-cancel.h
1942 (pause_not_cancel): New macro.
1943 (nanosleep_not_cancel): New macro.
1944 (sigsuspend_not_cancel): New macro.
1945 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1946 nanosleep_not_cancel macro from <not-cancel.h>.
1947 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1948 macro from <not-cancel.h>.
1950 2006-07-28 Ulrich Drepper <drepper@redhat.com>
1951 Jakub Jelinek <jakub@redhat.com>
1953 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1954 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
1955 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1956 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1957 * pthread_mutex_init.c: Add support for priority inheritance mutex.
1958 * pthread_mutex_lock.c: Likewise.
1959 * pthread_mutex_timedlock.c: Likewise.
1960 * pthread_mutex_trylock.c: Likewise.
1961 * pthread_mutex_unlock.c: Likewise.
1962 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1966 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1967 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1968 pthread-pi-defines.sym.
1969 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1970 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1971 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1972 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1973 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1974 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1975 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1976 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1977 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1978 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1979 _POSIX_THREAD_PRIO_INHERIT to 200112L.
1980 * tst-mutex1.c: Adjust to allow use in PI mutex test.
1981 * tst-mutex2.c: Likewise.
1982 * tst-mutex3.c: Likewise.
1983 * tst-mutex4.c: Likewise.
1984 * tst-mutex5.c: Likewise.
1985 * tst-mutex6.c: Likewise.
1986 * tst-mutex7.c: Likewise.
1987 * tst-mutex7a.c: Likewise.
1988 * tst-mutex8.c: Likewise.
1989 * tst-mutex9.c: Likewise.
1990 * tst-robust1.c: Likewise.
1991 * tst-robust7.c: Likewise.
1992 * tst-robust8.c: Likewise.
1993 * tst-mutexpi1.c: New file.
1994 * tst-mutexpi2.c: New file.
1995 * tst-mutexpi3.c: New file.
1996 * tst-mutexpi4.c: New file.
1997 * tst-mutexpi5.c: New file.
1998 * tst-mutexpi6.c: New file.
1999 * tst-mutexpi7.c: New file.
2000 * tst-mutexpi7a.c: New file.
2001 * tst-mutexpi8.c: New file.
2002 * tst-mutexpi9.c: New file.
2003 * tst-robust1.c: New file.
2004 * tst-robust2.c: New file.
2005 * tst-robust3.c: New file.
2006 * tst-robust4.c: New file.
2007 * tst-robust5.c: New file.
2008 * tst-robust6.c: New file.
2009 * tst-robust7.c: New file.
2010 * tst-robust8.c: New file.
2011 * Makefile (tests): Add the new tests.
2013 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2014 * pthread_mutex_destroy.c: Remove unneeded label.
2016 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2018 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2019 computations to compile time.
2021 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2023 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2025 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2027 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2029 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2031 * pthread_key_create.c (__pthread_key_create): Do away with
2032 __pthread_keys_lock.
2034 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2035 (__kernel_cpumask_size): Mark as hidden.
2036 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2038 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2039 * semaphoreP.h (__sem_mappings_lock): Likewise.
2041 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2043 * pthread_atfork.c: Mark __dso_handle as hidden.
2045 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2048 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2049 the reload problem. Change the one path in pthread_cancel_init
2050 which causes the problem. Force gcc to reload. Simplify callers.
2051 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2052 (_Unwind_GetBSP): Undo last patch.
2054 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2056 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2057 function pointer is reloaded after pthread_cancel_init calls.
2060 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2061 pointers are reloaded after pthread_cancel_init calls.
2063 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2065 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2068 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2070 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2071 Allocate new object which is passed to timer_sigev_thread so that
2072 the timer can be deleted before the new thread is scheduled.
2074 2006-04-26 Roland McGrath <roland@redhat.com>
2076 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2078 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2080 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2081 suffix for conditional jumps.
2082 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2083 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2084 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2085 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2086 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2087 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2089 * init.c (sigcancel_handler): Compare with correct PID even if the
2090 thread is in the middle of a fork call.
2091 (sighandler_setxid): Likewise.
2092 Reported by Suzuki K P <suzuki@in.ibm.com> .
2094 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2096 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2098 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2100 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2101 fails [Coverity CID 105].
2103 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2105 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2107 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2110 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2111 Define __lll_rel_instr using lwsync.
2113 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2115 * allocatestack.c (allocate_stack): Always initialize robust_head.
2116 * descr.h: Define struct robust_list_head.
2117 (struct pthread): Use robust_list_head in robust mutex list definition.
2118 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2119 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2120 (__pthread_initialize_minimal_internal): Register robust_list with
2122 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2123 Declare __set_robust_list_avail.
2124 * pthread_create.c (start_thread): Register robust_list of new thread.
2125 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2127 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2128 number of users, it's unreliable.
2129 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2130 set_robust_list syscall is available.
2131 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2132 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2133 Set robust_head.list_op_pending before trying to lock a robust mutex.
2134 * pthread_mutex_timedlock.c: Likewise.
2135 * pthread_mutex_trylock.c: Likewise.
2136 * pthread_mutex_unlock.c: Likewise for unlocking.
2137 * Makefile (tests): Add tst-robust8.
2138 * tst-robust8.c: New file.
2140 2006-03-08 Andreas Schwab <schwab@suse.de>
2142 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2143 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2145 2006-03-05 Roland McGrath <roland@redhat.com>
2147 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2148 and $config_os doesn't match *linux*.
2150 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2152 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2153 Use __syscall_error.
2154 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2155 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2156 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2157 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2158 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2159 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2161 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2165 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2167 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2168 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2170 (__lll_robust_timedlock_wait): Likewise.
2171 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2172 (__lll_robust_lock_wait): Likewise.
2173 (__lll_robust_timedlock_wait): Likewise.
2174 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2175 (__lll_robust_lock_wait): Likewise.
2176 (__lll_robust_timedlock_wait): Likewise.
2178 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2180 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2181 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2182 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2183 lll_robust_mutex_unlock): Define.
2184 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2186 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2188 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2189 instead of <clone.S>.
2191 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2193 * Makefile (libpthread-routines): Add
2194 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2195 and pthread_mutex_[sg]etprioceiling.
2196 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2197 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2198 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2199 pthread_mutex_setprioceiling.
2200 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2201 PTHREAD_PRIO_PROTECT): New enum values.
2202 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2203 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2204 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2206 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2207 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2208 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2210 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2211 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2212 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2213 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2214 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2215 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2216 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2218 * pthread_mutex_getprioceiling.c: New file.
2219 * pthread_mutex_setprioceiling.c: New file.
2220 * pthread_mutexattr_getprioceiling.c: New file.
2221 * pthread_mutexattr_setprioceiling.c: New file.
2222 * pthread_mutexattr_getprotocol.c: New file.
2223 * pthread_mutexattr_setprotocol.c: New file.
2225 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2227 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2229 2006-02-27 Roland McGrath <roland@redhat.com>
2231 * sysdeps/pthread/Subdirs: List nptl here too.
2232 * configure (libc_add_on_canonical): New variable.
2234 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2236 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2237 self to get main source tree's file.
2238 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2239 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2240 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2241 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2242 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2243 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2244 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2245 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2246 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2247 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2248 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2249 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2250 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2252 * Makefile: Use $(sysdirs) in vpath directive.
2254 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2255 (CPPFLAGS-timer_routines.c): Likewise.
2257 * Makeconfig (includes): Variable removed.
2259 2006-02-26 Roland McGrath <roland@redhat.com>
2261 * sysdeps/generic/pt-raise.c: Moved to ...
2262 * pt-raise.c: ... here.
2263 * sysdeps/generic/lowlevellock.h: Moved to ...
2264 * lowlevellock.h: ... here.
2266 2006-02-23 Roland McGrath <roland@redhat.com>
2268 * descr.h (struct pthread): Add final member `end_padding'.
2269 (PTHREAD_STRUCT_END_PADDING): Use it.
2271 2006-02-20 Roland McGrath <roland@redhat.com>
2273 * sysdeps/mips: Directory removed, saved in ports repository.
2274 * sysdeps/unix/sysv/linux/mips: Likewise.
2276 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2278 * tst-robust1.c: Add second mutex to check that the mutex list is
2281 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2283 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2284 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2285 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2286 lll_robust_mutex_unlock): New macros.
2287 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2288 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2289 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2290 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2291 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2293 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2295 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2297 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2299 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2302 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2303 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2304 (lll_robust_mutex_unlock): Likewise.
2306 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2308 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2309 Set robust_list.__next rather than robust_list.
2310 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2311 (__pthread_list_t): New typedef.
2312 (pthread_mutex_t): Replace __next and __prev fields with __list.
2313 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2314 (__pthread_list_t): New typedef.
2315 (pthread_mutex_t): Replace __next and __prev fields with __list.
2316 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2317 (__pthread_list_t, __pthread_slist_t): New typedefs.
2318 (pthread_mutex_t): Replace __next and __prev fields with __list.
2319 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2320 (__pthread_list_t, __pthread_slist_t): New typedefs.
2321 (pthread_mutex_t): Replace __next and __prev fields with __list.
2322 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2323 (__pthread_list_t, __pthread_slist_t): New typedefs.
2324 (pthread_mutex_t): Replace __next and __prev fields with __list.
2325 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2326 (__pthread_slist_t): New typedef.
2327 (pthread_mutex_t): Replace __next field with __list.
2329 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2331 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2332 PTHREAD_MUTEX_OWNERDEAD.
2333 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2334 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2335 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2336 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2337 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2338 to PTHREAD_MUTEX_INCONSISTENT.
2339 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2340 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2341 * pthread_mutex_trylock.c: Likewise.
2342 * pthread_mutex_timedlock.c: Likewise.
2343 * pthread_mutex_unlock.c: Likewise.
2344 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2345 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2346 lowlevelrobustlock.sym.
2347 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2348 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2351 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2352 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2353 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2354 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2356 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2358 * allocatestack.c (allocate_stack): Initialize robust_list.
2359 * init.c (__pthread_initialize_minimal_internal): Likewise.
2360 * descr.h (struct xid_command): Pretty printing.
2361 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2362 robust_list. Adjust macros.
2363 * pthread_create.c (start_thread): Adjust robust_list handling.
2364 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2365 but the owner for all robust mutex types.
2366 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2367 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2368 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2369 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2371 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2372 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2374 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2377 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2379 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2381 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2383 (lll_futex_timed_wait): Define.
2385 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2387 * tst-cancel4.c: Test ppoll.
2389 2006-01-18 Andreas Jaeger <aj@suse.de>
2392 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2393 (pthread_mutex_t): Follow changes for other archs. Based on patch
2394 by Jim Gifford <patches@jg555.com>.
2396 2006-01-13 Richard Henderson <rth@redhat.com>
2398 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2400 2006-01-10 Roland McGrath <roland@redhat.com>
2402 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2403 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2404 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2405 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2406 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2407 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2408 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2409 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2410 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2411 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2413 2006-01-09 Roland McGrath <roland@redhat.com>
2415 * tst-initializers1-c89.c: New file.
2416 * tst-initializers1-c99.c: New file.
2417 * tst-initializers1-gnu89.c: New file.
2418 * tst-initializers1-gnu99.c: New file.
2419 * Makefile (tests): Add them.
2420 (CFLAGS-tst-initializers1-c89.c): New variable.
2421 (CFLAGS-tst-initializers1-c99.c): New variable.
2422 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2423 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2425 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2426 Use __extension__ on anonymous union definition.
2427 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2428 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2429 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2430 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2431 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2433 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2435 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2436 Don't give the union a name because it changes the mangled name.
2437 Instead name the struct for __data.
2438 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2440 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2443 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2445 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2446 stack bias to mc_ftp field.
2448 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2450 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2451 being too clever and reloading the futex value where it shouldn't.
2453 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2455 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2458 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2460 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2463 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2465 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2466 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2467 rename in tcbhead_t.
2469 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2470 Don't give the union a name because it changes the mangled name.
2471 Instead name the struct for __data.
2472 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2473 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2474 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2475 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2476 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2477 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2479 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2481 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2483 (lll_futex_timed_wait): Define.
2484 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2485 * sysdeps/pthread/aio_misc.h: New file.
2487 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2489 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2491 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2493 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2494 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2495 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2497 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2499 * tst-cancel24.cc: Use C headers instead of C++ headers.
2501 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2503 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2504 sparc-linux configured glibc.
2505 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2506 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2507 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2508 atomic_compare_and_exchange_val_24_acq instead of
2509 atomic_compare_and_exchange_val_acq.
2510 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2511 instead of atomic_exchange_rel.
2512 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2513 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2515 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2517 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2518 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2519 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2520 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2521 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2522 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2524 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2526 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2527 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2528 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2530 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2532 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2534 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2536 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2539 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2541 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2542 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2543 THREAD_COPY_POINTER_GUARD): Define.
2544 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2545 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2547 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2549 * version.c: Update copyright year.
2551 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2553 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2554 .eh_frame section, use cfi_* directives.
2555 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2557 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2559 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2562 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2564 * sysdeps/pthread/sigaction.c: Removed.
2565 * sigaction.c: New file.
2566 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2568 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2570 * Makefile (tests): Add tst-signal7.
2571 * tst-signal7.c: New file.
2573 2005-12-27 Roland McGrath <roland@redhat.com>
2575 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2576 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2577 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2578 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2579 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2580 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2581 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2582 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2583 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2584 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2585 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2587 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2589 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2590 and __prev field to pthread_mutex_t.
2591 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2592 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2593 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2594 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2595 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2598 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2600 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2601 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2602 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2603 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2604 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2605 and PTHREAD_MUTEXATTR_FLAG_BITS.
2606 * descr.h (struct pthread): Add robust_list field and define
2607 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2608 * pthread_mutexattr_getrobust.c: New file.
2609 * pthread_mutexattr_setrobust.c: New file.
2610 * pthread_mutex_consistent.c: New file.
2611 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2612 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2613 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2614 Adjust pthread_mutex_t initializers.
2615 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2616 field to pthread_mutex_t.
2617 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2618 and __prev field to pthread_mutex_t.
2619 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2620 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2621 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2622 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2623 * pthread_mutexattr_gettype.c: Likewise.
2624 * pthread_mutexattr_setpshared.c: Likewise.
2625 * pthread_mutexattr_settype.c: Likewise.
2626 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2627 Initialize mutex kind according to robust flag.
2628 * pthread_mutex_lock.c: Implement local robust mutex.
2629 * pthread_mutex_timedlock.c: Likewise.
2630 * pthread_mutex_trylock.c: Likewise.
2631 * pthread_mutex_unlock.c: Likewise.
2632 * pthread_create.c (start_thread): Mark robust mutexes which remained
2634 * tst-robust1.c: New file.
2635 * tst-robust2.c: New file.
2636 * tst-robust3.c: New file.
2637 * tst-robust4.c: New file.
2638 * tst-robust5.c: New file.
2639 * tst-robust6.c: New file.
2640 * tst-robust7.c: New file.
2641 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2642 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2643 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2644 tst-robust5, tst-robust6, and tst-robust7.
2646 * tst-typesizes.c: New file.
2647 * Makefile (tests): Add tst-typesizes.
2649 * tst-once3.c: More debug output.
2651 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2653 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2654 missing after last change.
2656 * version.c: Update copyright year.
2658 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2660 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2661 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2662 * pthread_mutex_trylock.c: Likewise.
2663 * pthread_mutex_timedlock.c: Likewise.
2664 * pthread_mutex_unlock.c: Likewise.
2666 2005-12-22 Roland McGrath <roland@redhat.com>
2668 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2669 so that #include_next's search location is not reset to the -I..
2670 directory where <nptl/...> can be found.
2672 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2675 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2676 Fix unwind info. Remove useless branch prediction prefix.
2677 * tst-cancel24.cc: New file.
2678 * Makefile: Add rules to build and run tst-cancel24.
2680 2005-12-21 Roland McGrath <roland@redhat.com>
2682 * libc-cancellation.c: Use <> rather than "" #includes.
2683 * pt-cleanup.c: Likewise.
2684 * pthread_create.c: Likewise.
2685 * pthread_join.c: Likewise.
2686 * pthread_timedjoin.c: Likewise.
2687 * pthread_tryjoin.c: Likewise.
2688 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2689 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2690 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2691 * unwind.c: Likewise.
2693 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2695 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2696 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2697 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2698 THREAD_COPY_POINTER_GUARD): Define.
2700 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2702 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2704 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2705 THREAD_COPY_POINTER_GUARD): Define.
2706 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2707 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2708 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2709 THREAD_COPY_POINTER_GUARD): Define.
2710 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2711 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2712 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2713 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2714 Use PTR_DEMANGLE for B0 if defined.
2716 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2718 * pthread_create.c (__pthread_create_2_1): Use
2719 THREAD_COPY_POINTER_GUARD if available.
2720 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2721 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2722 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2723 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2724 * sysdeps/x86_64/tls.h: Likewise.
2726 2005-12-15 Roland McGrath <roland@redhat.com>
2728 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2730 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2732 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2734 * errno-loc.c: New file.
2736 2005-12-12 Roland McGrath <roland@redhat.com>
2738 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2739 adjustments before choosing stack size. Update minimum stack size
2740 calculation to match allocate_stack change.
2742 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2744 * allocatestack.c (allocate_stack): Don't demand that there is an
2745 additional full page available on the stack beside guard, TLS, the
2748 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2750 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2751 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2753 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2754 compiling 32-bit code we must define __cleanup_fct_attribute.
2756 005-11-24 Jakub Jelinek <jakub@redhat.com>
2759 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2760 __attribute__ instead of __attribute.
2761 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2762 (__cleanup_fct_attribute): Likewise.
2764 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2766 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2767 a write barrier before writing libgcc_s_getcfa.
2769 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2771 * sysdeps/unix/sysv/linux/configure: Removed.
2773 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2775 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2776 optional init_array/fini_array support.
2778 2005-10-24 Roland McGrath <roland@redhat.com>
2780 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2781 versioned_symbol use.
2783 2005-10-16 Roland McGrath <roland@redhat.com>
2785 * init.c (__pthread_initialize_minimal_internal): Even when using a
2786 compile-time default stack size, apply the minimum that allocate_stack
2787 will require, and round up to page size.
2789 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2791 * Makefile ($(test-modules)): Remove static pattern rule.
2793 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2794 Ulrich Drepper <drepper@redhat.com>
2796 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2797 alignment in callback function.
2798 * Makefile: Add rules to build and run tst-align3.
2799 * tst-align3.c: New file.
2801 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2803 * allocatestack.c (setxid_signal_thread): Add
2804 INTERNAL_SYSCALL_DECL (err).
2806 2005-10-02 Jakub Jelinek <jakub@redhat.com>
2808 * allocatestack.c (setxid_signal_thread): Need to use
2809 atomic_compare_and_exchange_bool_acq.
2811 2005-10-01 Ulrich Drepper <drepper@redhat.com>
2812 Jakub Jelinek <jakub@redhat.com>
2814 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2816 (struct pthread): Move specific_used field to avoid padding.
2817 Add setxid_futex field.
2818 * init.c (sighandler_setxid): Reset setxid flag and release the
2820 * allocatestack.c (setxid_signal_thread): New function. Broken
2821 out of the bodies of the two loops in __nptl_setxid. For undetached
2822 threads check whether they are exiting and if yes, don't send a signal.
2823 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2824 * pthread_create.c (start_thread): For undetached threads, check
2825 whether setxid bit is set. If yes, wait until signal has been
2828 * allocatestack.c (STACK_VARIABLES): Initialize them.
2829 * pthread_create.c (__pthread_create_2_1): Initialize pd.
2831 2004-09-02 Jakub Jelinek <jakub@redhat.com>
2833 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2834 waiters, awake all waiters on the associated mutex.
2836 2005-09-22 Roland McGrath <roland@redhat.com>
2838 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2839 ../sysdeps/x86_64/hp-timing.h).
2841 2005-08-29 Jakub Jelinek <jakub@redhat.com>
2843 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2844 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2845 (lll_futex_wake_unlock): Define.
2846 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2847 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2848 (lll_futex_wake_unlock): Define.
2849 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2850 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2851 (lll_futex_wake_unlock): Define.
2852 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2853 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2854 (lll_futex_wake_unlock): Define.
2855 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2856 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2857 (lll_futex_wake_unlock): Define.
2858 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2859 lll_futex_wake_unlock.
2860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2861 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2862 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2863 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2864 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2865 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2867 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2869 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2870 Fix typo in register name.
2872 2005-08-23 Ulrich Drepper <drepper@redhat.com>
2874 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2875 Use __sigfillset. Document that sigfillset does the right thing wrt
2878 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2881 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2882 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2883 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2884 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2885 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2886 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2888 * Makefile (tests): Add tst-initializers1.
2889 (CFLAGS-tst-initializers1.c): Set.
2890 * tst-initializers1.c: New test.
2892 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2894 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2895 Make sure __flags are located at offset 48 from the start of the
2898 2005-07-02 Roland McGrath <roland@redhat.com>
2900 * Makeconfig: Comment fix.
2902 2005-07-05 Jakub Jelinek <jakub@redhat.com>
2904 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2905 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2906 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2907 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2908 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2909 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2910 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2911 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2912 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2913 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2915 2005-06-25 Jakub Jelinek <jakub@redhat.com>
2917 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2918 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2919 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2921 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2922 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2923 field. Put in sysinfo field unconditionally.
2924 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2925 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2926 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2927 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2929 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2930 * pthread_create.c (__pthread_create_2_1): Use
2931 THREAD_COPY_STACK_GUARD macro.
2932 * Makefile: Add rules to build and run tst-stackguard1{,-static}
2934 * tst-stackguard1.c: New file.
2935 * tst-stackguard1-static.c: New file.
2937 2005-06-14 Alan Modra <amodra@bigpond.net.au>
2939 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2940 Invoke CGOTSETUP and CGOTRESTORE.
2941 (CGOTSETUP, CGOTRESTORE): Define.
2943 2005-05-29 Richard Henderson <rth@redhat.com>
2945 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2946 (tf_write, tf_writev): Use it.
2947 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
2950 2005-05-23 Jakub Jelinek <jakub@redhat.com>
2952 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2953 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2954 __librt_*_asynccancel@local.
2956 2005-05-17 Alan Modra <amodra@bigpond.net.au>
2958 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2959 all occurrences of JUMPTARGET. Instead append @local to labels.
2961 2005-05-20 Jakub Jelinek <jakub@redhat.com>
2963 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2964 size/alignment of struct pthread rather than tcbhead_t.
2965 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2967 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2969 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2972 2005-05-19 Richard Henderson <rth@redhat.com>
2974 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2975 __sync_val_compare_and_swap, not explicit _si variant.
2976 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2978 2005-05-03 Ulrich Drepper <drepper@redhat.com>
2981 * sysdeps/pthread/pthread.h: Avoid empty initializers.
2983 2005-05-03 Jakub Jelinek <jakub@redhat.com>
2985 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2986 .eh_frame section, use cfi_* directives.
2988 2005-04-27 Jakub Jelinek <jakub@redhat.com>
2990 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2993 2005-04-27 Ulrich Drepper <drepper@redhat.com>
2996 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2999 2005-04-27 Roland McGrath <roland@redhat.com>
3001 * Makefile (tests): Remove tst-clock2.
3003 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3004 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3005 translating to the kernel clockid_t for our own process/thread clock.
3007 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3009 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3011 * old_pthread_cond_init.c: Include <errno.h>.
3012 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3013 process shared or uses clock other than CLOCK_REALTIME.
3014 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3016 2005-04-13 David S. Miller <davem@davemloft.net>
3018 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3019 * sysdeps/sparc/sparc64/clone.S: New file.
3021 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3024 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3025 __inline instead of inline.
3026 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3028 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3030 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3031 functionally equivalent, but shorter instructions.
3032 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3033 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3034 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3036 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3038 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3041 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3042 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3045 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3047 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3048 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3050 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3052 * sysdeps/mips/Makefile: New file.
3053 * sysdeps/mips/nptl-sysdep.S: New file.
3054 * sysdeps/mips/tcb-offsets.sym: New file.
3055 * sysdeps/mips/pthread_spin_lock.S: New file.
3056 * sysdeps/mips/pthread_spin_trylock.S: New file.
3057 * sysdeps/mips/pthreaddef.h: New file.
3058 * sysdeps/mips/tls.h: New file.
3059 * sysdeps/mips/jmpbuf-unwind.h: New file.
3060 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3061 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3062 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3063 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3064 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3065 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3066 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3067 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3068 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3069 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3071 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3074 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3077 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3079 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3081 2005-02-25 Roland McGrath <roland@redhat.com>
3083 * alloca_cutoff.c: Correct license text.
3084 * tst-unload.c: Likewise.
3085 * sysdeps/pthread/allocalim.h: Likewise.
3086 * sysdeps/pthread/pt-initfini.c: Likewise.
3087 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3088 * sysdeps/pthread/bits/sigthread.h: Likewise.
3089 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3090 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3092 2005-02-16 Roland McGrath <roland@redhat.com>
3094 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3095 Use unsigned int * for ptr_nthreads.
3097 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3100 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3103 2005-02-07 Richard Henderson <rth@redhat.com>
3106 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3109 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3111 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3112 order of arguments in invocation of atomic_add_zero.
3114 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3117 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3118 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3119 at least gotntpoff relocation and addition.
3120 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3122 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3124 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3127 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3129 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3130 entry for static tls deallocation fix.
3131 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3132 also contains information whether the memory pointed to is static
3134 * sysdeps/i386/tls.h: Likewise.
3135 * sysdeps/ia64/tls.h: Likewise.
3136 * sysdeps/powerpc/tls.h: Likewise.
3137 * sysdeps/s390/tls.h: Likewise.
3138 * sysdeps/sh/tls.h: Likewise.
3139 * sysdeps/sparc/tls.h: Likewise.
3140 * sysdeps/x86_64/tls.h: Likewise.
3142 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3144 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3146 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3148 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3150 * Makefile (tests): Add tst-align2.
3151 * tst-align2.c: New test.
3152 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3153 -mpreferred-stack-boundary=4.
3155 2004-12-18 Roland McGrath <roland@redhat.com>
3157 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3158 New file removed withdrawn for the moment.
3160 2004-12-17 Richard Henderson <rth@redhat.com>
3162 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3163 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3165 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3167 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3168 Increased PTHREAD_STACK_MIN.
3170 * tst-context1.c (stacks): Use bigger stack size.
3172 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3174 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3175 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3177 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3179 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3180 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3181 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3183 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3185 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3187 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3189 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3190 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3192 * tst-getpid1.c: If child crashes, report this first. Print which
3195 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3197 * init.c (__pthread_initialize_minimal_internal): Also unblock
3200 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3202 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3203 _POSIX_THREAD_CPUTIME): Define to 0.
3204 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3205 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3206 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3207 __timer_signal_thread_tclk): Remove.
3208 (init_module): Remove their initialization.
3209 (thread_cleanup): Remove their cleanup assertions.
3210 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3211 __timer_signal_thread_tclk): Remove.
3212 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3213 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3214 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3216 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3218 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3219 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3221 * Makefile (tests): Add tst-getpid2.
3222 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3223 (do_test): Use it. Use __clone2 instead of clone on ia64.
3224 * tst-getpid2.c: New test.
3226 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3228 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3230 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3232 * Makefile (tests): Add tst-getpid1.
3233 * tst-getpid1.c: New file.
3234 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3235 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3237 2004-12-02 Roland McGrath <roland@redhat.com>
3239 * Makefile (libpthread-nonshared): Variable removed.
3240 ($(objpfx)libpthread_nonshared.a): Target removed.
3241 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3242 These are now handled by generic magic from
3243 libpthread-static-only-routines being set.
3245 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3247 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3248 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3249 _POSIX_THREAD_PRIO_PROTECT): Define.
3250 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3251 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3252 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3254 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3256 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3257 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3258 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3259 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3260 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3261 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3262 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3264 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3266 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3268 * Makefile (libpthread-routines): Add pthread_setschedprio.
3269 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3270 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3271 * pthread_setschedprio.c: New file.
3273 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3275 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3276 * pthread_cancel.c (pthread_create): Likewise.
3278 * Makefile (libpthread-routines): Add vars.
3279 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3280 * init.c (__default_stacksize, __is_smp): Remove.
3282 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3283 and define a wrapper macro.
3284 (PTHREAD_STATIC_FN_REQUIRE): Define.
3285 * allocatestack.c (__find_thread_by_id): Undefine.
3286 * pthread_create (__pthread_keys): Remove.
3287 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3288 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3289 PTHREAD_STATIC_FN_REQUIRE.
3291 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3293 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3294 parameter to REGISTER macro.
3296 2004-11-17 Roland McGrath <roland@redhat.com>
3298 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3299 Make sure SIGCANCEL is blocked as well.
3301 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3303 * sysdeps/pthread/setxid.h: New file.
3304 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3305 (struct xid_command): Add forward decl.
3306 (struct pthread_functions): Change return type of __nptl_setxid hook
3308 * pthreadP.h (__nptl_setxid): Change return type to int.
3309 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3310 calling thread, return its return value and set errno on failure.
3311 * descr.h (struct xid_command): Change id type to long array.
3313 * Makefile: Add rules to build and test tst-setuid1 and
3315 * tst-setuid1.c: New test.
3316 * tst-setuid1-static.c: New test.
3318 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3320 * Makefile (tests): Add tst-exit3.
3321 * tst-exit3.c: New test.
3323 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3325 * Makefile (tests): Add tst-exit2.
3326 * tst-exit2.c: New file.
3328 2004-11-09 Roland McGrath <roland@redhat.com>
3331 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3332 here, before calling clone.
3333 * pthread_create.c (start_thread): Don't do it here.
3335 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3337 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3339 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3341 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3342 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3345 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3347 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3348 if sched_priority is not between minprio and maxprio.
3350 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3352 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3353 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3355 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3356 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3358 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3360 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3361 not-cancelable I/O functions.
3363 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3365 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3366 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3367 make sure 2 is stored in the futex and we looked at the old value.
3368 Fix a few other problems to return the correct value.
3370 2004-10-14 Richard Henderson <rth@redhat.com>
3372 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3375 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3377 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3378 of pthread-functions.h and pthreaddef.h.
3379 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3381 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3382 Change __data.__nwaiters from int to unsigned int.
3384 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3385 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3387 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3390 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3391 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3393 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3395 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3396 test fails, remove message queue.
3397 (tf_msgsnd): Likewise.
3399 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3401 * tst-clock1.c: Change #ifdef to #if defined.
3402 * tst-clock2.c: Likewise.
3403 * tst-cond11.c: Likewise.
3405 * sysdeps/pthread/timer_create.c (timer_create): Use
3406 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3407 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3410 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3412 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3413 _POSIX_THREAD_CPUTIME): Define to 0.
3415 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3417 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3418 and _POSIX_THREAD_CPUTIME to zero.
3419 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3420 * tst-barrier2.c: Fix testing for POSIX feature.
3421 * tst-clock1.c: Likewise.
3422 * tst-clock2.c: Likewise.
3423 * tst-cond11.c: Likewise.
3424 * tst-cond4.c: Likewise.
3425 * tst-cond6.c: Likewise.
3426 * tst-flock2.c: Likewise.
3427 * tst-mutex4.c: Likewise.
3428 * tst-mutex9.c: Likewise.
3429 * tst-rwlock12.c: Likewise.
3430 * tst-rwlock4.c: Likewise.
3431 * tst-signal1.c: Likewise.
3432 * tst-spin2.c: Likewise.
3433 * sysdeps/pthread/posix-timer.h: Likewise.
3434 * sysdeps/pthread/timer_create.c: Likewise.
3435 * sysdeps/pthread/timer_routines.c: Likewise.
3437 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3439 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3440 (__lll_mutex_timedlock_wait): Address futex correctly.
3442 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3443 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3444 make sure 2 is stored in the futex and we looked at the old value.
3445 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3446 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3447 which might very well made the code not working at all before.
3450 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3452 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3453 allow SIGSETXID to be sent.
3454 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3455 for SIGSETXID to be defined.
3456 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3457 SIGSETXID cannot be blocked.
3459 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3460 Add __extension__ to long long types.
3461 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3462 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3463 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3464 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3465 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3466 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3467 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3469 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3471 * descr.h (struct pthread): Add stopped_start field.
3472 * sysdeps/pthread/createthread.c (create_thread): Set
3473 start_stopped flag in descriptor for new thread appropriately.
3474 * pthread_create.c (start_thread): Only take lock to be stopped on
3475 startup if stopped_start flag says so.
3477 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3479 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3480 is created detached and if yes, do not try to free the stack in case
3481 the thread creation failed.
3482 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3483 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3484 case there has been no error. [BZ #405]
3486 * pthread_create.c (start_thread): Don't wait for scheduler data
3487 etc to be set at the beginning of the function. The cancellation
3488 infrastructure must have been set up. And enable async
3489 cancellation before potentially going to sleep. [BZ #401]
3491 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3493 * Versions: Remove exports for pthread_set*id_np functions.
3494 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3496 * Makefile: Don't build pthread_set*id code for now.
3498 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3500 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3502 * allocatestack.c (__nptl_setxid): New function.
3503 * descr.h (struct xid_command): Define type.
3504 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3505 (sighandler_setxid): New function.
3506 (__pthread_initialize_minimal): Register sighandler_setxid for
3508 * pt-allocrtsig.c: Update comment.
3509 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3510 Declare __nptl_setxid.
3511 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3512 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3513 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3514 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3515 and pthread_setresuid_np.
3516 * pthread_setgid_np.c: New file.
3517 * pthread_setuid_np.c: New file.
3518 * pthread_setegid_np.c: New file.
3519 * pthread_seteuid_np.c: New file.
3520 * pthread_setregid_np.c: New file.
3521 * pthread_setreuid_np.c: New file.
3522 * pthread_setresgid_np.c: New file.
3523 * pthread_setresuid_np.c: New file.
3524 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3525 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3526 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3527 and pthread_setresuid_np.
3528 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3529 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3530 pthread_setregid, and pthread_setresgid.
3532 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3534 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3535 ENOMEM when out of memory.
3537 2004-09-10 Roland McGrath <roland@redhat.com>
3540 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3541 code, since we don't try to use the broken CLONE_STOPPED any more.
3542 * pthread_create.c (start_thread): Likewise.
3544 2004-09-15 Richard Henderson <rth@redhat.com>
3546 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3548 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3550 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3551 (__libc_unwind_longjmp): Delete macro and declare as function.
3552 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3553 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3555 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3556 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3557 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3559 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3561 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3563 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3564 types also for __USE_XOPEN2K.
3565 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3566 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3567 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3568 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3569 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3570 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3571 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3574 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3576 * sysdeps/pthread/pthread.h
3577 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3578 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3579 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3580 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3583 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3585 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3586 PSEUDO to be used with . prefix.
3588 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3589 Use atomic_increment instead of atomic_exchange_and_add.
3590 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3592 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3594 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3597 * allocatestack.c (allocate_stack): Use atomic_increment_val
3598 instead of atomic_exchange_and_add.
3599 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3600 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3602 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3605 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3606 the initialization function might throw.
3608 2005-09-05 Richard Henderson <rth@redhat.com>
3610 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3611 Move definition inside libpthread, libc, librt check. Provide
3612 definition for rtld.
3614 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3616 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3617 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3618 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3619 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3620 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3621 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3622 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3623 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3626 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3627 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3628 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3630 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3631 Decrement __nwaiters. If pthread_cond_destroy has been called and
3632 this is the last waiter, signal pthread_cond_destroy caller and
3633 avoid using the pthread_cond_t structure after unlock.
3634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3636 Read clock type from the least significant bits of __nwaiters instead
3638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3639 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3641 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3644 * Makefile (tests): Add tst-cond20 and tst-cond21.
3645 * tst-cond20.c: New test.
3646 * tst-cond21.c: New test.
3647 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3648 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3650 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3652 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3653 (pthread_cond_t): Likewise.
3654 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3656 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3658 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3660 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3661 (cond_nwaiters): New.
3663 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3664 if there are waiters not signalled yet.
3665 Wait until all already signalled waiters wake up.
3666 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3667 __nwaiters. If pthread_cond_destroy has been called and this is the
3668 last waiter, signal pthread_cond_destroy caller and avoid using
3669 the pthread_cond_t structure after unlock.
3670 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3671 decrement it when leaving. If pthread_cond_destroy has been called
3672 and this is the last waiter, signal pthread_cond_destroy caller.
3673 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3674 Likewise. Read clock type from the least significant bits of
3675 __nwaiters instead of __clock.
3676 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3677 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3678 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3679 clock type just from the last COND_CLOCK_BITS bits of value.
3680 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3681 instead of __clock, just from second bit of condattr's value.
3683 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3685 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3686 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3688 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3690 2004-08-15 Roland McGrath <roland@frob.com>
3692 * pthread_atfork.c: Update copyright terms including special exception
3693 for these trivial files, which are statically linked into executables
3694 that use dynamic linking for the significant library code.
3696 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3698 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3699 pthread_rwlock_rdlock.
3700 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3701 Decrease __nr_readers_queued after reacquiring lock.
3702 * sysdeps/pthread/pthread_rwlock_timedrdlock
3703 (pthread_rwlock_timedrdlock): Likewise.
3704 Reported by Bob Cook <bobcook47@hotmail.com>.
3706 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3708 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3709 before pthread_barrier_wait.
3711 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3713 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3714 Remove unnecessary exception handling data.
3716 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3719 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3720 instead of clockid_t.
3722 2004-07-21 Roland McGrath <roland@redhat.com>
3724 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3726 2004-07-19 Roland McGrath <roland@redhat.com>
3728 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3730 2004-07-02 Roland McGrath <roland@redhat.com>
3732 * configure: Don't exit.
3734 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3736 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3737 (__pthread_cond_timedwait): Check for invalid nanosecond in
3740 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3742 * Makefile: Add rules to build and run tst-fini1.
3743 * tst-fini1.c: New file.
3744 * tst-fini1mod.c: New file.
3746 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3748 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3749 if no cancellation support is needed.
3750 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3751 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3752 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3753 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3754 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3755 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3756 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3757 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3758 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3760 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3761 only if not already defined.
3763 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3765 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3766 constraint "m" instead of "0" for futex.
3768 * shlib-versions: Add powerpc64-.*-linux.*.
3770 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3773 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3775 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3776 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3779 2004-06-29 Roland McGrath <roland@redhat.com>
3781 * Banner: NPTL no longer has its own version number.
3782 * Makefile (nptl-version): Variable removed.
3783 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3784 using $(version), the glibc version number.
3786 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3788 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3789 Fix branch offset for a PLT entry.
3790 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3792 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3794 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3796 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3799 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3801 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3804 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3806 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3807 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3809 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3810 (pthread_rwlock_timedrdlock): Likewise.
3812 2004-06-22 Jakub Jelinek <jakub@redhat.com>
3814 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3815 Set __r7 to val, not mutex.
3817 2004-06-27 Ulrich Drepper <drepper@redhat.com>
3819 * Makefile: Add rules to build tst-rwlock14.
3820 * tst-rwlock14.c: New file.
3822 2004-06-24 Boris Hu <boris.hu@intel.com>
3824 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3826 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3828 2004-06-19 Andreas Jaeger <aj@suse.de>
3830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3831 assembler in last patch.
3833 2004-06-17 Ulrich Drepper <drepper@redhat.com>
3835 * sysdeps/pthread/pthread_cond_timedwait.c
3836 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3837 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3838 (__pthread_cond_timedwait): Check for invalid nanosecond in
3840 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3841 * tst-cond19.c: New file.
3842 * Makefile: Add rules to build and run tst-cond19.
3844 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
3846 * tst-context1.c (GUARD_PATTERN): Defined.
3847 (tst_context_t): Define struct containing ucontext_t & guard words.
3848 (ctx): Declare as an array of tst_context_t.
3849 (fct): Verify uc_link & guard words are still valid.
3850 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
3852 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3854 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3855 Add __data.__futex field, reshuffle __data.__clock.
3856 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3857 (__pthread_cond_signal): Increment __futex at the same time as
3858 __wakeup_seq or __total_seq. Pass address of __futex instead of
3859 address of low 32-bits of __wakeup_seq to futex syscall.
3860 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3861 (__pthread_cond_wait): Likewise. Pass __futex value from before
3862 releasing internal lock to FUTEX_WAIT.
3863 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3864 (__pthread_cond_timedwait): Likewise.
3865 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3866 (FUTEX_CMP_REQUEUE): Define.
3867 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3868 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3869 Pass __futex value from before the unlock and __futex address instead
3870 of address of low 32-bits of __wakeup_seq to futex syscall.
3871 Fallback to FUTEX_WAKE all on any errors.
3873 2004-06-08 Jakub Jelinek <jakub@redhat.com>
3875 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3877 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3878 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3879 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3880 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3881 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
3883 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
3885 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3886 Add memory clobber to inline assembly.
3887 (__lll_mutex_trylock): Likewise.
3888 (__lll_mutex_cond_trylock): Likewise.
3890 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
3892 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3893 Pass val argument as 6th system call argument in %r7.
3895 2004-05-21 Jakub Jelinek <jakub@redhat.com>
3897 * Makefile (tests): Add tst-cond16.
3898 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3899 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3900 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3901 Add __data.__futex field, reshuffle __data.__clock.
3902 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3903 (__pthread_cond_signal): Increment __futex at the same time as
3904 __wakeup_seq or __total_seq. Pass address of __futex instead of
3905 address of low 32-bits of __wakeup_seq to futex syscall.
3906 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3907 (__pthread_cond_wait): Likewise. Pass __futex value from before
3908 releasing internal lock to FUTEX_WAIT.
3909 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3910 (__pthread_cond_timedwait): Likewise.
3911 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3912 (FUTEX_CMP_REQUEUE): Define.
3913 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3914 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3915 Pass __futex value from before the unlock and __futex address instead
3916 of address of low 32-bits of __wakeup_seq to futex syscall.
3917 Fallback to FUTEX_WAKE all on any errors.
3918 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3920 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3921 internally. Return non-zero if error, zero if success.
3922 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3923 Add __data.__futex field, reshuffle __data.__clock.
3924 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3926 (lll_futex_requeue): Add val argument, return 1 unconditionally
3928 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3929 Add __data.__futex field, reshuffle __data.__clock.
3930 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3932 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3933 internally. Return non-zero if error, zero if success.
3934 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3935 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3936 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3938 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3939 internally. Return non-zero if error, zero if success.
3940 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3941 Add __data.__futex field, reshuffle __data.__clock.
3942 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3944 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3945 internally. Return non-zero if error, zero if success.
3946 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3947 Add __data.__futex field, reshuffle __data.__clock.
3948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3949 Add __data.__futex field, reshuffle __data.__clock.
3950 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3951 Increment __futex at the same time as __wakeup_seq or __total_seq.
3952 Pass address of __futex instead of address of low 32-bits of
3953 __wakeup_seq to futex syscall.
3954 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3955 Pass __futex value from before releasing internal lock
3957 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3958 Likewise. Avoid unnecessary shadowing of variables.
3959 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3960 Set __futex to 2 * __total_seq. Pass __futex value from before the
3961 unlock and __futex address instead of address of low 32-bits of
3962 __wakeup_seq to futex_requeue macro, adjust for new return value
3964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3965 (__pthread_cond_signal): Increment __futex at the same time as
3966 __wakeup_seq or __total_seq. Pass address of __futex instead of
3967 address of low 32-bits of __wakeup_seq to futex syscall.
3968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3969 (__pthread_cond_wait): Likewise. Pass __futex value from before
3970 releasing internal lock to FUTEX_WAIT.
3971 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3972 (__pthread_cond_timedwait): Likewise.
3973 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3974 (FUTEX_CMP_REQUEUE): Define.
3975 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3976 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3977 Pass __futex value from before the unlock and __futex address instead
3978 of address of low 32-bits of __wakeup_seq to futex syscall.
3979 Fallback to FUTEX_WAKE all on any errors.
3981 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3983 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3984 Add nop to align the end of critical section.
3985 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3987 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3989 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3990 Add __broadcast_seq field.
3991 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3992 all waiters as woken with woken_seq and bump broadcast counter.
3993 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3994 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
3995 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3996 Comment typo fixes. Avoid returning -ETIMEDOUT.
3998 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4000 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4001 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4002 Reported by Kaz Kojima.
4004 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4006 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4008 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4010 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4011 __broadcast_seq with bc_seq after acquiring internal lock instead of
4014 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4016 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4019 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4020 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4021 (pthread_cond_t): Add __data.__broadcast_seq field.
4022 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4023 (FRAME_SIZE): Define.
4024 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4026 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4028 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4030 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4031 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4034 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4036 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4037 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4038 Add __broadcast_seq field.
4039 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4040 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4041 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4042 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4043 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4045 all waiters as woken with woken_seq and bump broadcast counter.
4046 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4047 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4048 __broadcast_seq field.
4049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4050 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4051 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4052 * pthread_cond_init.c: Initialize __broadcast_seq field.
4053 * Makefile (tests): Add tst-cond17 and tst-cond18.
4054 Add .NOTPARALLEL goal.
4055 * tst-cond16.c: New file. From Jakub.
4056 * tst-cond17.c: New file. From Jakub.
4057 * tst-cond18.c: New file. From Jakub.
4059 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4061 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4065 Parametrize frame size. Correct some unwind info.
4066 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4068 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4070 * tst-stack3.c: Note testing functionality beyond POSIX.
4072 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4074 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4075 Change conditional from ifdef to if.
4077 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4079 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4080 SYSDEP_CANCEL_ERROR): Define.
4083 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4085 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4087 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4089 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4091 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4093 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4094 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4095 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4096 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4098 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4100 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4101 thread has all signals blocked.
4103 2004-04-18 Andreas Jaeger <aj@suse.de>
4105 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4106 (SEM_VALUE_MAX): Add missing brace.
4108 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4110 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4112 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4113 * sysdeps/pthread/tst-mqueue8x.c: New test.
4114 * tst-cancel4.c: Update comment about message queues.
4116 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4117 return it_value { 0, 0 }.
4118 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4120 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4121 assertion for SIGEV_NONE.
4122 (thread_attr_compare): Compare all attributes, not just a partial
4125 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4127 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4129 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4131 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4132 Just use a plain number.
4133 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4134 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4135 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4136 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4137 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4138 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4139 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4141 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4143 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4145 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4147 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4149 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4150 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4151 of calling sigwaitinfo.
4153 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4155 * allocatestack.c (allocate_stack): Set reported_guardsize
4157 * pthread_getattr_np.c (pthread_getattr_np): Use
4158 reported_guardsize instead of guardsize.
4159 * descr.h (struct pthread): Add reported_guardsize field.
4161 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4163 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4165 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4169 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4171 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4172 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4173 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4174 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4175 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4177 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4178 (_POSIX_MESSAGE_PASSING): Define.
4179 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4180 (_POSIX_MESSAGE_PASSING): Define.
4181 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4182 (_POSIX_MESSAGE_PASSING): Define.
4184 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4186 * tst-context1.c (fct): Check whether correct stack is used.
4188 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4190 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4191 matching constraints for asm mem parameters.
4193 * tst-clock2.c (tf): Don't define unless needed.
4195 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4197 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4200 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4202 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4203 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4204 * pthreadP.h: Declare __nptl_deallocate_tsd.
4205 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4208 * Makefile (tests): Add tst-tsd5.
4209 * tst-tsd5.c: New file.
4211 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4213 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4214 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4215 is SHLIB_COMPAT check.
4216 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4217 (__pthread_attr_getaffinity_old): Likewise.
4218 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4219 (__pthread_getaffinity_old): Likewise.
4220 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4221 (__pthread_setaffinity_old): Likewise.
4223 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4225 * allocatestack.c (_make_stacks_executable): Call
4226 _dl_make_stack_executable first.
4228 2004-03-24 Roland McGrath <roland@redhat.com>
4230 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4231 constraint instead of "0".
4233 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4235 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4236 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4238 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4239 code to avoid warning.
4241 2004-03-24 Andreas Jaeger <aj@suse.de>
4243 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4244 (__pthread_attr_setaffinity_old): Remove const.
4246 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4248 * sysdeps/unix/sysv/linux/smp.h: New file.
4249 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4250 * init.c: Define __is_smp.
4251 (__pthread_initialize_minimal_internal): Call is_smp_system to
4252 initialize __is_smp.
4253 * pthreadP.h: Declare __is_smp.
4254 Define MAX_ADAPTIVE_COUNT is necessary.
4255 * pthread_mutex_init.c: Add comment regarding __spins field.
4256 * pthread_mutex_lock.c: Implement adaptive mutex type.
4257 * pthread_mutex_timedlock.c: Likewise.
4258 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4259 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4261 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4262 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4263 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4264 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4265 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4266 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4267 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4268 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4269 lll_mutex_cond_trylock.
4270 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4271 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4272 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4273 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4274 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4275 Define BUSY_WAIT_NOP.
4276 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4277 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4279 * tst-mutex5.c: Add support for testing adaptive mutexes.
4280 * tst-mutex7.c: Likewise.
4281 * tst-mutex5a.c: New file.
4282 * tst-mutex7a.c: New file.
4283 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4285 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4286 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4287 vgettimeofday call might destroy the content.
4289 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4292 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4293 No need to restrict type of ret. Make it int. Add comment.
4295 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4296 Remove unnecessary setne instruction.
4298 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4300 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4301 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4302 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4303 If realloc fails, break out of the loop.
4305 2004-03-20 Andreas Jaeger <aj@suse.de>
4307 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4308 (__pthread_setaffinity_old): Fix interface.
4309 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4310 (__pthread_getaffinity_old): Likewise.
4312 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4313 (__pthread_setaffinity_new): Remove duplicate declaration.
4315 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4317 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4318 the return value to a safe register.
4319 (CDISABLE): Set the function argument correctly.
4321 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4323 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4324 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4325 Rewrite so that only one locked memory operation per round is needed.
4326 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4327 (pthread_barrier_wait): After wakeup, release lock only when the
4328 last thread stopped using the barrier object.
4329 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4330 (__pthread_cond_wait): Don't store mutex address if the current
4331 value is ~0l. Add correct cleanup support and unwind info.
4332 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4333 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4334 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4335 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4336 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4337 Add correct cleanup support and unwind info.
4338 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4339 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4340 information for syscall wrappers.
4342 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4344 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4345 cpusetsize field, remove next.
4346 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4347 parameter for size of the CPU set.
4348 (pthread_setaffinity_np): Likewise.
4349 (pthread_attr_getaffinity_np): Likewise.
4350 (pthread_attr_setaffinity_np): Likewise.
4351 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4352 interface change, keep compatibility code.
4353 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4354 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4355 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4356 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4357 __pthread_getaffinity_np.
4358 * Versions: Add version for changed interfaces.
4359 * tst-attr3.c: Adjust test for interface change.
4360 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4361 increasing buffer sizes.
4362 * pthread_attr_destroy.c: Remove unused list handling.
4363 * pthread_attr_init.c: Likewise.
4365 2004-03-17 Roland McGrath <roland@redhat.com>
4367 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4368 first argument to clock_getres so we ever enable kernel timers.
4370 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4372 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4374 2004-03-12 Richard Henderson <rth@redhat.com>
4376 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4377 oldvalue from CENABLE to CDISABLE.
4379 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4381 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4382 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4383 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4384 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4386 2004-03-11 Richard Henderson <rth@redhat.com>
4388 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4389 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4390 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4392 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4394 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4395 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4396 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4398 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4400 * forward.c (__pthread_cond_broadcast_2_0,
4401 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4402 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4403 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4405 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4407 * sysdeps/sh/tcb-offsets.sym: Add PID.
4408 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4409 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4411 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4413 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4414 include <sysdep-cancel.h>, vfork is no cancellation point.
4415 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4416 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4417 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4419 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4421 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4423 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4424 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4426 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4428 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4429 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4430 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4431 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4432 of DO_CALL_VIA_BREAK. Work around a gas problem.
4434 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4435 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4436 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4437 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4438 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4439 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4441 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4442 a local register for saving old PID. Negate PID in parent upon exit.
4444 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4446 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4447 before syscall, set to the old value in the parent afterwards.
4448 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4449 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4451 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4452 before syscall, set to the old value in the parent afterwards.
4453 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4454 * sysdeps/s390/tcb-offsets.sym: Add PID.
4456 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4457 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4458 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4459 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4460 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4461 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4463 2004-03-10 Andreas Schwab <schwab@suse.de>
4465 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4466 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4467 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4469 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4471 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4472 * tst-cancel21.c (do_one_test): Likewise.
4473 Reported by Gordon Jin <gordon.jin@intel.com>.
4475 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4477 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4478 if non-zero and set to INT_MIN if zero.
4479 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4480 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4481 (SAVE_PID, RESTORE_PID): Define.
4483 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4484 Use relative path to avoid including NPTL i386/vfork.S.
4485 (SAVE_PID, RESTORE_PID): Define.
4486 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4487 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4488 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4490 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4491 * tst-vfork1.c: New test.
4492 * tst-vfork2.c: New test.
4493 * tst-vfork1x.c: New test.
4494 * tst-vfork2x.c: New test.
4496 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4498 * sysdeps/i386/tcb-offsets.sym: Add PID.
4499 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4500 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4501 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4503 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4505 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4507 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4509 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4512 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4514 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4517 * tst-once4.c: Remove unnecessary macro definition.
4519 * tst-mutex7.c (do_test): Limit thread stack size.
4520 * tst-once2.c (do_test): Likewise.
4521 * tst-tls3.c (do_test): Likewise.
4522 * tst-tls1.c (do_test): Likewise.
4523 * tst-signal3.c (do_test): Likewise.
4524 * tst-kill6.c (do_test): Likewise.
4525 * tst-key4.c (do_test): Likewise.
4526 * tst-join4.c (do_test): Likewise.
4527 * tst-fork1.c (do_test): Likewise.
4528 * tst-context1.c (do_test): Likewise.
4529 * tst-cond2.c (do_test): Likewise.
4530 * tst-cond10.c (do_test): Likewise.
4531 * tst-clock2.c (do_test): Likewise.
4532 * tst-cancel10.c (do_test): Likewise.
4533 * tst-basic2.c (do_test): Likewise.
4534 * tst-barrier4.c (do_test): Likewise.
4536 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4538 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4540 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4543 (__pthread_cond_timedwait): Optimize wakeup test.
4544 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4545 (__pthread_cond_wait): Likewise.
4546 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4547 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4550 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4552 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4553 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4554 the atomic instruction needed.
4555 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4556 (__lll_mutex_lock_wait): Likewise.
4558 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4560 * Makefile (tests): Add tst-cond14 and tst-cond15.
4561 * tst-cond14.c: New file.
4562 * tst-cond15.c: New file.
4564 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4566 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4567 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4568 needs to be implemented differently to be useful.
4570 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4572 * pthread_attr_setschedparam.c: Don't test priority against limits
4573 here. Set ATTR_FLAG_SCHED_SET flag.
4574 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4575 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4576 from parent thread to child. If attribute is used and scheduling
4577 parameters are not inherited, copy parameters from attribute or
4578 compute them. Check priority value.
4579 * pthread_getschedparam.c: If the parameters aren't known yet get
4580 them from the kernel.
4581 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4582 ATTR_FLAG_POLICY_SET flag for thread.
4583 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4584 and ATTR_FLAG_POLICY_SET.
4586 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4588 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4589 fail if stack address hasn't been set. Just return 0.
4591 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4593 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4594 libpthread for the files in this list.
4595 (CFLAGS-tst-unload): Removed.
4596 * tst-unload.c (do_test): Don't use complete path for
4599 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4602 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4604 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4605 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4606 operation per round is needed.
4607 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4608 (__lll_mutex_lock_wait): Likewise.
4610 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4612 * tst-cancel9.c (cleanup): Don't print to stderr.
4614 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4616 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4618 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4620 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4621 (__syscall_error_handler2): Call CDISABLE.
4622 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4623 (__syscall_error_handler2): Call CDISABLE.
4625 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4626 Release lock before the loop, don't reacquire it.
4628 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4630 2004-02-19 Andreas Schwab <schwab@suse.de>
4632 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4635 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4637 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4638 (pthread_barrier_wait): After wakeup, release lock only when the
4639 last thread stopped using the barrier object.
4640 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4641 (pthread_barrier_wait): Likewise.
4642 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4644 * Makefile (tests): Add tst-barrier4.
4645 * tst-barrier4.c: New file.
4647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4648 (__pthread_cond_timedwait): Perform timeout test while holding
4649 internal lock to prevent wakeup race.
4650 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4651 * sysdeps/pthread/pthread_cond_timedwait.c
4652 (__pthread_cond_timedwait): Likewise.
4653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4654 (__pthread_cond_timedwait): Likewise.
4656 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4658 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4659 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4660 * Makefile (tests): Add tst-rwlock13.
4661 * tst-rwlock13.c: New test.
4663 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4666 (__condvar_tw_cleanup): Little optimization.
4667 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4669 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4671 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4672 libpthread as "lib" parameter to SHLIB_COMPAT.
4673 (__novmx_siglongjmp): Fix typo in function name.
4674 (__novmx_longjmp): Fix typo in function name.
4676 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4678 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4681 * sysdeps/generic/pt-longjmp.c: Moved to...
4682 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4684 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4686 * Makefile (libpthread-routines): Add pt-cleanup.
4687 * pt-longjmp.c: Removed.
4688 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4689 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4690 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4691 Version longjmp, siglongjmp for GLIBC_2.3.4.
4692 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4694 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4696 * sysdeps/pthread/pthread_cond_timedwait.c
4697 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4698 Reuse code. Add __builtin_expects.
4700 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4701 (__pthread_cond_timedwait): Get internal lock in case timeout has
4702 passed before the futex syscall.
4703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4705 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4707 * allocatestack.c: Pretty printing.
4709 * sysdeps/pthread/createthread.c (create_thread): Don't add
4710 CLONE_DETACHED bit if it is not necessary.
4712 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4714 * pthread_getattr_np.c: Include ldsodefs.h.
4716 2004-01-16 Richard Henderson <rth@redhat.com>
4718 * allocatestack.c: Don't declare __libc_stack_end.
4719 * init.c (__pthread_initialize_minimal_internal): Likewise.
4720 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4722 2004-01-15 Richard Henderson <rth@redhat.com>
4724 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4725 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4726 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4727 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4728 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4729 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4730 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4731 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4733 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4735 * init.c (pthread_functions): Make array const.
4737 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4739 * allocatestack.c (__make_stacks_executable): Change interface.
4740 Check parameters. Pass parameter on to libc counterpart.
4741 * pthreadP.h: Change declaration.
4743 2004-01-13 Richard Henderson <rth@redhat.com>
4745 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4747 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4750 * sysdeps/alpha/Makefile: New file.
4751 * sysdeps/alpha/tcb-offsets.sym: New file.
4752 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4753 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4755 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4758 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4760 * Makefile (tests): Add tst-backtrace1.
4761 * tst-backtrace1.c: New test.
4763 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4765 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4766 register as second parameter to the REGISTER macro.
4767 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4768 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4769 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4770 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4771 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4772 of thread register as second parameter to REGISTER macro in 64 case.
4774 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4776 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4777 (CFLAGS-getpid.o): Defined.
4778 (CFLAGS-getpid.os): Defined.
4780 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4782 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4783 returned for main thread does not overlap with any other VMA.
4784 Patch by Jakub Jelinek.
4786 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4788 * tst-raise1.c: Include stdio.h.
4790 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4792 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4793 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4794 If pid is 0, set it to selftid.
4795 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4796 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4797 != 0, return self->tid without doing a syscall.
4798 * descr.h (struct pthread): Move pid field after tid.
4800 * Makefile (tests): Add tst-raise1.
4801 * tst-raise1.c: New file.
4803 2003-12-23 Roland McGrath <roland@redhat.com>
4805 * tst-oddstacklimit.c: New file.
4806 * Makefile (tests): Add it.
4807 (tst-oddstacklimit-ENV): New variable.
4809 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4810 value up to page size for __default_stacksize.
4812 2003-12-21 Ulrich Drepper <drepper@redhat.com>
4814 * Makefile (tests): Add tst-eintr5.
4815 * tst-eintr5.c: New file.
4817 * eintr.c (eintr_source): Prevent sending signal to self.
4819 * tst-eintr2.c (tf1): Improve error message.
4821 2003-12-20 Ulrich Drepper <drepper@redhat.com>
4823 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4824 * sysdeps/unix/sysv/linux/getpid.c: New file.
4825 * pthread_cancel.c: Add comment explaining use of PID field.
4826 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4827 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4828 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4829 temporarily to signal the field must not be relied on and updated
4831 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4832 temporarily negative.
4833 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4835 2003-12-19 Ulrich Drepper <drepper@redhat.com>
4837 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
4838 (eintr_source): If ARG != NULL, use pthread_kill.
4839 * tst-eintr1.c: Adjust for this change.
4840 * tst-eintr2.c: Likewise.
4841 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4842 * tst-eintr3.c: New file.
4843 * tst-eintr4.c: New file.
4845 2003-12-19 Jakub Jelinek <jakub@redhat.com>
4847 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4848 if CANCELSTATE_BITMASK is set.
4849 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4852 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4853 (tests-reverse): Add tst-cancel23.
4854 * tst-cancel22.c: New test.
4855 * tst-cancel23.c: New test.
4857 2003-12-18 Ulrich Drepper <drepper@redhat.com>
4859 * tst-eintr1.c: Better error messages.
4861 * Makefile (tests): Add tst-eintr2.
4862 * tst-eintr2.c: New file.
4864 2003-12-18 Jakub Jelinek <jakub@redhat.com>
4866 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4867 (CFLAGS-tst-cancelx21.c): Set.
4868 * tst-cancel21.c: New test.
4869 * tst-cancelx21.c: New test.
4871 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
4873 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4874 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
4875 * pt-longjmp.c: Include jmpbuf-unwind.h.
4876 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4877 _JMPBUF_UNWINDS. Adjust compared pointers.
4878 * init.c (__pthread_initialize_minimal_internal): Initialize
4879 pd->stackblock_size.
4880 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4881 * sysdeps/alpha/jmpbuf-unwind.h: New file.
4882 * sysdeps/i386/jmpbuf-unwind.h: New file.
4883 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4884 * sysdeps/s390/jmpbuf-unwind.h: New file.
4885 * sysdeps/sh/jmpbuf-unwind.h: New file.
4886 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4887 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4888 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4889 (_JMPBUF_CFA_UNWINDS): Remove.
4890 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4892 2003-12-12 Jakub Jelinek <jakub@redhat.com>
4894 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4895 (CFLAGS-tst-cancelx20.c): Set.
4896 * tst-cancel20.c: New test.
4897 * tst-cancelx20.c: New test.
4899 2003-12-17 Ulrich Drepper <drepper@redhat.com>
4901 * init.c (__pthread_initialize_minimal_internal): Don't treat
4902 architectures with separate register stack special here when
4903 computing default stack size.
4905 2003-12-17 Roland McGrath <roland@redhat.com>
4907 * Makefile (tst-cancelx7-ARGS): New variable.
4908 Reportd by Greg Schafer <gschafer@zip.com.au>.
4910 2003-12-17 Jakub Jelinek <jakub@redhat.com>
4912 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
4913 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4914 (tst-stack3-ENV): Set.
4915 ($(objpfx)tst-stack3-mem): New.
4916 * tst-stack3.c: New test.
4918 2003-12-10 David Mosberger <davidm@hpl.hp.com>
4920 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4921 Add unwind directives. Drop unused .regstk directive.
4922 (_fini_EPILOG_BEGINS): Add unwind directives.
4924 2003-12-11 Ulrich Drepper <drepper@redhat.com>
4926 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4927 Assume parameter is a pointer.
4928 (lll_futex_wake): Likewise.
4929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4931 (lll_futex_wake): Likewise.
4932 Reported by Boris Hu.
4933 * sysdeps/unix/sysv/linux/unregister-atfork.c
4934 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4936 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4938 2003-12-10 Ulrich Drepper <drepper@redhat.com>
4940 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4941 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4942 __rtld_lock_initialize for ld.so lock.
4943 Patch in part by Adam Li <adam.li@intel.com>.
4945 2003-12-02 David Mosberger <davidm@hpl.hp.com>
4947 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4948 in $(gnulib). Also, remove stale comment.
4950 2003-11-12 David Mosberger <davidm@hpl.hp.com>
4952 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4953 advantage of new syscall stub and optimize accordingly.
4955 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4956 from SYS_futex, to match expectations of
4957 sysdep.h:DO_INLINE_SYSCALL.
4958 (lll_futex_clobbers): Remove.
4959 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4960 (lll_futex_wake): Likewise.
4961 (lll_futex_requeue): Likewise.
4962 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4963 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4965 (__lll_mutex_lock): Likewise.
4966 (__lll_mutex_cond_lock): Likewise.
4967 (__lll_mutex_timed_lock): Likewise.
4968 (__lll_mutex_unlock): Likewise.
4969 (__lll_mutex_unlock_force): Likewise.
4971 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4972 comes before the include of <sysdep.h>.
4973 (THREAD_SELF_SYSINFO): New macro.
4974 (THREAD_SYSINFO): Likewise.
4975 (INIT_SYSINFO): New macro.
4976 (TLS_INIT_TP): Call INIT_SYSINFO.
4978 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4980 * sysdeps/pthread/createthread.c (create_thread): Use
4981 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4982 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4983 THREAD_SELF_SYSINFO instead of open code.
4984 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4985 (THREAD_SYSINFO): Likewise.
4987 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4989 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4991 2003-12-06 Ulrich Drepper <drepper@redhat.com>
4993 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4994 instead of .init. Patch by David Mosberger.
4996 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
4998 * sysdeps/pthread/configure.in: Remove broken declaration in C
4999 cleanup handling check.
5001 2003-11-30 Andreas Jaeger <aj@suse.de>
5003 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5004 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5007 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5009 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5010 * pthread_attr_destroy.c: Include shlib-compat.h.
5011 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5012 is set in iattr->flags.
5013 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5015 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5017 * Makefile (distribute): Add tst-cleanup4aux.c.
5019 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5022 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5024 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5025 pthread_cond_signal.
5027 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5028 store mutex address if the current value is ~0l.
5029 * sysdeps/pthread/pthread_cond_timedwait.c
5030 (__pthread_cond_timedwait): Likewise.
5031 * sysdeps/pthread/pthread_cond_broadcast.c
5032 (__pthread_cond_broadcast): Don't use requeue for pshared
5035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5036 (__pthread_cond_wait): Don't store mutex address if the current
5038 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5039 (__pthread_cond_timedwait): Likewise.
5040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5041 (__pthread_cond_broadcast): Don't use requeue for pshared
5044 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5045 element with ~0l for pshared condvars, with NULL otherwise.
5047 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5048 (__pthread_cond_wait): Don't store mutex address if the current
5050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5051 (__pthread_cond_timedwait): Likewise.
5052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5053 (__pthread_cond_broadcast): Don't use requeue for pshared
5056 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5057 * tst-cond12.c: New file.
5058 * tst-cond13.c: New file.
5060 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5062 * sysdeps/pthread/configure.in: Make missing forced unwind support
5065 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5067 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5069 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5071 * Makefile: Add magic to clean up correctly.
5073 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5075 * unwind.c (FRAME_LEFT): Define.
5076 (unwind_stop): Handle old style cleanups here.
5077 (__pthread_unwind): Handle old style cleanups only if
5078 !HAVE_FORCED_UNWIND.
5079 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5080 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5081 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5082 ($(objpfx)tst-cleanupx4): Likewise.
5083 * tst-cleanup4.c: New test.
5084 * tst-cleanup4aux.c: New.
5085 * tst-cleanupx4.c: New test.
5087 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5089 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5090 lll_mutex_*lock macros to skip atomic operations on some archs.
5092 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5094 * sysdeps/pthread/tst-timer.c (main): Initialize
5095 sigev2.sigev_value as well.
5097 2003-10-15 Roland McGrath <roland@redhat.com>
5099 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5101 * sysdeps/pthread/configure: Regenerated.
5103 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5105 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5106 locking macros. No distinction between normal and mutex locking
5108 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5109 Merge bits from lowlevelmutex.S we still need.
5110 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5111 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5112 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5113 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5114 new mutex implementation.
5115 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5116 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5117 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5118 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5119 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5120 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5121 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5122 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5123 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5124 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5125 symbol for entry point to avoid cancellation.
5127 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5129 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5131 (SAVE_OLDTYPE_0): Fix a typo.
5133 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5135 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5136 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5138 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5140 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5143 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5145 * Makefile (tests): Add tst-cancel19.
5146 * tst-cancel19.c: New test.
5148 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5150 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5151 restoring of the old cancellation type.
5153 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5155 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5157 2003-09-27 Wolfram Gloger <wg@malloc.de>
5159 * sysdeps/pthread/malloc-machine.h: New file
5161 2003-09-24 Roland McGrath <roland@redhat.com>
5163 * allocatestack.c (__make_stacks_executable): Don't ignore return
5164 value from _dl_make_stack_executable.
5166 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5168 * allocatestack.c (__make_stacks_executable): Also change
5169 permission of the currently unused stacks.
5171 * allocatestack.c (change_stack_perm): Split out from
5172 __make_stacks_executable.
5173 (allocate_stack): If the required permission changed between the time
5174 we started preparing the stack and queueing it, change the permission.
5175 (__make_stacks_executable): Call change_stack_perm.
5177 * Makefile: Build tst-execstack-mod locally.
5178 * tst-execstack-mod.c: New file.
5180 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5182 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5184 2003-09-23 Roland McGrath <roland@redhat.com>
5186 * tst-execstack.c: New file.
5187 * Makefile (tests): Add it.
5188 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5189 (LDFLAGS-tst-execstack): New variable.
5191 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5192 whether to use PROT_EXEC for stack mmap.
5193 (__make_stacks_executable): New function.
5194 * pthreadP.h: Declare it.
5195 * init.c (__pthread_initialize_minimal_internal): Set
5196 GL(dl_make_stack_executable_hook) to that.
5198 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5200 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5201 recommendation from AMD re avoidance of lock prefix.
5203 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5205 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5206 lll_futex_timed_wait instead of lll_futex_wait.
5207 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5208 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5209 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5210 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5211 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5212 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5213 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5214 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5215 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5216 Completely revamp the locking macros. No distinction between
5217 normal and mutex locking anymore.
5218 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5219 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5220 __lll_lock_timedwait): Fix prototypes.
5221 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5222 __lll_lock_timedwait): Likewise.
5223 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5224 macros, add __builtin_expect.
5225 (lll_mutex_timedlock): Likewise. Fix return value.
5226 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5227 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5228 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5229 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5230 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5231 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5232 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5233 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5235 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5237 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5238 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5239 operation if possible.
5241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5242 like jumping over the lock prefix.
5244 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5246 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5247 locking macros. No distinction between normal and mutex locking
5249 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5250 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5251 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5252 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5253 locking. Merge bits from lowlevelmutex.S we still need.
5254 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5255 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5256 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5257 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5258 * Makefile (routines): Remove libc-lowlevelmutex.
5259 (libpthread-rountines): Remove lowlevelmutex.
5260 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5261 for new mutex implementation.
5262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5271 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5272 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5276 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5277 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5279 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5281 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5282 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5286 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5288 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5290 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5291 in parameters of asm with output parameters.
5293 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5294 type of DECR parameter to int.
5295 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5297 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5299 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5300 guardsize for each thread.
5302 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5304 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5305 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5306 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5308 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5309 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5311 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5312 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5313 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5314 (pthread_getaffinity_np): Add hidden_def.
5316 * Makefile (tests): Add tst-attr3.
5317 * tst-attr3.c: New test.
5319 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5321 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5323 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5324 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5326 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5328 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5329 * tst-align.c: Include tst-stack-align.h.
5330 (tf, do_test): Use TEST_STACK_ALIGN macro.
5332 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5334 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5337 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5339 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5340 stack-related values for the initial thread.
5342 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5344 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5346 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5348 * pthread_mutex_lock.c: Minor code rearrangements.
5350 2003-09-05 Roland McGrath <roland@redhat.com>
5352 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5353 Instead, include ../nptl_db/db_info.c to do its magic.
5354 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5355 (__pthread_pthread_key_2ndlevel_size): Likewise.
5356 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5357 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5358 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5359 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5360 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5361 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5362 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5363 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5364 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5365 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5366 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5367 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5368 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5369 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5370 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5371 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5372 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5374 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5376 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5377 of pthread_t to be compatible with LT.
5378 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5379 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5380 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5381 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5382 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5383 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5386 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5388 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5390 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5392 * unwind-forcedunwind.c: Move to...
5393 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5394 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5395 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5396 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5397 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5398 * unwind.c: Include jmpbuf-unwind.h.
5399 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5401 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5403 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5404 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5405 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5406 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5407 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5408 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5409 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5410 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5411 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5412 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5413 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5415 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5416 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5417 * Makefile (tests): Add tst-stack2.
5418 * tst-stack2.c: New test.
5419 * tst-stack1.c: Include limits.h and sys/param.h.
5420 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5422 * pthread_condattr_setpshared.c: Include errno.h.
5423 (pthread_condattr_setpshared): Return EINVAL if pshared
5424 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5426 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5427 defined symbol for entry point to avoid cancellation.
5428 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5430 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5432 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5434 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5436 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5438 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5439 __close_nocancel, __read_nocancel, __write_nocancel,
5440 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5441 libpthread.so or librt.so, define to corresponding function
5442 without _nocancel suffix.
5443 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5444 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5445 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5447 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5449 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5451 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5452 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5454 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5455 in subsections has a symbol associated with it.
5457 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5458 defined symbol for entry point to avoid cancellation.
5459 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5461 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5463 * Makefile (tests): Add tst-tls5.
5464 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5465 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5466 ($(objpfx)tst-tls5): New.
5467 ($(objpfx)tst-tls6.out): Likewise.
5468 (tests): Depend on $(objpfx)tst-tls6.out.
5469 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5470 (do_test): Check pthread_self () return value alignment.
5471 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5472 (tf): Check pthread_self () return value alignment.
5473 * tst-tls5.c: New test.
5475 * tst-tls5mod.c: New.
5476 * tst-tls5moda.c: New.
5477 * tst-tls5modb.c: New.
5478 * tst-tls5modc.c: New.
5479 * tst-tls5modd.c: New.
5480 * tst-tls5mode.c: New.
5481 * tst-tls5modf.c: New.
5482 * tst-tls6.sh: New test.
5484 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5485 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5486 * init.c (pthread_functions): Initialize them.
5487 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5488 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5489 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5490 pthread_cond_timedwait@@GLIBC_2.3.2.
5492 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5494 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5495 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5496 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5497 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5498 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5499 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5501 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5503 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5504 _POSIX_THREAD_PRIORITY_SCHEDULING.
5505 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5507 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5509 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5510 nested function, use static inline function from libio.h.
5511 Code by Richard Henderson.
5513 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5516 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5518 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5519 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5520 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5521 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5522 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5523 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5524 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5525 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5526 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5527 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5528 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5529 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5530 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5531 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5532 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5533 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5534 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5535 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5536 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5537 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5538 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5539 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5540 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5541 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5542 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5543 * sysdeps/sparc/tls.h: New file.
5544 * sysdeps/sparc/tcb-offsets.sym: New file.
5545 * sysdeps/sparc/Makefile: New file.
5546 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5547 * init.c [__sparc__] (__NR_set_tid_address): Define.
5549 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5551 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5552 _IO_release_lock): Define.
5554 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5556 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5557 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5559 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5561 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5562 (__pthread_cleanup_class): Add missing return types of member
5565 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5567 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5568 (lll_mutex_unlock_force): Add memory barrier between store and futex
5571 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5573 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5574 tempmsg in first loop.
5576 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5578 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5579 _POSIX_THREAD_PRIORITY_SCHEDULING.
5580 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5582 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5584 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5585 (__rtld_lock_default_lock_recursive,
5586 __rtld_lock_default_unlock_recursive): Define.
5587 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5588 __rtld_lock_unlock_recursive): Define using
5589 GL(_dl_rtld_*lock_recursive).
5590 * init.c (__pthread_initialize_minimal_internal): Initialize
5591 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5592 Lock GL(_dl_load_lock) the same number of times as
5593 GL(_dl_load_lock) using non-mt implementation was nested.
5595 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5596 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5598 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5600 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5603 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5605 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5607 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5609 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5610 to first syscall error check. Move syscall error check for tkill
5611 into __ASSUME_CLONE_STOPPED #ifdef.
5613 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5615 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5616 is not defined, do explicit synchronization.
5617 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5618 is not defined also unlock pd->lock for non-debugging case in case
5620 * pthread_create.c (start_thread): Always get and release pd->lock
5621 if __ASSUME_CLONE_STOPPED is not defined.
5622 (start_thread_debug): Removed. Adjust users.
5623 * allocatestack.c (allocate_stack): Always initialize lock if
5624 __ASSUME_CLONE_STOPPED is not defined.
5625 * Makefile (tests): Add tst-sched1.
5626 * tst-sched1.c: New file.
5628 * sysdeps/pthread/createthread.c (do_clone): Only use
5629 sched_setschduler and pass correct parameters.
5631 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5633 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5634 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5635 PTHREAD_STACK_MIN in comments.
5637 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5639 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5640 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5642 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5643 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5644 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5645 (__pthread_cleanup_upto): Fix prototype.
5646 (_longjmp_unwind): Adjust caller.
5647 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5648 Change second argument to const struct pointer.
5649 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5650 * tst-sem9.c (main): Likewise.
5651 * unwind.c: Include string.h for strlen prototype.
5653 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5656 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5657 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5659 Patch by Nicholas Miell <nmiell@attbi.com>.
5661 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5663 * init.c (__pthread_initialize_minimal_internal): Initialize
5664 GL(dl_init_static_tls).
5665 * pthreadP.h (__pthread_init_static_tls): New prototype.
5666 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5668 * Makefile (tests): Add tst-tls4.
5669 (modules-names): Add tst-tls4moda and tst-tls4modb.
5670 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5671 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5673 * tst-tls4.c: New file.
5674 * tst-tls4moda.c: New file.
5675 * tst-tls4modb.c: New file.
5677 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5679 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5680 before __timer_dealloc.
5681 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5682 Don't call list_unlink.
5684 2003-07-29 Roland McGrath <roland@redhat.com>
5686 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5688 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5690 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5691 Don't reuse struct aiocb A if it failed.
5692 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5693 not just one byte, as that does not block.
5695 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5697 * sysdeps/pthread/unwind-resume.c: New file.
5698 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5699 unwind-resume in csu subdir.
5700 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5702 (librt-sysdep_routines, librt-shared-only-routines): Add
5704 * sysdeps/pthread/rt-unwind-resume.c: New file.
5705 * unwind-forcedunwind.c: New file.
5706 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5707 (libpthread-shared-only-routines): Likewise.
5708 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5709 * pthreadP.h (pthread_cancel_init): New prototype.
5710 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5712 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5713 attr argument const struct pthread_attr *.
5715 * res.c (__res_state): Return __resp.
5716 * descr.h: Include resolv.h.
5717 (struct pthread): Add res field.
5718 * pthread_create.c: Include resolv.h.
5719 (start_thread): Initialize __resp.
5720 * Makefile (tests): Add tst-_res1.
5721 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5722 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5723 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5725 * tst-_res1.c: New file.
5726 * tst-_res1mod1.c: New file.
5727 * tst-_res1mod2.c: New file.
5729 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5731 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5733 * Makefile: Define various *-no-z-defs variables for test DSOs
5734 which has undefined symbols.
5736 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5738 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5739 Retry if the stwcx fails to store once_control.
5741 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5743 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5744 pthread_attr_setaffinity.
5745 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5746 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5747 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5748 * pthread_attr_destroy.c: Free cpuset element if allocated.
5749 * pthread_create.c: Pass iattr as additional parameter to
5751 * sysdeps/pthread/createthread.c: If attribute is provided and
5752 a new thread is created with affinity set or scheduling parameters,
5753 start thread with CLONE_STOPPED.
5754 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5755 pthread_attr_setaffinity.
5756 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5759 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5761 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5763 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5765 * sysdeps/pthread/configure.in: Require CFI directives also for
5768 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5770 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5773 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5775 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5777 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5778 registers as variables. Call __pthread_mutex_unlock_usercnt.
5779 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5780 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5781 not self pointer in __writer. Compare with TID to determine
5783 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5784 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5788 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5789 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5790 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5791 macros also when compiling librt.
5793 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5795 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5796 -fasynchronous-unwind-tables.
5797 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5798 (PSEUDO): Add cfi directives.
5799 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5801 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5804 2003-07-08 Jakub Jelinek <jakub@redhat.com>
5806 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5807 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5808 * unwind.c (__pthread_unwind_next): Add hidden_def.
5809 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5811 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5812 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5813 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5815 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5816 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5818 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5819 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5820 __pthread_unregister_cancel and __pthread_unwind_next.
5822 2003-07-04 Jakub Jelinek <jakub@redhat.com>
5824 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5825 different symbol for the cancellation syscall wrapper and
5826 non-cancellation syscall wrapper.
5827 (PSEUDO_END): Define.
5829 2003-07-05 Richard Henderson <rth@redhat.com>
5831 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5832 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5833 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5834 return actual return value from the syscall, not 0.
5836 2003-07-07 Ulrich Drepper <drepper@redhat.com>
5838 * descr.h (struct pthread): Add pid field.
5839 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5840 (__reclaim_stacks): Likewise.
5841 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5842 also check for PID of the signal source.
5843 (__pthread_initialize_minimal_internal): Also initialize pid field
5844 of initial thread's descriptor.
5845 * pthread_cancel.c: Use tgkill instead of tkill if possible.
5846 * sysdeps/unix/sysv/linux/fork.c: Likewise.
5847 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5848 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5849 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5851 2003-07-05 Ulrich Drepper <drepper@redhat.com>
5853 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5854 Fix use of parameter.
5855 (__libc_cleanup_pop): Likewise.
5857 2003-07-04 Ulrich Drepper <drepper@redhat.com>
5859 * init.c (sigcancel_handler): Change parameters to match handler
5860 for SA_SIGACTION. Check signal number and code to recognize
5861 invalid invocations.
5863 2003-07-03 Roland McGrath <roland@redhat.com>
5865 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5866 Apply sizeof (struct pthread) bias to r13 value.
5868 2003-07-03 Ulrich Drepper <drepper@redhat.com>
5870 * sysdeps/pthread/configure.in: Require CFI directives.
5872 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5874 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5875 libpthread compilation.
5876 * unwind.c (__pthread_unwind): Add hidden_def.
5877 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5879 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5881 * libc-cancellation.c (__libc_cleanup_routine): Define.
5882 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5883 (__pthread_cleanup_pop): Define.
5885 2003-07-01 Richard Henderson <rth@redhat.com>
5887 * sysdeps/alpha/elf/pt-initfini.c: New file.
5888 * sysdeps/alpha/pthread_spin_lock.S: New file.
5889 * sysdeps/alpha/pthread_spin_trylock.S: New file.
5890 * sysdeps/alpha/pthreaddef.h: New file.
5891 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5892 * sysdeps/alpha/tls.h: New file.
5893 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5894 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5895 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5896 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5897 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5898 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5899 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5900 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5901 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5902 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5904 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5906 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5907 cleanup support and unwind info.
5909 2003-06-30 Ulrich Drepper <drepper@redhat.com>
5911 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5912 Use correct cleanup handler registration. Add unwind info.
5913 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5914 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5915 * tst-once3.c: Add cleanup handler and check it is called.
5916 * tst-once4.c: Likewise.
5917 * tst-oncex3.c: New file.
5918 * tst-oncex4.c: New file.
5919 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5921 2003-06-29 Ulrich Drepper <drepper@redhat.com>
5923 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5925 2003-06-27 Ulrich Drepper <drepper@redhat.com>
5927 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5928 (tf_msgsnd): Likewise.
5930 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5931 premature returns a bit more.
5933 2003-06-26 Ulrich Drepper <drepper@redhat.com>
5935 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5936 definition to the front.
5938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5939 the cleanup functions to make the names unique. Fix dwarf opcode
5941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5942 functions to make the names unique. Fix CFA offset for two blocks.
5944 2003-06-25 Ulrich Drepper <drepper@redhat.com>
5946 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5947 missing closing braces.
5948 Patch by Christophe Saout <christophe@saout.de>.
5950 2003-06-24 Roland McGrath <roland@redhat.com>
5952 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5954 2003-06-24 Ulrich Drepper <drepper@redhat.com>
5956 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5957 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5959 * pthreadP.h: Declare __find_thread_by_id.
5960 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5961 * pthread_clock_gettime.c: Allow using other thread's clock.
5962 * pthread_clock_settime.c: Likewise.
5963 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5964 * Makefile: Add rules to build and run tst-clock2.
5965 * tst-clock2.c: New file.
5967 2003-06-23 Ulrich Drepper <drepper@redhat.com>
5969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5970 to use exception-based cleanup handler.
5971 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5973 * tst-cond8.c (ch): Announce that we are done.
5975 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5977 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5978 Also test aio_suspend with timeout value.
5980 2003-06-22 Ulrich Drepper <drepper@redhat.com>
5982 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5983 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5986 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5987 (__pthread_mutex_lock_internal): Likewise.
5988 (__pthread_mutex_unlock_internal): Likewise.
5989 (__pthread_mutex_unlock_usercnt): Declare.
5990 * pthread_mutex_destroy.c: Always fail if used in any way.
5991 * pthread_mutex_init.c: Update comment.
5992 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5993 * pthread_mutex_timedlock.c: Adjust __nusers.
5994 * pthread_mutex_trylock.c: Adjust __nusers.
5995 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5996 and public interfaces are wrapper with pass additional parameter.
5997 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5999 * tst-mutex8.c: New file.
6000 * Makefile (tests): Add tst-mutex8.
6001 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6002 __pthread_mutex_unlock_usercnt.
6003 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6007 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6008 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6009 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6011 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6012 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6013 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6014 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6017 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6018 * pthread_mutex_timedlock.c: Likewise.
6019 * pthread_mutex_trylock.c: Adjust __nusers.
6020 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6021 * tst-mutex9.c: New file.
6022 * Makefile (tests): Add tst-mutex9.
6023 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6024 * sysdeps/ia64/tls.h: Likewise.
6025 * sysdeps/powerpc/tls.h: Likewise.
6026 * sysdeps/s390/tls.h: Likewise.
6027 * sysdeps/sh/tls.h: Likewise.
6028 * sysdeps/x86_64/tls.h: Likewise.
6029 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6030 Change type of __owner.
6031 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6032 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6033 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6034 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6035 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6037 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6039 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6040 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6042 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6043 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6044 instead of nr to lll_futex_wake. Only set errno and return -1
6047 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6048 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6049 return actual return value from the syscall, not 0.
6051 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6053 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6054 find a random value.
6055 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6058 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6059 compat_timer_settime.
6060 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6061 compat_timer_gettime.
6062 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6063 compat_timer_getoverrun.
6064 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6065 compat_timer_delete.
6067 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6068 error-checking mutex detect busy mutexes.
6070 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6072 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6073 Add ax to clobber list.
6074 (lll_mutex_cond_lock): Likewise.
6075 (lll_mutex_unlock): Likewise.
6076 (lll_lock): Likewise.
6077 (lll_unlock): Likewise.
6079 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6080 * tst-cancel18.c: New file.
6081 * tst-cancelx18.c: New file.
6083 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6086 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6087 * tst-cancel17.c: New file.
6088 * tst-cancelx17.c: New file.
6090 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6091 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6092 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6094 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6096 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6098 * sysdeps/pthread/createthread.c (create_thread): Set
6099 header.multiple_threads unconditionally.
6100 * allocatestack.c (allocate_stack): Likewise.
6101 * descr.h (struct pthread): Add header.multiple_threads
6103 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6104 Define for librt. #error if neither libpthread, libc nor librt.
6105 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6107 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6108 CDISABLE): Likewise.
6109 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6110 CDISABLE): Likewise.
6111 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6112 CDISABLE): Likewise.
6113 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6114 CDISABLE): Likewise. Access header.multiple_threads outside of
6115 libc and libpthread.
6116 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6118 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6119 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6121 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6123 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6124 Also test early cancellation before the thread reaches the cancellation
6127 * Makefile: Compile forward.c with exceptions.
6129 * sysdeps/unix/sysv/linux/sleep.c: New file.
6131 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6133 * Makefile: Add CFLAGS definition to compile function wrappers
6134 duplicated from libc with exceptions.
6135 * tst-cancel4.c: Also check cancellation handlers.
6137 * Makefile: Add rules to build and run tst-cancel16 and
6138 tst-cancelx16. Add missing CFLAGS definitions.
6139 * tst-cancel16.c: New file.
6140 * tst-cancelx16.c: New file.
6142 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6144 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6145 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6146 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6147 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6149 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6150 (LIBC_CANCEL_RESET): Likewise.
6151 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6152 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6154 (CFLAGS-libcrt-cancellation.c): Define.
6155 * sysdeps/pthread/librt-cancellation.c: New file.
6156 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6157 macros also when compiling librt.
6158 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6159 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6160 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6161 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6162 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6163 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6164 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6166 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6167 compat_timer_create.
6169 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6171 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6173 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6175 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6176 Add libc_hidden_def.
6178 2003-06-13 Roland McGrath <roland@redhat.com>
6180 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6181 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6183 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6185 * allocatestack.c (queue_stack): Always inline.
6186 * ptreadhP.h (__do_cancel): Likewise.
6188 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6190 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6193 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6196 (__pthread_cond_signal): Remove incorrect second addition for
6199 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6202 (__pthread_cond_signal): Use correct futex pointer in
6203 __lll_mutex_lock_wait call.
6205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6206 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6208 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6210 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6212 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6215 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6216 hand-written CFI generation code. Since ENTRY/END also initiated
6217 CFI frames this caused two CFI sets to be generated.
6219 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6221 * cleanup_routine.c: New file.
6222 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6223 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6225 * Makefile (libpthread-routines): Add cleanup_routine.
6226 Add more CFLAGS variables to compile with exceptions. Add comments
6227 why which file needs unwind tables.
6228 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6230 * tst-cancelx1.c: New file.
6231 * tst-cancelx2.c: New file.
6232 * tst-cancelx3.c: New file.
6233 * tst-cancelx4.c: New file.
6234 * tst-cancelx5.c: New file.
6235 * tst-cancelx6.c: New file.
6236 * tst-cancelx7.c: New file.
6237 * tst-cancelx8.c: New file.
6238 * tst-cancelx9.c: New file.
6239 * tst-cancelx10.c: New file.
6240 * tst-cancelx11.c: New file.
6241 * tst-cancelx12.c: New file.
6242 * tst-cancelx13.c: New file.
6243 * tst-cancelx14.c: New file.
6244 * tst-cancelx15.c: New file.
6245 * tst-cleanupx0.c: New file.
6246 * tst-cleanupx0.expect: New file.
6247 * tst-cleanupx1.c: New file.
6248 * tst-cleanupx2.c: New file.
6249 * tst-cleanupx3.c: New file.
6251 * tst-cleanup0.c: Make standard compliant.
6252 * tst-cleanup1.c: Likewise.
6254 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6255 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6256 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6257 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6258 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6259 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6260 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6262 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6263 * tst-cancel12.c: New file.
6264 * tst-cancel13.c: New file.
6265 * tst-cancel14.c: New file.
6266 * tst-cancel15.c: New file.
6267 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6270 * tst-cancel1.c: Add some comments.
6272 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6275 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6277 * Makefile (CFLAGS-pthread_cancel.c): Define.
6279 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6281 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6282 Change type of __writer element to int.
6283 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6284 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6285 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6286 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6287 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6288 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6289 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6290 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6291 Compare with TID to determine deadlocks.
6292 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6293 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6294 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6295 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6301 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6302 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6307 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6308 * Makefile (tests): Add tst-rwlock12.
6309 * tst-rwlock12.c: New file.
6311 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6313 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6314 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6315 Remove bogus hidden_proto.
6316 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6318 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6319 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6320 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6321 ___lll_mutex_timedlock): Likewise.
6323 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6326 (__pthread_cond_signal): Add some code to eventually handle
6329 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6331 * Makefile (tests): Add tst-exec4.
6332 (tst-exec4-ARGS): Define.
6333 * tst-exec4.c: New file.
6335 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6337 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6338 Also fail if tv_nsec < 0.
6339 (__lll_timedwait_tid): Likewise.
6340 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6341 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6343 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6345 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6347 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6349 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6351 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6354 * Makefile (tests): Add tst-sem8 and tst-sem9.
6355 * tst-sem8.c: New file.
6356 * tst-sem9.c: New file.
6357 * sem_open.c: Fix creation of in_use record if the file exists but
6360 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6363 * sysdeps/pthread/timer_create.c (timer_create): In case
6364 evp==NULL, assign timer ID to sival_ptr.
6366 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6367 struct pthread_unwind_buf *.
6368 (struct pthread): Likewise for cleanup_jmp_buf element.
6370 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6371 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6372 * unwind.c (__pthread_unwind_next): Likewise.
6374 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6376 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6377 (lll_futex_timed_wait): Use int for futex value parameter.
6378 (lll_futex_wake): Likewise.
6379 (lll_futex_requeue): Likewise.
6381 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6382 Replace one memory operation with one register operation.
6384 * tst-join4.c (do_test): Fix error message.
6386 * tst-rwlock6.c (do_test): Use correct format specifier.
6388 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6389 (__lll_mutex_lock_wait): Replace one memory operation with one
6391 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6392 (__lll_mutex_lock_wait): Likewise.
6394 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6395 (__lll_mutex_cond_lock): Add one to value parameter of
6396 __lll_lock_wait to reflect reality in the futex syscall.
6397 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6398 (lll_mutex_cond_lock): Likewise.
6400 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6402 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6404 (lll_mutex_cond_lock): Define.
6406 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6408 * Makefile (tests): Add tst-signal6.
6409 * tst-signal6.c: New file.
6411 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6412 (__lll_mutex_unlock_force): New function
6413 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6415 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6416 (__lll_mutex_unlock_force): New function.
6417 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6419 * tst-rwlock7.c (do_test): Use correct format specifier.
6421 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6422 Find break parameter in correct asm argument.
6424 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6426 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6428 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6430 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6432 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6433 lll_futex_requeue, lll_mutex_unlock_force): Define.
6435 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6437 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6438 (pthread_cond_t): Add __mutex.
6439 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6440 lll_futex_requeue, lll_mutex_unlock_force): Define.
6442 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6444 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6445 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6447 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6449 (lll_futex_wait, lll_futex_wake): Define.
6450 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6451 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6452 FUTEX_REQUEUE instead of FUTEX_WAIT.
6453 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6454 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6455 mutex which was used in condvar structure. Call
6456 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6457 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6460 include tcb-offsets.h. Read wakeup value in locked region.
6461 Use the value of gbr register as THREAD_ID.
6462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6463 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6466 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6469 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6471 * sysdeps/pthread/pthread_cond_broadcast.c
6472 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6474 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6477 typo in register name.
6478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6479 correctly. Actually use requeue. Little optimization.
6480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6481 mutex address early. Handle cancellation state as 32-bit value.
6482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6483 Remove unnecessary label.
6485 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6487 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6488 instead of FUTEX_WAIT.
6489 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6492 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6493 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6494 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6495 used in condvar structure. Call __pthread_mutex_cond_lock instead
6496 of __pthread_mutex_lock_internal.
6497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6499 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6500 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6502 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6503 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6504 Add pthread_mutex_cond_lock.
6505 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6506 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6507 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6508 lll_mutex_cond_lock.
6509 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6510 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6511 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6513 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6514 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6516 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6517 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6519 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6520 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6521 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6522 macro don't define aliases.
6524 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6525 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6526 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6527 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6530 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6534 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6536 * sem_open.c: Fix one endless loop. Implement correct semantics
6537 wrt opening the same semaphore more then once.
6538 * sem_close.c: Adjust for sem_open change.
6539 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6540 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6541 * Makefile (tests): Add tst-sem7.
6542 * tst-sem7.c: New file.
6544 2003-05-16 Roland McGrath <roland@redhat.com>
6546 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6547 uninitialized variable braino.
6549 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6551 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6552 test for syscall availability.
6554 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6555 __no_posix_timers to -1 if the syscalls don't exist.
6557 * pthread_join.c (pthread_join): Set tid field of the joined
6558 thread to -1. This isn't necessary but helps to recognize some
6559 error conditions with almost no cost.
6561 * allocatestack.c (FREE_P): Also negative values indicate an
6564 * unwind.c: Include <unistd.h>.
6566 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6568 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6570 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6572 * Makefile (crti-objs, crtn-objs): New variables.
6573 (omit-deps, extra-objs): Add crtn.
6574 ($(objpfx)libpthread.so): Depend on both crti and crtn
6575 and links to them in multidir.
6576 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6578 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6580 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6581 (lll_mutex_unlock): Use atomic_exchange_rel.
6583 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6585 * cond-perf.c (cons): Add missing locking around setting of alldone.
6587 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6589 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6591 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6593 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6595 * tst-sem6.c: New file.
6596 * Makefile (tests): Add tst-sem6.
6598 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6599 Use atomic_exchange_rel instead of atomic_exchange.
6600 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6603 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6604 code for lll_futex_wait and lll_futex_wake in static apps. Use
6605 vsyscall is possible.
6607 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6608 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6609 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6610 pthread_setaffinity_np.
6611 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6612 and pthread_setaffinity_np.
6613 * Makefile (libpthread-routines): Add pthread_getaffinity and
6614 pthread_setaffinity.
6616 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6617 use it in case mmap to allocate the stack fails.
6618 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6619 ARCH_MAP_FLAGS here.
6620 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6623 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6625 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6626 handler implementation. It is now lockless in fork().
6627 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6628 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6629 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6630 declare the __fork_*_lists.
6631 (struct fork_handler): Include pointers to all three functions.
6632 Add next, refcntr and need_signal elements.
6633 (__fork_handlers): New declaration.
6634 (__register_atfork_malloc): Remove declaration.
6635 (HAVE_register_atfork_malloc): Remove definition.
6636 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6637 __pthread_child_handler variable.
6638 (__libc_pthread_init): Use __register_atfork instead of explicitly
6640 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6642 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6644 * unwind.c (unwind_cleanup): Print error message and then abort. This
6645 function must never be reached.
6647 * cond-perf.c: New file.
6649 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6651 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6653 2003-05-04 Roland McGrath <roland@redhat.com>
6655 * Makefile ($(objpfx)../libc.so): New target.
6657 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6659 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6660 (pthread_condattr_t): Size is only an int, don't use long for
6662 (pthread_mutexattr_t): Likewise.
6663 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6664 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6665 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6667 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6669 * sysdeps/i386/tls.h: Define THREAD_ID.
6670 * sysdeps/ia64/tls.h: Likewise.
6671 * sysdeps/powerpc/tls.h: Likewise.
6672 * sysdeps/s390/tls.h: Likewise.
6673 * sysdeps/sh/tls.h: Likewise.
6674 * sysdeps/x86_64/tls.h: Likewise.
6675 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6677 * pthread_mutex_timedlock.c: Likewise.
6678 * pthread_mutex_trylock.c: Likewise.
6679 * pthread_mutex_unlock.c: Likewise.
6680 * pthread_rwlock_trywrlock.c: Likewise.
6681 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6682 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6683 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6684 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6686 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6689 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6692 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6693 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6694 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6695 Make __align long long instead of long.
6696 (pthread_rwlock_t): Formatting.
6697 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6698 (pthread_rwlock_t): Formatting.
6699 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6700 (pthread_cond_t): Make __align long long instead of long.
6701 (pthread_rwlock_t): Move __flags field to the same position as in
6704 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6706 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6707 * tst-rwlock7.c (do_test): Likewise.
6709 2003-04-26 Roland McGrath <roland@redhat.com>
6711 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6713 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6715 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6716 sizeof (struct pthread).
6717 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6719 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6721 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6723 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6725 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6727 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6729 (NO_TLS_OFFSET): Define.
6730 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6731 add TLS_TCB_SIZE unnecessarily.
6733 2003-04-22 Roland McGrath <roland@redhat.com>
6735 * Makeconfig (shared-thread-library): Reverse link order to work
6738 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6740 * semaphore.h: Fix typo in comment.
6742 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6744 * sysdeps/pthread/sigfillset.c: New file.
6746 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6747 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6748 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6749 * sysdeps/pthread/sigaction.c: Likewise.
6750 * sysdeps/pthread/sigprocmask.c: New file.
6751 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6753 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6754 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6757 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6759 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6760 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6762 * sysdeps/unix/sysv/linux/unregister-atfork.c
6763 (__unregister_atfork): Don't free memory not allocated dynamically.
6765 * semaphore.h: Remove __THROW marker from cancellation points.
6766 * nptl/sysdeps/pthread/pthread.h: Likewise.
6768 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6770 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6771 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6774 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6776 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6778 2003-04-15 Roland McGrath <roland@redhat.com>
6780 * forward.c (__pthread_unwind): Tweak to avoid warning.
6782 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6784 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6786 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6789 overflow CFA advance instructions.
6790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6792 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6794 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6795 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6796 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6800 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6801 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6802 DW_CFA_advance_loc for .Laddl-.Lsubl.
6804 2003-04-13 Ulrich Drepper <drepper@redhat.com>
6806 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6807 position-independent unwind data for static libraries.
6808 Add missing unwind info. Add comments.
6810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6815 2003-04-12 Ulrich Drepper <drepper@redhat.com>
6817 * Makefile: Make sure all cancellation points are compiled with
6818 exception and asynchronous unwind tables.
6820 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6821 which mishandles loading of global object addresses in PIC.
6822 (THREAD_SETMEM_NC): Likewise.
6824 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6826 * pthread.h: Define new data structure for cleanup buffer. Declare
6827 new cleanup handler interfaces.
6828 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
6829 (struct pthread): Add cleanup_jmp_buf pointer. Define
6830 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6831 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
6832 it. Declare old cleanup handler installation functions.
6833 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
6835 * cleanup_defer.c: Likewise.
6836 * cleanup_compat.c: New file. Old cleanup code.
6837 * cleanup_def_compat.c: New file. Old cleanup code.
6838 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6839 if own thread descriptor.
6840 * unwind.c: New file.
6841 * forward.c: Add __pthread_unwind.
6842 * init.c (pthread_functions): Add __pthread_unwind.
6843 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6844 Add ptr___pthread_unwind.
6845 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6846 and unwind function.
6847 * Makefile (libpthread-routines): Add cleanup_compat,
6848 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
6849 table generation if necessary.
6850 * version.c: Record whether unwind support is compiled in.
6851 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6852 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6854 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6855 complication to generate unwind information for syscall wrappers.
6856 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6857 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6858 __cleanup_fct_attribute.
6860 * Makefile: Add rules to build and run tst-cleanup0.
6861 * tst-cleanup0.c: New file.
6862 * tst-cleanup0.expect: New file.
6864 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
6865 caller. Optimize to avoid often unecessary local variable.
6867 2003-04-11 Roland McGrath <roland@redhat.com>
6869 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6870 sets variable `multidir'; include that.
6871 (generated): Add it.
6872 ($(objpfx)$(multidir)/crti.o): New target.
6873 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6875 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6877 * tst-attr2.c (do_test): Add cast to avoid warning.
6878 * tst-mutex4.c (do_test): Likewise.
6880 2003-04-10 Ulrich Drepper <drepper@redhat.com>
6882 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6885 2003-04-09 Ulrich Drepper <drepper@redhat.com>
6887 * Makefile (tests): Add tst-detach1.
6888 * tst-detach1.c: New file.
6890 2003-04-08 Ulrich Drepper <drepper@redhat.com>
6892 * sysdeps/pthread/pthread.h: Remove duplicate
6893 pthread_cleanup_{push,pop} definitions.
6895 * tst-barrier2.c: Eliminate warnings.
6896 * tst-cancel4.c: Likewise.
6897 * tst-cond4.c: Likewise.
6898 * tst-cond6.c: Likewise.
6899 * tst-detach1.c: Likewise.
6900 * tst-rwlock4.c: Likewise.
6901 * tst-rwlock6.c: Likewise.
6902 * tst-rwlock7.c: Likewise.
6903 * tst-sem3.c: Likewise.
6904 * tst-spin2.c: Likewise.
6905 * tst-umask1.c: Likewise.
6907 2003-04-07 Ulrich Drepper <drepper@redhat.com>
6909 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6911 2003-04-06 Ulrich Drepper <drepper@redhat.com>
6913 * descr.h (struct pthread): Move cancelhandling member to the front.
6915 2003-04-05 Ulrich Drepper <drepper@redhat.com>
6917 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6918 malloc_parent, and malloc_child statically.
6919 (__register_atfork_malloc): New function.
6920 (free_mem): Don't free any of the malloc_* variables on the list.
6921 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6922 Define HAVE_register_atfork_malloc.
6924 2003-04-04 Ulrich Drepper <drepper@redhat.com>
6926 * sysdeps/pthread/createthread.c (create_thread): Add some more
6927 comments explaining when to set multiple_threads and when not.
6929 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6930 THREAD_ATOMIC_BIT_SET if not already defined.
6931 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6932 THREAD_ATOMIC_BIT_SET:
6933 * sysdeps/x86_64/tls.h: Likewise.
6934 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6935 THREAD_ATOMIC_CMPXCHG_VAL.
6936 (_pthread_cleanup_pop_restore): Likewise.
6937 * cancellation.c (__pthread_enable_asynccancel): Likewise.
6938 (__pthread_enable_asynccancel_2): Likewise.
6939 (__pthread_disable_asynccancel): Likewise.
6940 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6941 (__libc_disable_asynccancel): Likewise.
6942 * init.c (sigcancel_handler): Likewise.
6943 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6944 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6946 2003-04-03 Ulrich Drepper <drepper@redhat.com>
6948 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6949 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6950 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6951 * Makefile (tests): Add tst-cancel11.
6952 * tst-cancel11.c: New file.
6954 2003-04-01 Ulrich Drepper <drepper@redhat.com>
6956 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6957 round, not the first. Use specific_used flag instead of local
6958 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
6959 (__free_tcb): Don't call deallocate_tsd here.
6960 (start_thread): Call deallocate_tsd here.
6961 * pthread_setspecific.c: Set specific_used flag really only when
6963 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6964 * tst-tsd3.c: New file.
6965 * tst-tsd4.c: New file.
6967 2003-03-31 Ulrich Drepper <drepper@redhat.com>
6969 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6970 Use atomic_exchange_and_add instead of __lll_add.
6971 (__lll_mutex_timedlock): Likewise.
6972 Patch by Ian Wienand.
6974 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
6976 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6977 (SINGLE_THREAD_P): Fix typo.
6978 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6980 2003-03-31 Ulrich Drepper <drepper@redhat.com>
6982 * Makefile (tests): Add tst-align.
6983 * tst-align.c: New file.
6984 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6986 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6989 * tst-tsd2.c: Add casts to avoid warnings.
6991 2003-03-30 Ulrich Drepper <drepper@redhat.com>
6993 * descr.h (struct pthread): Move most often used elements to the front.
6995 2003-03-29 Ulrich Drepper <drepper@redhat.com>
6997 * Makefile (libpthread-routines): Add pthread_atfork.
6998 (libpthread-static-only-routines): Add pthread_atfork.
7000 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7002 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7004 (INSTALL_DTV): Add parens.
7005 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7006 Use passed descr instead of THREAD_SELF.
7007 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7008 (__lll_mutex_timedlock_wait): Correct expected value after
7010 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7011 Release lock before waking up the waiters.
7012 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7013 criteria. Reorderstruct passed to cleanup handler. Fix
7014 handling of cancellation and failung pthread_mutex_unlock call.
7015 Use __pthread_enable_asynccancel_2 instead of
7016 __pthread_enable_asynccancel.
7017 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7018 Return result of lock re-get if it fails.
7019 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7020 for __pthread_cleanup_push.
7021 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7022 completely broken rwlock implementation.
7023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7025 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7026 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7027 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7028 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7029 versioned_symbol macro.
7030 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7031 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7033 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7035 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7036 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7038 (struct timer): Remove th and bar field.
7039 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7040 debugging code. Create only one helper thread.
7041 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7043 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7044 Renamed. Define statically. Use thread info from siginfo.
7045 (__helper_once): New variable.
7046 (__helper_tid): New variable.
7047 (__reset_helper_control): New function.
7048 (__start_helper_thread): New function.
7050 * pthread_create.c (start_thread): Don't use setjmp inside
7051 __builtin_expect to work around gcc bug.
7053 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7054 timer_delete syscall fails, but not with ENOSYS, set
7057 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7058 (timer_settime): Fix typo.
7059 * sysdeps/unix/sysv/linux/timer_getoverr.c
7060 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7062 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7065 offset of cleanupbuf.__prev.
7067 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7069 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7072 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7074 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7075 NULL provide default definition to syscall.
7077 2003-03-25 Roland McGrath <roland@redhat.com>
7079 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7080 (timer_id2ptr): Fix typo.
7082 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7084 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7085 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7086 * sysdeps/ia64/pthreaddef.h: Likewise.
7087 * sysdeps/powerpc/pthreaddef.h: Likewise.
7088 * sysdeps/s390/pthreaddef.h: Likewise.
7089 * sysdeps/sh/pthreaddef.h: Likewise.
7090 * sysdeps/x86_64/pthreaddef.h: Likewise.
7091 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7092 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7094 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7095 SIGTIMER is not unblocked.
7096 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7098 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7100 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7101 pass pointer through as ID.
7102 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7103 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7104 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7105 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7106 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7107 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7108 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7109 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7110 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7111 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7112 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7113 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7114 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7115 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7116 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7117 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7118 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7119 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7120 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7121 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7122 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7123 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7124 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7125 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7126 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7127 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7128 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7129 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7130 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7131 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7132 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7133 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7134 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7136 * pthreadP.h: Remove FRAME_LEFT definition.
7137 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7138 already left frame. Programs which have this problem are not POSIX
7140 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7142 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7144 * sysdeps/pthread/tst-timer.c: Check return values of the
7147 2003-03-23 Roland McGrath <roland@redhat.com>
7149 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7150 * tst-tls3mod.c: Likewise.
7151 * tst-tls1.c: Likewise.
7152 * tst-tls2.c: Likewise.
7154 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7157 * tst-join5.c (tf1, tf2): Add a cast.
7159 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7161 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7162 Don't test anything.
7163 * tst-cond4.c: Likewise.
7164 * tst-cond6.c: Likewise.
7165 * tst-flock2.c: Likewise.
7166 * tst-mutex4.c: Likewise.
7167 * tst-rwlock4.c: Likewise.
7168 * tst-signal1.c: Likewise.
7169 * tst-spin2.c: Likewise.
7170 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7172 * tst-mutex4.c: Use test-skeleton.c.
7173 * tst-spin2.c: Likewise.
7174 * tst-sysconf.c: Likewise.
7175 * tst-barrier2.c: Likewise.
7176 * tst-cond4.c: Likewise.
7177 * tst-cond6.c: Likewise.
7178 * tst-rwlock4.c: Likewise.
7179 * tst-unload.c: Likewise.
7180 * tst-flock2.c (do_test): Use return instead of exit.
7182 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7184 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7186 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7188 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7189 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7190 instead of __lll_compare_and_swap.
7191 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7193 Removed definition if __lll_compare_and_swap.
7195 * cancellation.c: Adjust for new form of compare&exchange macros.
7196 * cleanup_defer.c: Likewise.
7198 * libc-cancellation.c: Likewise.
7199 * old_pthread_cond_broadcast.c: Likewise.
7200 * old_pthread_cond_signal.c: Likewise.
7201 * old_pthread_cond_timedwait.c: Likewise.
7202 * old_pthread_cond_wait.c: Likewise.
7203 * pthread_cancel.c: Likewise.
7204 * pthread_create.c: Likewise.
7205 * pthread_detach.c: Likewise.
7206 * pthread_join.c: Likewise.
7207 * pthread_key_delete.c: Likewise.
7208 * pthread_setcancelstate.c: Likewise.
7209 * pthread_setcanceltype.c: Likewise.
7210 * pthread_timedjoin.c: Likewise.
7211 * pthread_tryjoin.c: Likewise.
7212 * sysdeps/pthread/createthread.c: Likewise.
7214 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7216 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7217 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7218 definitions. Replace uses with calls to atomic_* functions.
7219 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7220 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7221 __lll_test_and_set calls with atomic_exchange_and_add and
7222 atomic_exchange calls respectively.
7223 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7224 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7225 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7226 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7227 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7228 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7229 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7231 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7232 returns the old value.
7234 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7236 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7237 int for variable OLDVAL and correct inline assembler contraint.
7238 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7239 type int for variable OLD.
7241 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7243 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7244 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7245 instead of multiple_threads field in the TCB.
7247 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7249 * sysdeps/i386/i686/bits/atomic.h: Removed.
7250 * sysdeps/i386/i586/bits/atomic.h: Removed.
7251 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7252 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7253 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7254 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7255 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7256 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7257 * atomic.h: Removed. Moved to glibc.
7259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7260 support for clock selection.
7262 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7265 2003-03-18 Roland McGrath <roland@redhat.com>
7267 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7268 Add __lll_rel_instr first. Add memory clobber.
7269 (lll_mutex_unlock): Use __lll_test_and_set.
7270 From Paul Mackerras <paulus@samba.org>.
7272 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7274 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7275 (SINGLE_THREAD_P): Add `header.' prefix.
7276 From Paul Mackerras <paulus@samba.org>.
7278 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7279 pthread_timedjoin_np to ...
7280 (libpthread: GLIBC_2.3.3): ... here.
7281 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7283 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7284 Avoid shadowing VAL variable.
7286 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7289 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7291 * Makefile (tests): Add tst-cond11.
7292 * tst-cond11.c: New file.
7294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7295 struct passed to cleanup handler to eliminate one more
7297 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7299 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7300 (pthrad_cond_t): Replace __unused field with __clock.
7302 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7303 waken all waiters in cleanup handler.
7304 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7307 * pthread_condattr_getclock.c: New file.
7308 * pthread_condattr_setclock.c: New file.
7309 * sysdeps/pthread/pthread.h: Declare these new functions.
7310 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7311 * Makefile (libpthread-routines): Add the new functions.
7312 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7313 Renamed field to value. Document use of the bits.
7314 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7316 * pthread_condattr_setpshared.c: Likewise.
7317 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7318 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7319 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7321 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7322 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7323 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7324 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7326 Implement clock selection.
7327 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7328 * pthread-errnos.sym: Add ENOSYS.
7329 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7330 _POSIX_CLOCK_SELECTION.
7331 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7334 invalid .size directive.
7336 2003-03-17 Roland McGrath <roland@redhat.com>
7338 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7341 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7343 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7344 Use __lll_add instead of spelling it out. Use protected symbol names.
7345 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7347 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7348 Renamed from lll_compare_and_swap. Use new name where necessary.
7349 (__lll_add): Defined.
7350 (__lll_dec_if_positive): Defined.
7351 (__lll_test_and_set): Defined.
7352 * sysdeps/ia64/pthread_spin_init.c: Removed.
7353 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7354 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7355 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7356 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7357 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7358 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7359 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7360 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7361 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7362 __sync_lock_release_si.
7363 Patch by Jakub Jelinek.
7365 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7366 Fix timeout handling.
7367 (__lll_timedwait_tid): Likewise.
7368 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7369 Patch by Jakub Jelinek.
7371 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7373 2003-03-17 Roland McGrath <roland@redhat.com>
7375 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7376 * sysdeps/pthread/pthread_spin_init.c: New file.
7377 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7378 * sysdeps/powerpc/Makefile: New file.
7379 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7380 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7381 * sysdeps/powerpc/pthreaddef.h: New file.
7382 * sysdeps/powerpc/tcb-offsets.sym: New file.
7383 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7384 * sysdeps/powerpc/tls.h: New file.
7385 * sysdeps/powerpc/bits/atomic.h: New file.
7386 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7387 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7388 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7390 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7391 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7392 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7393 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7394 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7395 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7396 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7397 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7398 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7399 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7400 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7401 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7402 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7403 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7404 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7406 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7408 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7409 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7410 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7411 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7412 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7414 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7416 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7417 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7420 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7422 2003-03-16 Roland McGrath <roland@redhat.com>
7424 * tst-fork4.c: Include <string.h>.
7425 * tst-signal2.c: Likewise.
7426 * tst-mutex5.c (do_test): exit -> return.
7427 * tst-mutex2.c: Include <stdlib.h>.
7429 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7431 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7432 (__lll_mutex_timedlock_wait): Correct expected value after
7433 spurious wakeup. Otherwise we would never wait again.
7435 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7436 zone versus inline asm stupidity. Use correct instructions.
7438 * tst-rwlock6.c: Add some more status output.
7440 2003-03-15 Roland McGrath <roland@redhat.com>
7442 * sysdeps/pthread/configure.in: New file.
7443 * sysdeps/pthread/configure: New file (generated).
7445 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7447 * allocatestack.c (allocate_stack): Store the exact stack size of
7448 user allocated stacks.
7450 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7452 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7453 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7454 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7455 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7456 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7457 Use `header.' prefix.
7458 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7460 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7462 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7463 __builtin_frame_address, use stack pointer.
7465 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7466 instead of __builtin_frame_pointer.
7468 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7470 * tst-basic1.c (do_test): Add cast to avoid warning.
7471 * tst-basic2.c (do_test): Likewise.
7473 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7474 amount of stack correction.
7476 * tst-fork4.c: Use test-skeleton.c.
7478 2003-03-14 Roland McGrath <roland@redhat.com>
7480 * init.c: Fix typo "#eli" for "#else".
7482 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7484 * allocatestack.c (__stack_user): Use hidden_data_def.
7485 * pthread_create.c (__pthread_keys): Likewise.
7487 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7489 2003-03-14 Roland McGrath <roland@redhat.com>
7491 * tst-fork4.c: New file.
7492 * Makefile (tests): Add it.
7494 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7495 we always define the padding space.
7496 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7497 stopped supporting its own extensions fully.
7498 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7499 struct also called `header', so `header.multiple_threads' is the field
7500 name to use on all machines.
7501 * allocatestack.c (allocate_stack): Use `header.' prefix.
7502 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7503 * pthread_create.c (__pthread_create_2_1): Likewise.
7504 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7505 (THREAD_SELF): Likewise.
7506 * sysdeps/x86_64/tls.h: Likewise.
7507 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7508 (SINGLE_THREAD_P): Likewise.
7509 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7510 (SINGLE_THREAD_P): Likewise.
7511 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7512 (SINGLE_THREAD_P): Likewise.
7514 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7517 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7519 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7520 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7522 * pthread_create.c (start_thread): setjmp is expected to return 0.
7524 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7525 (THREAD_GETMEM_NC): Likewise.
7527 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7529 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7530 and the size of the stack which must be allocated is a multiple,
7531 allocate one more page.
7532 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7533 MULTI_PAGE_ALIASING.
7535 2003-03-13 Roland McGrath <roland@redhat.com>
7537 * pthread_create.c (start_thread): Set EXITING_BIT after the
7538 event-reporting (and destructors), not before.
7540 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7542 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7543 lll_futex_wake): Declare register variables as long int instead of
7544 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7545 Make syscall arguments clobbered by the syscall.
7546 (lll_futex_wait): Define using lll_futex_timed_wait.
7548 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7551 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7554 * allocatestack.c (nptl_ncreated): Only declare if
7555 COLORING_INCREMENT != 0.
7557 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7558 (__libc_enable_asynccancel_2): Remove prototype.
7560 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7561 ctid to match kernel.
7563 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7565 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7566 libc_multiple_threads.
7567 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7568 __libc_multiple_threads to...
7569 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7571 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7573 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7574 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7576 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7577 (__pthread_once_internal): Define.
7579 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7580 macros instead of .symver directly.
7581 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7582 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7584 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7585 * sysdeps/x86_64/tcb-offsets.sym: New file.
7586 * sysdeps/x86_64/Makefile: New file.
7588 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7589 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7590 to access own pthread_t in TCB.
7591 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7597 2003-03-12 Roland McGrath <roland@redhat.com>
7599 * pthread-errnos.sym: New file.
7600 * Makefile (gen-as-const-headers): New variable, list that file.
7601 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7602 header <pthread-errnos.h> instead of defining errno values here.
7603 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7604 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7605 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7607 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7611 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7613 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7614 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7615 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7616 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7618 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7619 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7620 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7621 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7622 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7623 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7624 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7625 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7626 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7628 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7629 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7630 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7631 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7632 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7633 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7634 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7635 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7636 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7637 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7639 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7640 CLONE_CHILD_SETTID worked.
7642 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7644 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7646 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7649 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7650 (pthread_cond_t): Add padding.
7652 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7653 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7654 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7656 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7657 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7659 (__pthread_rwlock_timedrdlock): Likewise.
7660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7661 (__pthread_rwlock_wrlock): Likewise.
7662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7663 (__pthread_rwlock_rdlock): Likewise.
7665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7668 result of lock re-get if it fails.
7670 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7673 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7674 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7677 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7678 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7679 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7680 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7681 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7683 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7684 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7686 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7687 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7688 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7689 (create_thread): Likewise.
7690 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7691 * init.c (__pthread_initialize_minimal_internal): Initialize
7692 __libc_multiple_threads_ptr if necessary.
7693 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7694 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7695 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7696 __libc_multiple_threads.
7697 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7700 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7701 (THREAD_SETMEM_NC): Likewise.
7703 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7704 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7705 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7706 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7708 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7709 Eliminate one entire instruction.
7711 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7712 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7713 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7714 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7715 instead of __pthread_enable_asynccancel.
7716 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7717 (__pthread_cond_wait): Likewise.
7718 * sysdeps/pthread/pthread_cond_timedwait.c
7719 (__pthread_cond_timedwait): Likewise.
7720 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7723 (__condvar_cleanup): Wake up all waiters in case we got signaled
7724 after being woken up but before disabling asynchronous
7726 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7728 (__condvar_cleanup): Likewise.
7730 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7731 Make it an error if architecture has no #if case. Add x86-64.
7733 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7734 pt-initfini.s generation.
7736 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7737 (TLS_INIT_TP): Fix typo.
7739 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7741 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7742 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7744 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7745 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7746 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7747 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7748 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7749 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7750 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7751 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7753 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7755 * sysdeps/pthread/pthread_cond_timedwait.c
7756 (__pthread_cond_timedwait): Return the result of the final
7757 locking. If it succeeds, the regular function return value.
7759 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7760 Return result of the final locking.
7761 * version.c (__nptl_main): Work around problems with the strange
7762 INTERNAL_SYSCALL macro on ppc32.
7763 * init.c (__pthread_initialize_minimal_internal): Unblock
7764 SIGCANCEL in case the parent blocked it.
7765 Reported by Paul Mackerras <paulus@samba.org>.
7767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7769 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7771 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7773 * sysdeps/pthread/pthread_cond_timedwait.c
7774 (__pthread_cond_timedwait): Unlock and fail if
7775 __pthread_mutex_unlock_internal failed.
7777 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7778 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7780 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7781 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7782 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7783 ALLOCATE_STACK): New macros.
7784 (TLS_TPADJ): New macro.
7785 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7786 (allocate_stack): Handle TLS_DTV_AT_TP and
7787 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7788 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7790 * init.c [__ia64__] (__NR_set_tid_address): Define.
7792 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7793 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7794 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7795 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7796 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7797 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7799 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7800 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7801 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7802 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7803 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7804 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7805 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7806 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7807 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7808 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7809 * sysdeps/ia64/bits/atomic.h: New file.
7810 * sysdeps/ia64/Makefile: New file.
7811 * sysdeps/ia64/pthread_spin_init.c: New file.
7812 * sysdeps/ia64/pthread_spin_lock.c: New file.
7813 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7814 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7815 * sysdeps/ia64/pthreaddef.h: New file.
7816 * sysdeps/ia64/tcb-offsets.sym: New file.
7817 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7818 * sysdeps/ia64/tls.h: New file.
7820 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7821 to syscall instead of no arguments.
7823 2003-03-10 Ulrich Drepper <drepper@redhat.com>
7825 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7826 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7827 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7828 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7830 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7833 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7835 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7836 lowlevelbarrier.sym.
7837 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7838 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7839 Include lowlevelbarrier.h and don't define offsets locally.
7840 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7843 (__lll_mutex_lock_wait): Reverse order of first two parameters.
7844 (__lll_mutex_timedlock_wait): Likewise.
7845 (lll_mutex_lock): Adjust asm for that.
7846 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
7847 (lll_lock): Adjust asm for operand order change.
7848 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7849 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7851 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7852 Reverse order of parameters.
7853 (__lll_timedwait_tid): Remove regparms attribute.
7854 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7855 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7857 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7858 (__lll_timedwait_tid): Remove one unnecessary instruction.
7860 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7861 __lll_mutex_timedlock_wait only for NOT_IN_libc.
7862 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7865 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7866 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7868 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7871 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7872 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
7874 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7875 define LOCK here (if UP is not defined). The actual code is in
7878 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7879 LOCK is already defined. Don't define lll_unlock_wake_cb and
7880 __lll_timedwait_tid for libc.so.
7881 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7882 define LOCK here (if UP is not defined). The actual code is in
7885 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7886 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7887 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7888 instead of lowlevelsem.h.
7889 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7890 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7891 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7893 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7895 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7896 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7897 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7901 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7906 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7907 of __libc_locking_needed.
7908 (lll_trylock): Initialize %eax to zero.
7910 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7911 pthread_cond_t definition.
7913 2003-03-10 Roland McGrath <roland@redhat.com>
7915 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7916 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7917 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7918 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7919 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7921 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7922 Instead of setting PD->multiple_threads, set globals
7923 __pthread_multiple_threads and __libc_multiple_threads.
7924 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7925 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7926 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7928 * descr.h (struct pthread): Conditionalize first member on
7929 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
7930 containing an anonymous tcbhead_t. Move `list' member out.
7931 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7932 * allocatestack.c: Remove use of `header.data.' prefix.
7933 * pthread_create.c: Likewise.
7934 * init.c (__pthread_initialize_minimal_internal): Likewise.
7935 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7936 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7937 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7938 * sysdeps/x86_64/tls.h: Likewise.
7939 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7940 (SINGLE_THREAD_P): Likewise.
7941 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7942 (SINGLE_THREAD_P): Likewise.
7943 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7944 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7946 2003-03-09 Ulrich Drepper <drepper@redhat.com>
7948 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7950 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7951 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7953 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7954 leftovers from the ia32 code.
7956 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7958 (clear_once_control): Don't load %esi.
7960 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7963 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7965 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7966 * sysdeps/unix/sysv/linux/createthread.c: ...here.
7968 * Makefile (tests): Add tst-cond10.
7969 * tst-cond10.c: New file.
7971 2003-03-08 Ulrich Drepper <drepper@redhat.com>
7973 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7974 * tst-signal3.c (do_test): Likewise.
7975 * tst-sem5.c (do_test): Likewise.
7976 * tst-kill6.c (do_test): Likewise.
7977 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
7979 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7981 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7982 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7983 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7984 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7986 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7989 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7994 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7996 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7997 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7998 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8000 * allocatestack.c (allocate_stack): If mprotect() fails free the
8003 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8007 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8008 lll_wake_tid. This was used only to work around kernel limits in
8010 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8011 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8012 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8013 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8015 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8016 (__pthread_initialize_minimal_internal): Change initialization of
8017 __static_tls_align_m1 appropriately.
8018 * pthreadP.h (__static_tls_align_m1): Renamed from
8020 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8021 instead of __static_tls_align-1.
8023 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8025 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8027 * pthread_create.c: Define __pthread_keys using nocommon
8028 attribute, not by placing it explicitly in bss.
8029 Remove DEFINE_DEALLOC definition. Not needed anymore.
8031 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8032 Use it in mmap call to allocate stacks.
8034 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8036 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8037 result of the thread function.
8039 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8041 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8042 version is just fine.
8044 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8045 (__pthread_child_handler): Renamed from pthread_child_handler,
8046 exported, and marked hidden. Change all users.
8047 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8048 free __pthread_child_handler from child list.
8050 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8052 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8054 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8055 Fix handling of cancellation and failing pthread_mutex_unlock call.
8056 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8057 (__pthread_cond_wait): Likewise.
8059 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8060 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8061 lll_futex_timed_wait call.
8062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8063 (pthread_rwlock_timedwrlock): Likewise.
8065 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8066 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8067 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8069 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8070 check of lll_futex_wake return value.
8072 2003-03-03 Roland McGrath <roland@redhat.com>
8074 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8076 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8077 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8078 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8080 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8082 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8083 error for CPU clocks.
8085 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8086 _POSIX_MONOTONIC_CLOCK.
8087 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8089 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8092 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8094 * descr.h (struct pthread): Move cleanup field to the front.
8096 2003-03-01 Roland McGrath <roland@redhat.com>
8098 * sem_open.c (sem_open): Braino fix.
8100 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8102 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8104 __pthread_cleanup_pop functionality.
8105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8107 * descr.h (struct pthread): Move tid field to the front now that
8110 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8111 (__lll_mutex_timedlock_wait): Remove.
8112 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8113 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8114 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8115 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8116 (lll_unlock_wake_cb): Don't save and restore %esi.
8117 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8119 (__lll_timedwait_tid): Add alignment.
8120 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8121 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8123 (__lll_timedwait_tid): Removed.
8124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8125 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8126 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8127 (pthread_barrier_wait): Don't save, load, and restore %esi for
8129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8130 (__pthread_cond_signal): Don't save, load, and restore %esi.
8131 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8132 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8133 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8134 Don't save, load, and restore %esi.
8136 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8139 Release lock before waking up the waiters.
8141 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8143 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8144 (reader_thread): Likewise.
8146 * sysdeps/pthread/pthread_rwlock_unlock.c
8147 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8148 to wake up readers if there are none.
8150 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8151 Release internal lock before wake threads.
8153 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8155 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8156 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8158 * tst-rwlock9.c: Likewise.
8159 * tst-rwlock10.c: New file.
8160 * tst-rwlock11.c: New file.
8162 * Makefile (tests): Add tst-dlsym1.
8163 * tst-dlsym1.c: New file.
8165 * init.c (__pthread_initialize_minimal_internal): Set
8166 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8167 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8169 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8171 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8173 * tst-cond2.c: Fix sychronization with child.
8175 * tst-rwlock8.c (reader_thread): Remove unused variable.
8177 * Makefile: Add rules to build and run tst-tls3.
8178 * tst-tls3.c: New file.
8179 * tst-tls3mod.c: New file.
8181 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8182 * tst-rwlock8.c: New file.
8183 * tst-rwlock9.c: New file.
8184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8185 complete broken rwlock implementation.
8186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8188 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8190 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8192 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8193 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8194 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8195 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8196 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8198 2003-02-23 Roland McGrath <roland@redhat.com>
8200 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8202 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8204 * Makefile (tests): Add tst-context1.
8205 * tst-context1.c: New file.
8207 * Makefile (tests): Add tst-tls1 and tst-tls2.
8208 * tst-tls1.c: New file.
8209 * tst-tls2.c: New file.
8211 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8214 * pthread_create.c (start_thread): Set EXITING_BIT early.
8216 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8217 (THREAD_GETMEM_NC): Likewise.
8219 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8221 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8222 off 3 more bytes by using offset-less instructions when possible.
8224 * Makefile: Add dependency for $(objpfx)version.d.
8226 * eintr.c (eintr_source): Add unnecessary return but the compiler
8229 * tst-kill3.c: Include <unistd.h>.
8231 2003-02-21 Roland McGrath <roland@redhat.com>
8233 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8235 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8237 * Makefile (tests): Add tst-eintr1.
8238 (distribute): Add eintr.c.
8239 * tst-eintr1.c: New file.
8240 * eintr.c: New file.
8242 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8244 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8245 Disallow sending SIGCANCEL.
8247 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8248 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8249 * tst-kill1.c: New file.
8250 * tst-kill2.c: New file.
8251 * tst-kill3.c: New file.
8252 * tst-kill5.c: New file.
8253 * tst-kill6.c: New file.
8254 * tst-basic7.c: Renamed to...
8255 * tst-kill4.c: ...this.
8257 2003-02-21 Roland McGrath <roland@redhat.com>
8259 * Makefile (install-lib-ldscripts): New variable.
8261 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8263 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8264 * pthread_cancel.c: Use INVALID_TD_P.
8265 * pthread_detach.c: Likewise.
8266 * pthread_getschedparam.c: Likewise.
8267 * pthread_setschedparam.c: Likewise.
8268 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8269 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8270 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8271 * pthread_timedjoin.c: Likewise.
8273 * tst-basic7.c: Include <signal.h>.
8275 * pthread_join.c (pthread_join): Limited checking for invalid
8277 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8279 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8281 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8282 beginning of the loop. Clear the entire first block of TSD.
8283 * Makefile (tests): Add tst-key4.
8284 * tst-key4.c: New file.
8286 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8288 * Makefile (tests): Add tst-basic7.
8289 * tst-basic7.c: New file.
8291 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8292 Add some more __builtin_expect.
8294 * pthreadP.h: Define dummy version of DEBUGGING_P.
8296 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8298 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8299 _POSIX_THREAD_PRIORITY_SCHEDULING.
8300 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8301 _XOPEN_REALTIME_THREADS.
8302 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8304 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8305 kernel returns EINVAL for PID <= 0, work around it.
8307 * Makefile (tests): Add tst-signal5.
8308 * tst-signal5.c: New file.
8310 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8313 * tst-cancel1.c (tf): Block all signals.
8315 * Makefile (tests): Add tst-basic6.
8316 * tst-basic6.c: New file.
8318 * tst-basic1.c: Add test for process ID.
8320 * Makefile (tests): Add tst-cancel10.
8321 * tst-cancel10.c: New file.
8323 * Makefile (tests): Add tst-signal4.
8324 * tst-signal4.c: New file.
8326 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8327 __sigismember instead of sigismember. Add __builtin_expect.
8329 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8331 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8332 pthread_setcancelstate, and pthread_rwlock_setpshared.
8334 * tst-cancel7.c (do_test): Make sure the pid file exists before
8335 canceling the thread.
8337 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8338 pthread_rwlock_timedrdlock tests.
8339 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8341 Check for invalid tv_nsec field.
8342 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8345 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8346 recursive mutex of overflow.
8348 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8350 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8351 going into an endless loop.
8352 * Makefile (tests): Add tst-cancel9.
8353 * tst-cancel9.c: New file.
8355 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8357 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8359 * tst-mutex5.c (do_test): Add more timedlock tests.
8361 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8362 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8364 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8365 use INLINE_SYSCALL. Error number is returned, not -1.
8367 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8368 and __deallocate_stack with internal_function.
8369 * pthread_create.c: Adjust definitions appropriately.
8370 * allocatestack.c: Likewise.
8372 * pthread_join.c: Add one more __builtin_expect.
8373 * pthread_timedjoin.c: Likewise.
8375 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8376 not data of sequence number does not match.
8377 Add one __builtin_expect.
8379 * Makefile (tests): Add tst-clock1.
8380 * tst-clock1.c: New file.
8382 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8384 * Makefile (tests): Add tst-basic5.
8385 * tst-basic5.c: New file.
8387 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8389 * Makefile (tests): Add tst-basic4.
8390 * tst-basic4.c: New file.
8392 * pthreadP.h: Add declaraction for __nptl_nthreads.
8393 * pthread_create.c: Define __nptl_nthreads
8394 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8395 after thread is done. If then zero, call exit(0).
8396 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8397 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8398 * init.c (pthread_functions): Initialize ptr_nthreads.
8399 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8400 (__reclaim_stacks): Decrement __nptl_nthreads.
8401 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8403 * Makefile (tests): Add tst-basic3.
8404 * tst-basic3.c: New file.
8406 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8407 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8408 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8409 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8410 if asynchronous canceling is enabled.
8411 * pthread_join.c (pthread_join): When recognizing circular joins,
8412 take into account the other thread might be already canceled.
8413 * Makefile (tests): Add tst-join5.
8414 * tst-join5.c: New file.
8416 * Makefile (tests): Add tst-join4.
8417 * tst-join4.c: New file.
8419 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8421 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8423 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8425 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8426 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8427 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8429 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8431 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8432 error if lll_futex_wake failed.
8434 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8437 handling of cancellation and failung pthread_mutex_unlock call.
8438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8439 * Makefile (tests): Add tst-cond8 and tst-cond9.
8440 * tst-cond8.c: New file.
8441 * tst-cond9.c: New file.
8443 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8445 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8446 non-standard initializers with __USE_GNU.
8448 * Makefile (tests): Add tst-cleanup3.
8449 * tst-cleanup3.c: New file.
8451 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8453 * Makefile (tests): Add tst-attr1 and tst-attr2.
8454 * tst-attr1.c: New file.
8455 * tst-attr2.c: New file.
8457 * Makefile: Add rules to build and run tst-atfork2 test.
8458 * tst-atfork2.c: New file.
8459 * tst-atfork2mod.c: New file.
8461 * sysdeps/unix/sysv/linux/unregister-atfork.c
8462 (__unregister_atfork): Free the memory allocated for the handlers
8463 after removing them from the lists.
8465 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8468 * tst-atfork1.c (do_test): Wait for the child we forked.
8469 Report error in child.
8471 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8473 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8475 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8477 * Makefile (tests): Add tst-cancel8.
8478 * tst-cancel8.c: New file.
8480 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8481 clearing of control variable.
8482 * Makefile (tests): Add tst-once3 and tst-once4.
8483 * tst-once3.c: New file.
8484 * tst-once4.c: New file.
8486 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8488 * sysdeps/sh/Makefile: New file.
8489 * sysdeps/sh/bits/atomic.h: New file.
8490 * sysdeps/sh/pthread_spin_init.c: New file.
8491 * sysdeps/sh/pthread_spin_lock.c: New file.
8492 * sysdeps/sh/pthread_spin_trylock.S: New file.
8493 * sysdeps/sh/pthread_spin_unlock.S: New file.
8494 * sysdeps/sh/pthreaddef.h: New file.
8495 * sysdeps/sh/tcb-offsets.sym: New file.
8496 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8497 * sysdeps/sh/tls.h: New file.
8498 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8499 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8500 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8501 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8502 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8503 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8504 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8505 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8506 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8507 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8508 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8509 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8510 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8511 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8512 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8513 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8514 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8515 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8516 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8517 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8519 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8521 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8523 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8524 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8525 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8526 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8527 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8529 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8531 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8534 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8536 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8538 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8539 (TLS_GET_FS): New #define.
8540 (TLS_SET_FS): New #define.
8541 Correct value of __NR_set_thread_area.
8543 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8545 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8547 * Makefile (tests): Add tst-popen1.
8548 * tst-popen1.c: New file.
8550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8551 but inactive generalization.
8552 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8554 Minor optimization, remove one instruction.
8555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8557 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8559 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8561 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8563 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8564 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8565 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8566 * sysdeps/pthread/pthread_cond_signal.c: New file.
8567 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8568 * sysdeps/pthread/pthread_cond_wait.c: New file.
8569 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8570 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8571 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8572 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8573 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8574 * sysdeps/s390/Makefile: New file.
8575 * sysdeps/s390/bits/atomic.h: New file.
8576 * sysdeps/s390/pthread_spin_init.c: New file.
8577 * sysdeps/s390/pthread_spin_lock.c: New file.
8578 * sysdeps/s390/pthread_spin_trylock.c: New file.
8579 * sysdeps/s390/pthread_spin_unlock.c: New file.
8580 * sysdeps/s390/pthreaddef.h: New file.
8581 * sysdeps/s390/tcb-offsets.sym: New file.
8582 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8583 * sysdeps/s390/tls.h: New file.
8584 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8585 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8586 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8587 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8588 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8589 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8590 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8591 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8592 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8593 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8594 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8595 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8596 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8597 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8598 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8599 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8600 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8601 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8602 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8603 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8604 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8605 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8606 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8608 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8610 * atomic.h: Add a couple more default implementations.
8611 (atomic_compare_and_exchange_acq): Use
8612 __arch_compare_and_exchange_32_acq in return value definition. It
8614 (atomic_bit_set): Renamed from atomic_set_bit.
8615 Add missing atomic_ prefixes.
8617 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8618 thread library is available, use correct value to mark initialized
8621 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8623 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8624 __sysconf to determine pagesize.
8626 * pthread_create.c: Include <atomic.h>.
8627 * allocatestack.c (allocate_stack): Implement coloring of the
8628 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8629 size minus one. Adjust users.
8630 * sysdeps/i386/i686/Makefile: New file.
8632 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8634 * allocatestack.c: Improve comment throughout the file.
8636 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8637 (__lll_lock_wait): Add branch prediction.
8638 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8639 (__lll_lock_wait): Likewise.
8640 (lll_unlock_wake_cb): Removed.
8642 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8644 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8645 _POSIX_THREAD_PRIORITY_SCHEDULING.
8647 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8649 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8650 Fix return type of ptr___pthread_getspecific.
8652 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8654 * Makefile (tests): Add tst-umask1.
8655 (tst-umask1-ARGS): Define.
8656 * tst-umask1.c: New file.
8658 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8660 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8661 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8662 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8663 pthread_rwlock_unlock.
8664 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8665 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8666 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8674 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8675 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8677 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8678 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8680 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8681 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8682 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8684 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8685 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8687 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8689 * Makefile (libpthread-routines): Remove lowlevelcond and
8690 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8691 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8692 and pthread_cond_broadcast.
8693 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8694 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8695 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8696 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8697 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8698 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8699 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8700 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8701 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8702 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8703 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8707 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8708 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8709 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8710 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8711 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8712 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8713 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8714 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8715 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8716 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8717 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8718 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8719 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8720 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8721 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8722 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8723 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8725 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8726 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8727 of the code is moved to ...
8728 * sysdeps/pthread/createthread.c: ...here. New file.
8730 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8732 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8733 (__new_sem_post): Clear %eax before returning.
8734 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8736 * Makefile (tests): Add tst-cleanup2.
8737 * tst-cleanup2.c: New file.
8739 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8740 Interpret first parameter correctly.
8742 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8744 * Makefile (headers): Add bits/semaphore.h.
8746 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8748 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8751 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8753 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8754 must be used and mapping failed.
8755 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8757 * Makefile (CFLAGS-pthread_self.os): Define this, not
8758 CFLAGS-pthread_self.c.
8760 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8762 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8765 * Makefile (libpthread-routines): Add version. Add rules to build
8766 version.os and banner.h.
8767 * version.c: New file.
8769 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8771 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8772 the alias unconditional.
8773 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8775 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8777 * Makefile (CFLAGS-pthread_self.c): New definition.
8779 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8781 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8782 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8783 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8784 * init.c (__pthread_initialize_minimal_internal): Likewise.
8786 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8788 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8790 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8791 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8792 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8793 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8794 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8795 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8797 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8799 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8800 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8801 * tst-cancel-wrappers.sh: Remove all exceptions.
8803 2003-01-05 Ulrich Drepper <drepper@redhat.com>
8805 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8806 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8808 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8809 Use __libc_pthread_functions array if SHARED.
8811 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8812 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8814 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8815 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8816 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8817 __libc_ptf_call instead of __libc_maybe_call.
8819 (__libc_cleanup_region_start): Wrap function name with PTF call.
8820 (__libc_cleanup_region_end): Likewise.
8821 (__libc_cleanup_end): Likewise.
8823 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8824 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8825 * pthread_key_create.c: Add __pthread_key_create_internal alias.
8826 * pthreadP.h: Add prototypes.
8828 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8829 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8830 __pthread_rwlock_unlock aliases.
8831 * pthreadP.h: Add prototypes for new aliases.
8833 * pthreadP.h (struct pthead_functions): Moved to...
8834 * sysdeps/pthread/pthread-functions.h: ...here. New file.
8835 * init.c (pthread_functions): Add initializers for new elements.
8837 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8838 __pthread_cleanup_pop_restore aliases.
8839 * pthreadP.h: Add prototypes.
8841 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8842 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8843 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8844 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8845 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8846 * pthreadP.h: Adjust prototypes and callers.
8848 2003-01-04 Ulrich Drepper <drepper@redhat.com>
8850 * Makefile (tests): Add tst-cancel7.
8851 (tst-cancel7-ARGS): New variable.
8852 * tst-cancel7.c: New file.
8854 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8855 around gcc defficiencies.
8856 * old_pthread_cond_signal.c: Likewise.
8857 * old_pthread_cond_timedwait.c: Likewise.
8858 * old_pthread_cond_wait.c: Likewise.
8860 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8862 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8864 * Makefile (tests): Add tst-cond7.
8865 * tst-cond7.c: New file.
8867 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8868 (condvar_cleanup): Get condvar address from the right place.
8870 * atomic.h: Correct definitions of atomic_full_barrier,
8871 atomic_read_barrier, atomic_write_barrier.
8873 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8875 * old_pthread_cond_signal.c: Likewise.
8876 * old_pthread_cond_timedwait.c: Likewise.
8877 * old_pthread_cond_wait.c: Likewise.
8879 2003-01-03 Jakub Jelinek <jakub@redhat.com>
8881 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8883 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8885 * pthreadP.h (pthread_cond_2_0_t): New type.
8886 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8887 Use new type for the 2.0 condvar function prototypes.
8888 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8889 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8891 * old_pthread_cond_destroy.c: Likewise.
8892 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
8893 * old_pthread_cond_signal.c: Likewise.
8894 * old_pthread_cond_timedwait.c: Likewise.
8895 * old_pthread_cond_wait.c: Likewise.
8897 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8898 (__pthread_cond_wait): Don't save cancellation mode and seq value
8901 * herrno.c (__h_errno_location): Don't define as weak.
8903 2003-01-02 Jakub Jelinek <jakub@redhat.com>
8905 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8906 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8907 and pthread_cond_wait.
8908 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8910 (__pthread_cond_broadcast_2_0): ... this.
8911 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8913 (__pthread_cond_destroy_2_0): ... this.
8914 * old_pthread_cond_init.c (__old_pthread_cond_init):
8916 (__pthread_cond_init_2_0): ... this.
8917 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8919 (__pthread_cond_signal_2_0): ... this.
8920 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8922 (__pthread_cond_wait_2_0): ... this.
8923 * pthread_cond_destroy.c: Include shlib-compat.h.
8924 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8925 * pthread_cond_init.c: Include shlib-compat.h.
8926 (pthread_cond_init): Change strong_alias into versioned_symbol.
8927 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8928 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8930 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8931 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8932 __pthread_cond_wait_2_0): New prototypes.
8933 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8934 __old_pthread_cond_init, __old_pthread_cond_signal,
8935 __old_pthread_cond_wait): Removed.
8936 * init.c: Include shlib-compat.h.
8937 (pthread_functions): Guard ptr___pthread_attr_init_2_0
8938 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8939 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8940 ptr___pthread_cond_*_2_0 fields.
8941 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8942 pthread_cond_*@GLIBC_2.0 compatibility symbols.
8944 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8945 LIBC_SIGACTION was not yet defined.
8946 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8947 [!defined LIBC_SIGACTION] (__sigaction): New function and
8949 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8950 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8952 2003-01-02 Jakub Jelinek <jakub@redhat.com>
8954 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8956 2003-01-02 Ulrich Drepper <drepper@redhat.com>
8958 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8959 New, larger type definition.
8960 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8962 * Versions [libpthread]: Add definitions for new pthread_cond_*
8963 interfaces for version GLIBC_2.3.2.
8964 * pthread_cond_init.c: Update initialization for new type definition.
8965 * Makefile (libpthread-routines): Remove pthread_cond_wait,
8966 pthread_cond_timedwait, pthread_cond_signal, and
8967 pthread_cond_broadcast. Add old_pthread_cond_init,
8968 old_pthread_cond_destroy, old_pthread_cond_wait,
8969 old_pthread_cond_timedwait, old_pthread_cond_signal, and
8970 old_pthread_cond_broadcast.
8971 * old_pthread_cond_broadcast.c: New file.
8972 * old_pthread_cond_destroy.c: New file.
8973 * old_pthread_cond_init.c: New file.
8974 * old_pthread_cond_signal.c: New file.
8975 * old_pthread_cond_timedwait.c: New file.
8976 * old_pthread_cond_wait.c: New file.
8977 * pthreadP.h: Add prototypes for the compatibility interfaces.
8979 * pthread_cond_destroy.c: Don't include <errno.h>.
8981 2003-01-01 Ulrich Drepper <drepper@redhat.com>
8983 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8984 unnecessary zero offset when addressing MUTEX.
8986 2002-12-31 Ulrich Drepper <drepper@redhat.com>
8988 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8990 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8991 for __register_atfork.
8993 2002-12-31 Jakub Jelinek <jakub@redhat.com>
8995 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8996 instead of ASSEMBLER test macro.
8998 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8999 __libc_current_sigrtmax): Add libc_hidden_def.
9001 * sysdeps/pthread/list.h: Remove assert.h include.
9003 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9005 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9006 __pthread_initialize_minimal_internal not
9007 __pthread_initialize_minimal.
9009 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9011 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9012 __pthread_initialize_minimal as hidden.
9014 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9017 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9019 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9020 $(common-objpfx)format.lds, include that into the output script.
9022 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9024 2002-12-28 Andreas Jaeger <aj@suse.de>
9026 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9027 nsec resolution changes.
9028 (xstat64_conv): Likewise.
9029 (xstat32_conv): Likewise.
9030 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9032 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9033 structs stat and stat64.
9034 * time/time.h (__timespec_defined): Define for __USE_MISC.
9035 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9037 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9039 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9041 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9042 (pthread_exit): Use strong_alias to avoid warnings.
9043 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9044 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9045 ptr___pthread_attr_init_2_*.
9046 * init.c (pthread_functions): Adjust.
9048 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9050 * forward.c: Make all functions available by default again. It
9051 caused too much trouble.
9053 * pt-siglongjmp.c: Removed.
9055 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9057 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9058 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9059 * sysdeps/i386/Makefile: New file.
9060 * sysdeps/i386/tcb-offsets.sym: New file.
9061 * sysdeps/pthread/tcb-offsets.h: New file.
9062 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9063 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9065 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9066 __register_atfork...
9067 (GLIBC_2.3.2): ...here.
9069 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9071 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9072 pthread_attr_setstackaddr with __attribute_deprecated__.
9074 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9076 * pt-system.c (system): Remove cancellation handling.
9077 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9078 cancellation routines.
9080 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9082 * descr.h: Include <dl-sysdep.h>.
9083 (struct pthread): Move header.data.list to the back of the struct.
9084 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9085 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9086 (SYSINFO_OFFSEET): Likewise.
9088 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9090 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9092 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9093 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9094 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9095 (USE_DL_SYSINFO): Undef.
9097 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9099 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9100 $(common-objpfx)libc.so.
9101 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9102 it is bigger than pipe buffer size even on arches with bigger
9104 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9106 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9108 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9109 correct errno access for case that USE___THREAD is not defined.
9111 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9113 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9114 Patch by Marijn Ros <marijn@mad.scientist.com>.
9116 2002-12-22 Roland McGrath <roland@redhat.com>
9118 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9120 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9122 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9124 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9126 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9127 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9128 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9130 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9132 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9133 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9134 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9135 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9136 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9137 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9138 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9139 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9141 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9143 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9145 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9147 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9149 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9150 that sysinfo is properly initialized.
9151 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9152 to 1 only for ld.so.
9154 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9155 RTLD_CORRECT_DYNAMIC_WEAK.
9157 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9159 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9160 Use return 0 as 6th argument to FORWARD4.
9161 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9163 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9165 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9166 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9167 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9168 (INIT_SYSINFO): New #define.
9169 (TLS_TP_INIT): Use INIT_SYSINFO.
9170 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9171 At test to make sure SYSINFO_OFFSET value is correct.
9172 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9174 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9176 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9177 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9178 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9179 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9180 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9181 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9182 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9184 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9186 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9187 macro instead of using int $0x80 directly.
9189 * sysdeps/pthread/bits/stdio-lock.h: New file.
9190 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9191 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9192 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9193 * Makefile (routines): Add libc-lowlevelmutex.
9195 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9196 __i686.get_pc_thunk.dx.
9198 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9200 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9201 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9202 ($(objpfx)tst-cancel-wrappers.out): New rule.
9203 * tst-cancel-wrappers.sh: New test.
9204 * tst-locale1.c: Include signal.h.
9205 (uselocale): Test static linking of __libc_current_sigrt*.
9207 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9209 * Makefile (tests): Add tst-cancel6.
9210 * tst-cancel6.c: New file
9212 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9214 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9215 Define meaningfully for assembler as well.
9216 * pthreadP.h (struct pthread_functions): Remove
9217 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9218 and ptr_pthread_attr_init_2_1 fields.
9219 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9220 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9221 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9222 (FORWARD3): Define using FORWARD4.
9223 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9225 * pt-system.c: Remove duplicate stdlib.h include.
9227 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9229 * sem_init.c: Define sem_init@GLIBC_2.0.
9230 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9231 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9233 * flockfile.c: Moved to...
9234 * sysdeps/pthread/flockfile.c: ...here. New file.
9235 * funlockfile.c: Moved to...
9236 * sysdeps/pthread/funlockfile.c: ...here. New file.
9237 * ftrylockfile.c: Moved to...
9238 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9240 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9242 * libc-cancellation.c: Guard both function with
9243 #if !defined NOT_IN_libc.
9244 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9245 automatically provided pthread wrappers.
9246 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9247 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9249 * pt-open.c: Removed.
9250 * pt-fcntl.c: Removed.
9251 * pt-fsync.c: Removed.
9252 * pt-lseek.c: Removed.
9253 * pt-msgrcv.c: Removed.
9254 * pt-msgsnd.c: Removed.
9255 * pt-msync.c: Removed.
9256 * pt-nanosleep.c: Removed.
9257 * pt-open64.c: Removed.
9258 * pt-pause.c: Removed.
9259 * pt-pread.c: Removed.
9260 * pt-pread64.c: Removed.
9261 * pt-pwrite.c: Removed.
9262 * pt-pwrite64.c: Removed.
9263 * pt-read.c: Removed.
9264 * pt-recv.c: Removed.
9265 * pt-recvfrom.c: Removed.
9266 * pt-recvmsg.c: Removed.
9267 * pt-send.c: Removed.
9268 * pt-sendto.c: Removed.
9269 * pt-sigtimedwait.c: Removed.
9270 * pt-sigwait.c: Removed.
9271 * pt-wait.c: Removed.
9272 * pt-waitpid.c: Removed.
9273 * pt-write.c: Removed.
9274 * pt-accept.c: Removed.
9275 * pt-close.c: Removed.
9276 * pt-connect.c: Removed.
9277 * pt-lseek64.c: Removed.
9278 * pt-sendmsg.c: Removed.
9279 * pt-tcdrain.c: Removed.
9281 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9283 * init.c (__pthread_initialize_minimal_internal): Renamed from
9284 __pthread_initialize_minimal. Make old name an alias. This
9285 converts a normal relocation into a relative relocation.
9287 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9289 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9290 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9291 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9292 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9293 pt-sigwaitinfo, pt-waitid, and pt-writev.
9294 * pt-creat.c: Removed.
9295 * pt-poll.c: Removed.
9296 * pt-pselect.c: Removed.
9297 * pt-readv.c: Removed.
9298 * pt-select.c: Removed.
9299 * pt-sigpause.c: Removed.
9300 * pt-sigsuspend.c: Removed.
9301 * pt-sigwaitinfo.c: Removed.
9302 * pt-waitid.c: Removed.
9303 * pt-writev.c: Removed.
9305 * init.c (pthread_functions): New variable.
9306 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9307 (or NULL) to __libc_pthread_init.
9308 * forward.c: Rewrite to use __libc:pthread_functions array to get
9310 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9312 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9313 Take new parameter. Copy content of variable pointed to by it
9314 to __libc_pthread_init.
9316 * pthreadP.h (struct pthread_functions): New type.
9317 (__libc_pthread_init): Declare.
9319 * pthread_attr_destroy.c: Add namespace protected alias.
9320 * pthread_attr_getdetachstate.c: Likewise.
9321 * pthread_attr_getinheritsched.c: Likewise.
9322 * pthread_attr_getschedparam.c: Likewise.
9323 * pthread_attr_getschedpolicy.c: Likewise.
9324 * pthread_attr_getscope.c: Likewise.
9325 * pthread_attr_setdetachstate.c: Likewise.
9326 * pthread_attr_setinheritsched.c: Likewise.
9327 * pthread_attr_setschedparam.c: Likewise.
9328 * pthread_attr_setschedpolicy.c: Likewise.
9329 * pthread_attr_setscope.c: Likewise.
9330 * pthread_cond_broadcast.c: Likewise.
9331 * pthread_cond_destroy.c: Likewise.
9332 * pthread_cond_init.c: Likewise.
9333 * pthread_cond_signal.c: Likewise.
9334 * pthread_cond_wait.c: Likewise.
9335 * pthread_condattr_destroy.c: Likewise.
9336 * pthread_condattr_init.c: Likewise.
9337 * pthread_equal.c: Likewise.
9338 * pthread_exit.c: Likewise.
9339 * pthread_getschedparam.c: Likewise.
9340 * pthread_self.c: Likewise.
9341 * pthread_setcancelstate.c: Likewise.
9342 * pthread_setschedparam.c: Likewise.
9343 * pthread_mutex_destroy.c: Likewise.
9344 * pthread_mutex_init.c: Likewise.
9345 * pthreadP.h: Add prototypes for the aliases.
9347 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9348 multiple_threads member in correct TCB to 1.
9350 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9351 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9352 member of thread decriptor, otherwise return unconditionally 1.
9354 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9356 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9357 regular Linux version. Remove file.
9358 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9359 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9360 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9361 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9362 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9363 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9364 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9365 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9366 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9367 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9368 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9369 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9370 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9371 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9372 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9373 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9374 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9375 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9376 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9377 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9378 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9379 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9380 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9381 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9382 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9383 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9384 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9385 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9386 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9387 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9389 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9391 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9392 * sysdeps/unix/sysv/linux/open.c: Removed.
9393 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9394 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9395 * sysdeps/unix/sysv/linux/msync.c: Removed.
9396 * sysdeps/unix/sysv/linux/read.c: Removed.
9397 * sysdeps/unix/sysv/linux/close.c: Removed.
9398 * sysdeps/unix/sysv/linux/creat.c: Removed.
9399 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9400 * sysdeps/unix/sysv/linux/pause.c: Removed.
9401 * sysdeps/unix/sysv/linux/select.c: Removed.
9402 * sysdeps/unix/sysv/linux/write.c: Removed.
9404 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9406 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9407 element in TCB to see whether locking is needed.
9409 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9410 MULTIPLE_THREADS_OFFSET value is correct.
9412 * sysdeps/unix/sysv/linux/close.c: New file.
9413 * sysdeps/unix/sysv/linux/connect.S: New file.
9414 * sysdeps/unix/sysv/linux/creat.c: New file.
9415 * sysdeps/unix/sysv/linux/fsync.c: New file.
9416 * sysdeps/unix/sysv/linux/llseek.c: New file.
9417 * sysdeps/unix/sysv/linux/lseek.c: New file.
9418 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9419 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9420 * sysdeps/unix/sysv/linux/msync.c: New file.
9421 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9422 * sysdeps/unix/sysv/linux/open.c: New file.
9423 * sysdeps/unix/sysv/linux/open64.c: New file.
9424 * sysdeps/unix/sysv/linux/pause.c: New file.
9425 * sysdeps/unix/sysv/linux/poll.c: New file.
9426 * sysdeps/unix/sysv/linux/pread.c: New file.
9427 * sysdeps/unix/sysv/linux/pread64.c: New file.
9428 * sysdeps/unix/sysv/linux/pselect.c: New file.
9429 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9430 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9431 * sysdeps/unix/sysv/linux/readv.c: New file.
9432 * sysdeps/unix/sysv/linux/recv.S: New file.
9433 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9434 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9435 * sysdeps/unix/sysv/linux/select.c: New file.
9436 * sysdeps/unix/sysv/linux/send.S: New file.
9437 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9438 * sysdeps/unix/sysv/linux/sendto.S: New file.
9439 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9440 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9441 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9442 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9443 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9444 * sysdeps/unix/sysv/linux/system.c: New file.
9445 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9446 * sysdeps/unix/sysv/linux/wait.c: New file.
9447 * sysdeps/unix/sysv/linux/waitid.c: New file.
9448 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9449 * sysdeps/unix/sysv/linux/writev.c: New file.
9450 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9452 * pt-readv.c: Fix comment.
9454 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9456 * tst-cleanup1.c: Include stdlib.h.
9458 * tst-cancel5.c: New test.
9459 * Makefile (tests): Add tst-cancel5.
9460 (tst-cancel5): Link against libc.so libpthread.so in that order.
9462 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9464 * forward.c (test_loaded): Prevent recursive calls.
9466 * Makefile (routines): Add libc-cancellation.
9467 * libc-cancellation.c: New file.
9468 * descr.h (struct pthread): Add multiple_threads field.
9469 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9470 new thread descriptor to 1.
9471 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9472 Initialize multiple_thread field after successful thread creation.
9473 * cancellation.c (__do_cancel): Move to pthreadP.h.
9474 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9475 (__pthread_disable_asynccancel): Add internal_function attribute.
9476 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9477 * pthread_setcancelstate.c: Likewise.
9478 * pthread_setcanceltype.c: Likewise.
9479 * pthread_exit.c: Likewise.
9480 * pthreadP.h (CANCELLATION_P): Likewise.
9481 (__do_cancel): Define as static inline.
9482 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9483 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9485 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9486 fields. Define MULTIPLE_THREADS_OFFSET.
9487 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9489 * sysdeps/unix/sysv/linux/accept.S: New file.
9490 * sysdeps/unix/sysv/linux/read.c: New file.
9491 * sysdeps/unix/sysv/linux/write.c: New file.
9492 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9493 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9494 initialization of __libc_locking_needed.
9495 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9496 __libc_locking_needed, use multiple_threads field in TCB.
9497 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9499 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9501 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9503 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9505 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9506 access to __libc_locking_needed for PIC.
9508 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9510 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9511 declare for libc.so.
9512 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9514 (__libc_lock_lock): Put into statement expression.
9515 (__libc_lock_unlock): Remove trailing semicolon.
9516 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9518 2002-12-12 Roland McGrath <roland@redhat.com>
9520 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9521 "m" constraint to refer to __libc_locking_needed. Declare it here.
9523 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9525 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9526 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9527 Initialize __libc_locking_needed.
9528 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9529 instead of __register_pthread_fork_handler.
9530 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9531 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9532 fork-gen with libc_pthread_init.
9533 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9534 of __register_pthread_fork_handler.
9535 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9536 of __register_pthread_fork_handler.
9537 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9538 __libc_locking_needed to determine whether lock prefix can be avoided.
9539 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9541 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9543 * Makefile (tests): Add tst-cleanup1.
9544 * tst-cleanup1.c: New file.
9545 * cancellation.c (__cleanup_thread): Removed.
9546 (__do_cancel): Remove call to __cleanup_thread.
9547 * pthreadP.h: Remove __cleanup_thread prorotype.
9549 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9550 Remember function and argument even if cancellation handler
9551 function is not available.
9552 (__libc_cleanup_region_end): Execute registered function directly if
9553 pthread functions are not available.
9554 (__libc_cleanup_end): Likewise.
9556 * init.c (__pthread_initialize_minimal): Fix initialization in
9557 static lib by preventing gcc from being too clever.
9559 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9561 * init.c (__pthread_initialize_minimal): Remove unneccesary
9564 * Makefile (tests): We can run tst-locale2 now.
9566 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9568 * Versions: Remove duplicated sigwait entry.
9570 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9572 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9575 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9577 * pthreadP.h: Declare __pthread_enable_asynccancel and
9578 __pthread_disable_asynccancel.
9579 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9580 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9581 * cancellation.c (__pthread_enable_asynccancel): New function.
9582 (__pthread_disable_asynccancel): New function.
9583 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9584 * pt-close.c: Likewise.
9585 * pt-connect.c: Likewise.
9586 * pt-creat.c: Likewise.
9587 * pt-fcntl.c: Likewise.
9588 * pt-fsync.c: Likewise.
9589 * pt-lseek.c: Likewise.
9590 * pt-lseek64.c: Likewise.
9591 * pt-msgrcv.c: Likewise.
9592 * pt-msgsnd.c: Likewise.
9593 * pt-msync.c: Likewise.
9594 * pt-nanosleep.c: Likewise.
9595 * pt-open.c: Likewise.
9596 * pt-open64.c: Likewise.
9597 * pt-pause.c: Likewise.
9598 * pt-poll.c: Likewise.
9599 * pt-pread.c: Likewise.
9600 * pt-pread64.c: Likewise.
9601 * pt-pselect.c: Likewise.
9602 * pt-pwrite.c: Likewise.
9603 * pt-pwrite64.c: Likewise.
9604 * pt-read.c: Likewise.
9605 * pt-readv.c: Likewise.
9606 * pt-recv.c: Likewise.
9607 * pt-recvfrom.c: Likewise.
9608 * pt-recvmsg.c: Likewise.
9609 * pt-select.c: Likewise.
9610 * pt-send.c: Likewise.
9611 * pt-sendmsg.c: Likewise.
9612 * pt-sendto.c: Likewise.
9613 * pt-sigpause.c: Likewise.
9614 * pt-sigsuspend.c: Likewise.
9615 * pt-sigtimedwait.c: Likewise.
9616 * pt-sigwait.c: Likewise.
9617 * pt-sigwaitinfo.c: Likewise.
9618 * pt-system.c: Likewise.
9619 * pt-tcdrain.c: Likewise.
9620 * pt-wait.c: Likewise.
9621 * pt-waitid.c: Likewise.
9622 * pt-waitpid.c: Likewise.
9623 * pt-write.c: Likewise.
9624 * pt-writev.c: Likewise.
9625 * pthread_join.c: Likewise.
9626 * pthread_timedjoin.c: Likewise.
9628 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9629 (__xpg_sigpause): New function.
9630 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9632 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9634 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9636 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9637 _GI_pthread_cleanup_pop to pthreadP.h.
9639 * ftrylockfile.c: Use _IO_lock_trylock instead of
9640 pthread_mutex_trylock.
9642 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9643 (CANCEL_RESET): Likewise.
9644 (__pthread_setcanceltype_): Declare.
9645 (__pthread_mutex_lock_internal): Declare.
9646 (__pthread_mutex_unlock_internal): Declare.
9647 (__pthread_once_internal): Declare.
9648 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9649 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9651 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9652 and pthread_mutex_unlock.
9653 * pthread_cond_wait.c: Likewise.
9654 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9655 * pthread_mutex_unlock.c: Likewise.
9657 * pthread_setcanceltype.c: Add additional alias
9658 __pthread_setcanceltype.
9660 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9661 * sem_open.c (sem_open): Likewise.
9662 Use __libc_open, __libc_write, and __libc_close instead of
9663 open, write, and close respectively.
9665 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9666 Rewrite as statement expression since it must return a value.
9668 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9669 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9672 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9673 alias __pthread_once_internal.
9675 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9677 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9679 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9680 * tst-stdio1.c: New file.
9681 * tst-stdio2.c: New file.
9683 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9685 * Makefile (tests): Comment out tst-locale2 for now.
9686 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9688 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9690 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9691 Use _IO_lock_init instead of explicit assignment.
9693 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9694 Define __libc_lock_* and __libc_lock_recursive macros with
9695 lowlevellock macros, not pthread mutexes.
9697 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9698 of pthread_mutex_lock.
9699 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9700 instead of pthread_mutex_unlock.
9702 2002-12-06 Roland McGrath <roland@redhat.com>
9704 * allocatestack.c (__stack_user): Use uninitialized defn.
9705 * init.c (__pthread_initialize_minimal): Initialize it here.
9707 2002-12-05 Roland McGrath <roland@redhat.com>
9709 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9711 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9713 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9716 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9718 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9720 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9721 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9722 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9723 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9724 for __libc_lock_* macros.
9725 * Makefile (routines): Add libc-lowlevellock.
9727 2002-10-09 Roland McGrath <roland@redhat.com>
9729 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9730 Under [__PIC__], call the function via the pointer fetched for
9731 comparison rather than a call by name that uses the PLT.
9732 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9733 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9734 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9735 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9736 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9738 2002-12-04 Roland McGrath <roland@redhat.com>
9740 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9742 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9743 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9745 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9747 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9749 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9750 a completely opaque, non-integer type.
9751 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9753 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9755 * sysdeps/i386/tls.h: Include stdlib.h.
9756 * sysdeps/x86_64/tls.h: Likewise.
9758 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9760 * Makefile (tests): Add tst-locale2.
9761 (tests-static): Likewise.
9762 * tst-locale2.c: New file.
9764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9765 volatile and add memory clobbers to lock operations.
9767 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9769 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9770 * sysdeps/i386/i486/bits/atomic.h: New file.
9771 * sysdeps/i386/i586/bits/atomic.h: New file.
9772 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9773 include i486 version.
9774 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9775 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9776 Patch by Marijn Ros <marijn@mad.scientist.com>.
9778 * allocatestack.c (get_cached_stack): Don't crash if we first
9779 found a stack with a larger size then needed.
9780 Reported by Hui Huang <hui.huang@sun.com>.
9782 * Makefile (tests): Add tst-sysconf.
9783 * tst-sysconf.c: New file.
9785 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9786 PTHREAD_THREADS_MAX.
9788 2002-12-02 Roland McGrath <roland@redhat.com>
9790 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9791 Declare using hidden_proto instead of attribute_hidden, so there are
9792 non-.hidden static symbols for gdb to find.
9793 (__pthread_keys): Likewise.
9794 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9795 * allocatestack.c (__stack_user): Likewise.
9796 * pthread_create.c (__pthread_keys): Likewise.
9797 (__nptl_threads_events, __nptl_last_event): Make these static instead
9799 * pthread_key_create.c (__pthread_pthread_keys_max,
9800 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9802 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9804 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9806 * tst-locale1.c: New file.
9808 * pthread_cond_timedwait.c: Include <stdlib.h>.
9810 * Makefile (tests): Add tst-fork2 and tst-fork3.
9811 * tst-fork2.c: New file.
9812 * tst-fork3.c: New file.
9814 2002-11-28 Ulrich Drepper <drepper@redhat.com>
9816 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9818 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9819 require it to 200112L.
9821 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9822 instruction only if HAVE_CMOV is defined.
9823 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9825 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9827 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9831 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9833 2002-11-27 Ulrich Drepper <drepper@redhat.com>
9835 * sysdeps/x86_64/bits/atomic.h: New file.
9837 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9840 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9841 possible since gettid cannot fail.
9843 * sysdeps/x86_64/pthreaddef.h: New file.
9845 * sysdeps/i386/pthreaddef.h (gettid): Removed.
9847 * sysdeps/x86_64/pthread_spin_init.c: New file.
9848 * sysdeps/x86_64/pthread_spin_lock.c: New file.
9849 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9850 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9852 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9853 Add missing lock prefix. Minute optimization.
9855 * tst-spin2.c (main): Also check successful trylock call.
9857 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9858 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
9860 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9861 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
9863 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
9864 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9865 value in case of an error. Add support for INTERNAL_SYSCALL.
9867 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9868 value in case of an error.
9870 * sysdeps/x86_64/tls.h: New file.
9872 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9874 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
9875 takes the array member name and the index as parameters.
9876 (THREAD_SETMEM_NC): Likewise.
9877 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9878 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9881 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9882 to decide which code to use.
9883 (THREAD_SETMEM_NC): Likewise.
9885 * allocatestack.c (queue_stack): Don't remove stack from list here.
9886 Do it in the caller. Correct condition to prematurely terminate
9887 loop to free stacks.
9888 (__deallocate_stack): Remove stack from list here.
9890 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9892 * Makefile (tests): Add tst-stack1.
9893 * tst-stack1.c: New file.
9895 * allocatestack.c (allocate_stack): Initialize the TCB on a user
9898 * pthread_attr_getstack.c: Return bottom of the thread area.
9900 2002-11-25 Ulrich Drepper <drepper@redhat.com>
9902 * Makefile (libpthread-routines): Add pt-allocrtsig and
9903 pthread_kill_other_threads.
9904 * pt-allocrtsig.c: New file.
9905 * pthread_kill_other_threads.c: New file.
9906 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9907 all three functions.
9908 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9910 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9911 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9912 and __libc_allocate_rtsig_private.
9913 * Versions (libpthread): Export pthread_kill_other_threads_np,
9914 __libc_current_sigrtmin, and __libc_current_sigrtmax.
9916 2002-11-24 Ulrich Drepper <drepper@redhat.com>
9918 * allocatestack.c (allocate_stack): stackaddr in attribute points to
9919 the end of the stack. Adjust computations.
9920 When mprotect call fails dequeue stack and free it.
9921 * pthread_attr_setstack.c: Store top of the stack in stackaddr
9923 * pthread_getattr_np.c: Likewise.
9925 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9928 2002-11-23 Ulrich Drepper <drepper@redhat.com>
9930 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9931 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
9933 2002-11-22 Ulrich Drepper <drepper@redhat.com>
9935 * pthread_getspecific.c: Optimize access to first 2nd-level array.
9936 * pthread_setspecific.c: Likewise.
9938 2002-11-21 Ulrich Drepper <drepper@redhat.com>
9940 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9941 definitions. Get them from the official place.
9942 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9944 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9945 Use new CLONE_ flags in clone() calls.
9947 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9948 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9950 * Versions: Add pthread_* functions for libc.
9951 * forward.c: New file.
9953 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9955 * herrno.c: New file.
9958 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9959 sem_trywait, and sem_timedwait. Add herrno and res.
9960 * sem_init.c: Don't initialize lock and waiters members.
9961 * sem_open.c: Likewise.
9962 * sem_post.c: Removed.
9963 * sem_wait.c: Removed.
9964 * sem_trywait.c: Removed.
9965 * sem_timedwait.c: Removed.
9966 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9967 Includes full implementations of sem_post, sem_wait, sem_trywait,
9969 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9970 for new implementation.
9971 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9974 * tst-sem3.c: Improve error message.
9975 * tst-signal3.c: Likewise.
9977 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9978 to tell the kernel about the termination futex and to initialize tid
9979 member. Don't initialize main_thread.
9980 * descr.h (struct pthread): Remove main_thread member.
9981 * cancelllation.c (__do_cancel): Remove code handling main thread.
9982 The main thread is not special anymore.
9984 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
9985 size of the stacks to stack_cache_actsize.
9987 * pt-readv.c: Add missing "defined".
9988 * pt-sigwait.c: Likewise.
9989 * pt-writev.c: Likewise.
9991 2002-11-09 Ulrich Drepper <drepper@redhat.com>
9993 * Versions: Export __connect from libpthread.
9994 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9996 * Makefile (libpthread-routines): Add pt-raise.
9997 * sysdeps/unix/sysv/linux/raise.c: New file.
9998 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9999 * sysdeps/generic/pt-raise.c: New file.
10001 * pthread_cond_init.c: Initialize all data elements of the condvar
10002 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10004 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10005 * pthread_create.c: Likewise.
10007 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10008 * tst-key1.c: New file.
10009 * tst-key2.c: New file.
10010 * tst-key3.c: New file.
10012 * Versions: Export pthread_detach for version GLIBC_2.0.
10013 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10015 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10017 * pthread_key_create.c: Terminate search after an unused key was found.
10018 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10020 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10021 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10023 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10025 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10026 dynamic lookup for errno in PIC.
10028 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10029 release the stack lock as soon as possible.
10030 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10031 the static TLS block.
10032 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10034 * cancellation.c: Renamed from cancelation.c.
10035 * Makefile: Adjust accordingly.
10036 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10037 * cleanup_defer.c: Use CANCELLATION_P.
10038 * pthread_testcancel.c: Likewise.
10039 * descr.h: Fix spelling in comments.
10040 * init.c: Likewise.
10041 * pthread_getattr_np.c: Likewise.
10042 * pthread_getschedparam.c: Likewise.
10043 * pthread_setschedparam.c: Likewise.
10044 * Versions: Likewise.
10046 * pt-pselect.c: New file.
10047 * Makefile (libpthread-routines): Add pt-pselect.
10048 * Versions: Add pselect.
10050 * tst-cancel4.c: New file.
10051 * Makefile (tests): Add tst-cancel4.
10053 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10055 * pthread_mutex_lock.c: Always record lock ownership.
10056 * pthread_mutex_timedlock.c: Likewise.
10057 * pthread_mutex_trylock.c: Likewise.
10059 * pt-readv.c: New file.
10060 * pt-writev.c: New file.
10061 * pt-creat.c: New file.
10062 * pt-msgrcv.c: New file.
10063 * pt-msgsnd.c: New file.
10064 * pt-poll.c: New file.
10065 * pt-select.c: New file.
10066 * pt-sigpause.c: New file.
10067 * pt-sigsuspend.c: New file.
10068 * pt-sigwait.c: New file.
10069 * pt-sigwaitinfo.c: New file.
10070 * pt-waitid.c: New file.
10071 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10072 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10073 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10074 * Versions: Add all the new functions.
10076 * tst-exit1.c: New file.
10077 * Makefile (tests): Add tst-exit1.
10079 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10081 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10083 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10085 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10086 call. pthread_join is an official cancellation point.
10087 * pthread_timedjoin.c: Likewise.
10089 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10090 and the condvar's mutex are retrieved.
10091 * pthread_cond_timedwait.c: Likewise.
10092 Reported by dice@saros.East.Sun.COM.
10094 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10096 * pthreadP.h: Cut out all type definitions and move them...
10097 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10098 * pthreadP.h: Include <internaltypes.h>.
10100 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10101 performance tweaks.
10103 * sem_trywait.c: Shuffle #includes around to get right order.
10104 * sem_timedwait.c: Likewise.
10105 * sem_post.c: Likewise.
10106 * sem_wait.c: Likewise.
10108 * nptl 0.3 released.
10110 * Makefile (tests): Add tst-signal3.
10111 * tst-signal3.c: New file.
10113 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10115 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10116 the asms modify the sem object.
10117 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10119 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10120 the actual members.
10121 * pthreadP.h (struct sem): New type. Actual semaphore type.
10122 * semaphoreP.h: Include pthreadP.h.
10123 * sem_getvalue.c: Adjust to sem_t change.
10124 * sem_init.c: Likewise.
10125 * sem_open.c: Likewise.
10126 * sem_post.c: Likewise.
10127 * sem_timedwait.c: Likewise.
10128 * sem_trywait.c: Likewise.
10129 * sem_wait.c: Likewise.
10131 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10133 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10134 * tst-basic2.c: New file.
10135 * tst-exec1.c: New file.
10136 * tst-exec2.c: New file.
10137 * tst-exec3.c: New file.
10139 * tst-fork1.c: Remove extra */.
10141 * nptl 0.2 released. The API for IA-32 is complete.